diff --git a/regressions/ck_swlock/benchmark/latency.c b/regressions/ck_swlock/benchmark/latency.c index aeb3e8a..7261546 100644 --- a/regressions/ck_swlock/benchmark/latency.c +++ b/regressions/ck_swlock/benchmark/latency.c @@ -81,20 +81,6 @@ main(void) e_b = rdtsc(); printf(" LATCH: swlock %15" PRIu64 "\n", (e_b - s_b) / STEPS); - for (i = 0; i < STEPS; i++) { - ck_swlock_read_latchlock(&swlock); - ck_swlock_read_unlock(&swlock); - } - - s_b = rdtsc(); - for (i = 0; i < STEPS; i++) { - ck_swlock_read_latchlock(&swlock); - ck_swlock_read_unlock(&swlock); - } - e_b = rdtsc(); - printf(" READ_LATCHLOCK: swlock %15" PRIu64 "\n", (e_b - s_b) / STEPS); - - return 0; } diff --git a/regressions/ck_swlock/benchmark/throughput.c b/regressions/ck_swlock/benchmark/throughput.c index 1b79f82..fa3cf1c 100644 --- a/regressions/ck_swlock/benchmark/throughput.c +++ b/regressions/ck_swlock/benchmark/throughput.c @@ -114,71 +114,6 @@ thread_lock(void *pun) return NULL; } -static void * -thread_latchlock(void *pun) -{ - uint64_t s_b, e_b, a, i; - uint64_t *value = pun; - - if (aff_iterate(&affinity) != 0) { - perror("ERROR: Could not affine thread"); - exit(EXIT_FAILURE); - } - - ck_pr_inc_int(&barrier); - while (ck_pr_load_int(&barrier) != threads) - ck_pr_stall(); - - for (i = 1, a = 0;; i++) { - s_b = rdtsc(); - ck_swlock_read_latchlock(&rw.lock); - ck_swlock_read_unlock(&rw.lock); - ck_swlock_read_latchlock(&rw.lock); - ck_swlock_read_unlock(&rw.lock); - ck_swlock_read_latchlock(&rw.lock); - ck_swlock_read_unlock(&rw.lock); - ck_swlock_read_latchlock(&rw.lock); - ck_swlock_read_unlock(&rw.lock); - ck_swlock_read_latchlock(&rw.lock); - ck_swlock_read_unlock(&rw.lock); - ck_swlock_read_latchlock(&rw.lock); - ck_swlock_read_unlock(&rw.lock); - ck_swlock_read_latchlock(&rw.lock); - ck_swlock_read_unlock(&rw.lock); - ck_swlock_read_latchlock(&rw.lock); - ck_swlock_read_unlock(&rw.lock); - ck_swlock_read_latchlock(&rw.lock); - ck_swlock_read_unlock(&rw.lock); - ck_swlock_read_latchlock(&rw.lock); - ck_swlock_read_unlock(&rw.lock); - ck_swlock_read_latchlock(&rw.lock); - ck_swlock_read_unlock(&rw.lock); - ck_swlock_read_latchlock(&rw.lock); - ck_swlock_read_unlock(&rw.lock); - ck_swlock_read_latchlock(&rw.lock); - ck_swlock_read_unlock(&rw.lock); - ck_swlock_read_latchlock(&rw.lock); - ck_swlock_read_unlock(&rw.lock); - ck_swlock_read_latchlock(&rw.lock); - ck_swlock_read_unlock(&rw.lock); - ck_swlock_read_latchlock(&rw.lock); - ck_swlock_read_unlock(&rw.lock); - e_b = rdtsc(); - - a += (e_b - s_b) >> 4; - - if (ck_pr_load_uint(&flag) == 1) - break; - } - - ck_pr_inc_int(&barrier); - while (ck_pr_load_int(&barrier) != threads * 2) - ck_pr_stall(); - - *value = (a / i); - return NULL; -} - static void swlock_test(pthread_t *p, int d, uint64_t *latency, void *(*f)(void *), const char *label) { @@ -242,7 +177,6 @@ main(int argc, char *argv[]) d = atoi(argv[1]); swlock_test(p, d, latency, thread_lock, "swlock"); - swlock_test(p, d, latency, thread_latchlock, "swlock_latchlock"); return 0; }