From bf3a3fdeb2682e324009fee713dee15072434136 Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Thu, 17 Apr 2014 16:15:40 -0400 Subject: [PATCH] Revert "regressions: Benchmark coverage for latchlock operations." This reverts commit 24d65432e0514044965e066d426a5cac3d603972. --- regressions/ck_rwlock/benchmark/latency.c | 26 -------- regressions/ck_rwlock/benchmark/throughput.c | 66 -------------------- 2 files changed, 92 deletions(-) diff --git a/regressions/ck_rwlock/benchmark/latency.c b/regressions/ck_rwlock/benchmark/latency.c index 6808a8b..34dc406 100644 --- a/regressions/ck_rwlock/benchmark/latency.c +++ b/regressions/ck_rwlock/benchmark/latency.c @@ -55,19 +55,6 @@ main(void) e_b = rdtsc(); printf(" WRITE: rwlock %15" PRIu64 "\n", (e_b - s_b) / STEPS); - for (i = 0; i < STEPS; i++) { - ck_rwlock_write_latch(&rwlock); - ck_rwlock_write_unlatch(&rwlock); - } - - s_b = rdtsc(); - for (i = 0; i < STEPS; i++) { - ck_rwlock_write_latch(&rwlock); - ck_rwlock_write_unlatch(&rwlock); - } - e_b = rdtsc(); - printf(" LATCHWRITE: rwlock %15" PRIu64 "\n", (e_b - s_b) / STEPS); - #ifdef CK_F_PR_RTM struct ck_elide_config config = CK_ELIDE_CONFIG_DEFAULT_INITIALIZER; struct ck_elide_stat st = CK_ELIDE_STAT_INITIALIZER; @@ -112,19 +99,6 @@ main(void) e_b = rdtsc(); printf(" READ: rwlock %15" PRIu64 "\n", (e_b - s_b) / STEPS); - for (i = 0; i < STEPS; i++) { - ck_rwlock_read_latchlock(&rwlock); - ck_rwlock_read_unlock(&rwlock); - } - - s_b = rdtsc(); - for (i = 0; i < STEPS; i++) { - ck_rwlock_read_latchlock(&rwlock); - ck_rwlock_read_unlock(&rwlock); - } - e_b = rdtsc(); - printf(" LATCHREAD: rwlock %15" PRIu64 "\n", (e_b - s_b) / STEPS); - #ifdef CK_F_PR_RTM ck_elide_stat_init(&st); diff --git a/regressions/ck_rwlock/benchmark/throughput.c b/regressions/ck_rwlock/benchmark/throughput.c index 45caf0e..908348d 100644 --- a/regressions/ck_rwlock/benchmark/throughput.c +++ b/regressions/ck_rwlock/benchmark/throughput.c @@ -181,71 +181,6 @@ thread_lock(void *pun) return NULL; } -static void * -thread_lock_latch(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_rwlock_read_latchlock(&rw.lock); - ck_rwlock_read_unlock(&rw.lock); - ck_rwlock_read_latchlock(&rw.lock); - ck_rwlock_read_unlock(&rw.lock); - ck_rwlock_read_latchlock(&rw.lock); - ck_rwlock_read_unlock(&rw.lock); - ck_rwlock_read_latchlock(&rw.lock); - ck_rwlock_read_unlock(&rw.lock); - ck_rwlock_read_latchlock(&rw.lock); - ck_rwlock_read_unlock(&rw.lock); - ck_rwlock_read_latchlock(&rw.lock); - ck_rwlock_read_unlock(&rw.lock); - ck_rwlock_read_latchlock(&rw.lock); - ck_rwlock_read_unlock(&rw.lock); - ck_rwlock_read_latchlock(&rw.lock); - ck_rwlock_read_unlock(&rw.lock); - ck_rwlock_read_latchlock(&rw.lock); - ck_rwlock_read_unlock(&rw.lock); - ck_rwlock_read_latchlock(&rw.lock); - ck_rwlock_read_unlock(&rw.lock); - ck_rwlock_read_latchlock(&rw.lock); - ck_rwlock_read_unlock(&rw.lock); - ck_rwlock_read_latchlock(&rw.lock); - ck_rwlock_read_unlock(&rw.lock); - ck_rwlock_read_latchlock(&rw.lock); - ck_rwlock_read_unlock(&rw.lock); - ck_rwlock_read_latchlock(&rw.lock); - ck_rwlock_read_unlock(&rw.lock); - ck_rwlock_read_latchlock(&rw.lock); - ck_rwlock_read_unlock(&rw.lock); - ck_rwlock_read_latchlock(&rw.lock); - ck_rwlock_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 rwlock_test(pthread_t *p, int d, uint64_t *latency, void *(*f)(void *), const char *label) { @@ -309,7 +244,6 @@ main(int argc, char *argv[]) d = atoi(argv[1]); rwlock_test(p, d, latency, thread_lock, "rwlock"); - rwlock_test(p, d, latency, thread_lock_latch, "rwlock, latch"); #ifdef CK_F_PR_RTM rwlock_test(p, d, latency, thread_lock_rtm, "rwlock, rtm");