#!/bin/sh
-for a in test_urcu_gc test_urcu_gc_mb test_urcu test_urcu_mb \
- test_urcu_lgc test_qsbr_lgc test_urcu_lgc_mb \
- test_qsbr test_qsbr_gc test_rwlock test_perthreadlock \
- test_mutex; do
+for a in test_urcu_gc test_urcu_signal_gc test_urcu_mb_gc test_qsbr_gc \
+ test_urcu_lgc test_urcu_signal_lgc test_urcu_mb_lgc test_qsbr_lgc \
+ test_urcu test_urcu_signal test_urcu_mb test_qsbr \
+ test_rwlock test_perthreadlock test_mutex; do
echo "./${a} $*" | tee -a runall.detail.log
/usr/bin/time --append --output runall.detail.log ./${a} $*
done
/* read-side C.S. duration, in loops */
static unsigned long rduration;
+/* write-side C.S. duration, in loops */
+static unsigned long wduration;
+
static inline void loop_sleep(unsigned long l)
{
while(l-- != 0)
pthread_mutex_lock(&lock);
test_array.a = 0;
test_array.a = 8;
+ if (unlikely(wduration))
+ loop_sleep(wduration);
pthread_mutex_unlock(&lock);
nr_writes++;
if (unlikely(!test_duration_write()))
#endif
printf(" [-d delay] (writer period (us))");
printf(" [-c duration] (reader C.S. duration (in loops))");
+ printf(" [-e duration] (writer C.S. duration (in loops))");
printf(" [-v] (verbose output)");
printf(" [-a cpu#] [-a cpu#]... (affinity)");
printf("\n");
}
wdelay = atol(argv[++i]);
break;
+ case 'e':
+ if (argc < i + 2) {
+ show_usage(argc, argv);
+ return -1;
+ }
+ wduration = atol(argv[++i]);
+ break;
case 'v':
verbose_mode = 1;
break;
/* read-side C.S. duration, in loops */
static unsigned long rduration;
+/* write-side C.S. duration, in loops */
+static unsigned long wduration;
+
static inline void loop_sleep(unsigned long l)
{
while(l-- != 0)
}
test_array.a = 0;
test_array.a = 8;
+ if (unlikely(wduration))
+ loop_sleep(wduration);
for (tidx = (long)nr_readers - 1; tidx >= 0; tidx--) {
pthread_mutex_unlock(&per_thread_lock[tidx].lock);
}
#endif
printf(" [-d delay] (writer period (us))");
printf(" [-c duration] (reader C.S. duration (in loops))");
+ printf(" [-e duration] (writer C.S. duration (in loops))");
printf(" [-v] (verbose output)");
printf(" [-a cpu#] [-a cpu#]... (affinity)");
printf("\n");
}
wdelay = atol(argv[++i]);
break;
+ case 'e':
+ if (argc < i + 2) {
+ show_usage(argc, argv);
+ return -1;
+ }
+ wduration = atol(argv[++i]);
+ break;
case 'v':
verbose_mode = 1;
break;
/* read-side C.S. duration, in loops */
static unsigned long rduration;
+/* write-side C.S. duration, in loops */
+static unsigned long wduration;
+
static inline void loop_sleep(unsigned long l)
{
while(l-- != 0)
new = test_array_alloc();
new->a = 8;
old = rcu_xchg_pointer(&test_rcu_pointer, new);
+ if (unlikely(wduration))
+ loop_sleep(wduration);
synchronize_rcu();
/* can be done after unlock */
if (old)
#endif
printf(" [-d delay] (writer period (us))");
printf(" [-c duration] (reader C.S. duration (in loops))");
+ printf(" [-e duration] (writer C.S. duration (in loops))");
printf(" [-v] (verbose output)");
printf(" [-a cpu#] [-a cpu#]... (affinity)");
printf("\n");
}
wdelay = atol(argv[++i]);
break;
+ case 'e':
+ if (argc < i + 2) {
+ show_usage(argc, argv);
+ return -1;
+ }
+ wduration = atol(argv[++i]);
+ break;
case 'v':
verbose_mode = 1;
break;
static struct reclaim_queue *pending_reclaims;
+/* write-side C.S. duration, in loops */
+static unsigned long wduration;
+
static inline void loop_sleep(unsigned long l)
{
while(l-- != 0)
new->a = 8;
old = _rcu_xchg_pointer(&test_rcu_pointer, new);
#endif
+ if (unlikely(wduration))
+ loop_sleep(wduration);
rcu_gc_reclaim(wtidx, old);
nr_writes++;
if (unlikely(!test_duration_write()))
#ifdef DEBUG_YIELD
printf(" [-r] [-w] (yield reader and/or writer)");
#endif
+ printf(" [-b batch] (batch reclaim)");
printf(" [-d delay] (writer period (us))");
printf(" [-c duration] (reader C.S. duration (in loops))");
+ printf(" [-e duration] (writer C.S. duration (in loops))");
printf(" [-v] (verbose output)");
printf(" [-a cpu#] [-a cpu#]... (affinity)");
printf("\n");
}
wdelay = atol(argv[++i]);
break;
+ case 'e':
+ if (argc < i + 2) {
+ show_usage(argc, argv);
+ return -1;
+ }
+ wduration = atol(argv[++i]);
+ break;
case 'v':
verbose_mode = 1;
break;
/* read-side C.S. duration, in loops */
static unsigned long rduration;
+/* write-side C.S. duration, in loops */
+static unsigned long wduration;
+
static inline void loop_sleep(unsigned long l)
{
while(l-- != 0)
pthread_rwlock_wrlock(&lock);
test_array.a = 0;
test_array.a = 8;
+ if (unlikely(wduration))
+ loop_sleep(wduration);
pthread_rwlock_unlock(&lock);
nr_writes++;
if (unlikely(!test_duration_write()))
#endif
printf(" [-d delay] (writer period (us))");
printf(" [-c duration] (reader C.S. duration (in loops))");
+ printf(" [-e duration] (writer C.S. duration (in loops))");
printf(" [-v] (verbose output)");
printf(" [-a cpu#] [-a cpu#]... (affinity)");
printf("\n");
}
wdelay = atol(argv[++i]);
break;
+ case 'e':
+ if (argc < i + 2) {
+ show_usage(argc, argv);
+ return -1;
+ }
+ wduration = atol(argv[++i]);
+ break;
case 'v':
verbose_mode = 1;
break;
/* read-side C.S. duration, in loops */
static unsigned long rduration;
+/* write-side C.S. duration, in loops */
+static unsigned long wduration;
+
static inline void loop_sleep(unsigned long l)
{
while(l-- != 0)
new = test_array_alloc();
new->a = 8;
old = rcu_xchg_pointer(&test_rcu_pointer, new);
+ if (unlikely(wduration))
+ loop_sleep(wduration);
synchronize_rcu();
if (old)
old->a = 0;
#endif
printf(" [-d delay] (writer period (us))");
printf(" [-c duration] (reader C.S. duration (in loops))");
+ printf(" [-e duration] (writer C.S. duration (in loops))");
printf(" [-v] (verbose output)");
printf(" [-a cpu#] [-a cpu#]... (affinity)");
printf("\n");
}
wdelay = atol(argv[++i]);
break;
+ case 'e':
+ if (argc < i + 2) {
+ show_usage(argc, argv);
+ return -1;
+ }
+ wduration = atol(argv[++i]);
+ break;
case 'v':
verbose_mode = 1;
break;
/* read-side C.S. duration, in loops */
static unsigned long rduration;
+/* write-side C.S. duration, in loops */
+static unsigned long wduration;
+
static inline void loop_sleep(unsigned long l)
{
while(l-- != 0)
rcu_copy_mutex_lock();
old = test_rcu_pointer;
rcu_assign_pointer(test_rcu_pointer, new);
+ if (unlikely(wduration))
+ loop_sleep(wduration);
rcu_copy_mutex_unlock();
synchronize_rcu();
if (old)
#endif
printf(" [-d delay] (writer period (us))");
printf(" [-c duration] (reader C.S. duration (in loops))");
+ printf(" [-e duration] (writer C.S. duration (in loops))");
printf(" [-v] (verbose output)");
printf(" [-a cpu#] [-a cpu#]... (affinity)");
printf("\n");
}
wdelay = atol(argv[++i]);
break;
+ case 'e':
+ if (argc < i + 2) {
+ show_usage(argc, argv);
+ return -1;
+ }
+ wduration = atol(argv[++i]);
+ break;
case 'v':
verbose_mode = 1;
break;
/* read-side C.S. duration, in loops */
static unsigned long rduration;
+/* write-side C.S. duration, in loops */
+static unsigned long wduration;
+
static inline void loop_sleep(unsigned long l)
{
while(l-- != 0)
new = test_array_alloc();
new->a = 8;
old = rcu_xchg_pointer(&test_rcu_pointer, new);
+ if (unlikely(wduration))
+ loop_sleep(wduration);
synchronize_rcu();
if (old)
old->a = 0;
#endif
printf(" [-d delay] (writer period (us))");
printf(" [-c duration] (reader C.S. duration (in loops))");
+ printf(" [-e duration] (writer C.S. duration (in loops))");
printf(" [-v] (verbose output)");
printf(" [-a cpu#] [-a cpu#]... (affinity)");
printf("\n");
}
wdelay = atol(argv[++i]);
break;
+ case 'e':
+ if (argc < i + 2) {
+ show_usage(argc, argv);
+ return -1;
+ }
+ wduration = atol(argv[++i]);
+ break;
case 'v':
verbose_mode = 1;
break;
/* read-side C.S. duration, in loops */
static unsigned long rduration;
+/* write-side C.S. duration, in loops */
+static unsigned long wduration;
+
static inline void loop_sleep(unsigned long l)
{
while(l-- != 0)
new = malloc(sizeof(*new));
new->a = 8;
old = rcu_xchg_pointer(&test_rcu_pointer, new);
+ if (unlikely(wduration))
+ loop_sleep(wduration);
defer_rcu(free, old);
defer_rcu(test_cb1, old);
defer_rcu(test_cb1, (void *)-2L);
#endif
printf(" [-d delay] (writer period (us))");
printf(" [-c duration] (reader C.S. duration (in loops))");
+ printf(" [-e duration] (writer C.S. duration (in loops))");
printf(" [-v] (verbose output)");
printf(" [-a cpu#] [-a cpu#]... (affinity)");
printf("\n");
}
wdelay = atol(argv[++i]);
break;
+ case 'e':
+ if (argc < i + 2) {
+ show_usage(argc, argv);
+ return -1;
+ }
+ wduration = atol(argv[++i]);
+ break;
case 'v':
verbose_mode = 1;
break;
/* read-side C.S. duration, in loops */
static unsigned long rduration;
+/* write-side C.S. duration, in loops */
+static unsigned long wduration;
+
static inline void loop_sleep(unsigned long l)
{
while(l-- != 0)
new->a = 8;
old = rcu_xchg_pointer(&test_rcu_pointer, new);
#endif
+ if (unlikely(wduration))
+ loop_sleep(wduration);
rcu_gc_reclaim(wtidx, old);
nr_writes++;
if (unlikely(!test_duration_write()))
#endif
printf(" [-d delay] (writer period (us))");
printf(" [-c duration] (reader C.S. duration (in loops))");
+ printf(" [-e duration] (writer C.S. duration (in loops))");
printf(" [-v] (verbose output)");
printf(" [-a cpu#] [-a cpu#]... (affinity)");
printf("\n");
}
wdelay = atol(argv[++i]);
break;
+ case 'e':
+ if (argc < i + 2) {
+ show_usage(argc, argv);
+ return -1;
+ }
+ wduration = atol(argv[++i]);
+ break;
case 'v':
verbose_mode = 1;
break;