From: Sean Hefty Date: Wed, 9 May 2012 22:04:10 +0000 (-0700) Subject: refresh X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=d3db8eb601f92b63f7ff5bbecd3afb6e1daa9e8e;p=~shefty%2Flibrdmacm.git refresh --- diff --git a/meta b/meta index 3b3e632e..930d7302 100644 --- a/meta +++ b/meta @@ -1,10 +1,9 @@ Version: 1 -Previous: af20e9dcf465401e16722128a4b40ffd4c8e3e21 -Head: 2f5e1cad7ac6e2fce78085e5ae67f211d44b71a9 +Previous: b18784b5c9ecb82d032e5130db838d7408239b00 +Head: b89aab130b4619806557e11e6b9c10964f00743f Applied: rs-locking: c4f4253dedaacc9fa27726bda6f1167b280576ad - comp_locks: 4b3cdaa5d7d7b873294bb6967f5c52dc7d24f246 - refresh-temp: 2f5e1cad7ac6e2fce78085e5ae67f211d44b71a9 + comp_locks: b89aab130b4619806557e11e6b9c10964f00743f Unapplied: preload: 5dfe7abc07064485c5100e04e5412279244c2bc3 Hidden: diff --git a/patches/comp_locks b/patches/comp_locks index d9d169f3..4d58c19c 100644 --- a/patches/comp_locks +++ b/patches/comp_locks @@ -1,5 +1,5 @@ Bottom: b2e4cd7d670a626fa22b05cff6a1dccc973e9f0d -Top: b2e4cd7d670a626fa22b05cff6a1dccc973e9f0d +Top: 45f68867f729e3cb78043b0ed09f9ef47ece464f Author: Sean Hefty Date: 2012-05-09 14:54:17 -0700 @@ -8,4 +8,68 @@ compare fastlock versus mutex --- - +diff --git a/examples/rstream.c b/examples/rstream.c +index 8aa089d..8c4cfdc 100644 +--- a/examples/rstream.c ++++ b/examples/rstream.c +@@ -44,6 +44,9 @@ + + #include + #include ++#include "../src/cma.h" ++ ++static int test_mutex; + + static int test_size[] = { + 64, +@@ -276,12 +279,31 @@ static int sync_test(int rs) + static int run_test(int rs) + { + int ret, i, t; ++ fastlock_t fl; ++ pthread_mutex_t mut; + ++ fastlock_init(&fl); ++ pthread_mutex_init(&mut, NULL); + ret = sync_test(rs); + if (ret) + goto out; + ++ printf("test mutex %s\n", test_mutex == 1 ? "fastlock" : "mutex/none"); + gettimeofday(&start, NULL); ++ if (test_mutex) { ++ if (test_mutex == 1) { ++ for (i = 0; i < 2000000000; i++) { ++ fastlock_acquire(&fl); ++ fastlock_release(&fl); ++ } ++ } else { ++ for (i = 0; i < 2000000000; i++) { ++ pthread_mutex_lock(&mut); ++ pthread_mutex_unlock(&mut); ++ } ++ } ++ } ++ + for (i = 0; i < iterations; i++) { + for (t = 0; t < transfer_count; t++) { + ret = dst_addr ? send_xfer(rs, transfer_size) : +@@ -302,6 +324,8 @@ static int run_test(int rs) + ret = 0; + + out: ++ fastlock_destroy(&fl); ++ pthread_mutex_destroy(&mut); + return ret; + } + +@@ -497,6 +521,9 @@ static int set_test_opt(char *optarg) + case 'v': + verify = 1; + break; ++ case 'm': ++ test_mutex++; ++ break; + default: + return -1; + } diff --git a/patches/refresh-temp b/patches/refresh-temp deleted file mode 100644 index fe297d5e..00000000 --- a/patches/refresh-temp +++ /dev/null @@ -1,74 +0,0 @@ -Bottom: b2e4cd7d670a626fa22b05cff6a1dccc973e9f0d -Top: 45f68867f729e3cb78043b0ed09f9ef47ece464f -Author: Sean Hefty -Date: 2012-05-09 15:04:10 -0700 - -Refresh of comp_locks - ---- - -diff --git a/examples/rstream.c b/examples/rstream.c -index 8aa089d..8c4cfdc 100644 ---- a/examples/rstream.c -+++ b/examples/rstream.c -@@ -44,6 +44,9 @@ - - #include - #include -+#include "../src/cma.h" -+ -+static int test_mutex; - - static int test_size[] = { - 64, -@@ -276,12 +279,31 @@ static int sync_test(int rs) - static int run_test(int rs) - { - int ret, i, t; -+ fastlock_t fl; -+ pthread_mutex_t mut; - -+ fastlock_init(&fl); -+ pthread_mutex_init(&mut, NULL); - ret = sync_test(rs); - if (ret) - goto out; - -+ printf("test mutex %s\n", test_mutex == 1 ? "fastlock" : "mutex/none"); - gettimeofday(&start, NULL); -+ if (test_mutex) { -+ if (test_mutex == 1) { -+ for (i = 0; i < 2000000000; i++) { -+ fastlock_acquire(&fl); -+ fastlock_release(&fl); -+ } -+ } else { -+ for (i = 0; i < 2000000000; i++) { -+ pthread_mutex_lock(&mut); -+ pthread_mutex_unlock(&mut); -+ } -+ } -+ } -+ - for (i = 0; i < iterations; i++) { - for (t = 0; t < transfer_count; t++) { - ret = dst_addr ? send_xfer(rs, transfer_size) : -@@ -302,6 +324,8 @@ static int run_test(int rs) - ret = 0; - - out: -+ fastlock_destroy(&fl); -+ pthread_mutex_destroy(&mut); - return ret; - } - -@@ -497,6 +521,9 @@ static int set_test_opt(char *optarg) - case 'v': - verify = 1; - break; -+ case 'm': -+ test_mutex++; -+ break; - default: - return -1; - }