]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
refresh
authorSean Hefty <sean.hefty@intel.com>
Wed, 9 May 2012 22:04:10 +0000 (15:04 -0700)
committerSean Hefty <sean.hefty@intel.com>
Wed, 9 May 2012 22:04:10 +0000 (15:04 -0700)
meta
patches/comp_locks
patches/refresh-temp [deleted file]

diff --git a/meta b/meta
index 3b3e632e35c9ad4dca051cf79d6bd024852a50b6..930d730283776403d65bb9fbff240281b52dc62c 100644 (file)
--- 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:
index d9d169f3570c94e5f5c6a3acdccd65096e492ff9..4d58c19ce9a730491dc77f954e8a4ab094fe305c 100644 (file)
@@ -1,5 +1,5 @@
 Bottom: b2e4cd7d670a626fa22b05cff6a1dccc973e9f0d
-Top:    b2e4cd7d670a626fa22b05cff6a1dccc973e9f0d
+Top:    45f68867f729e3cb78043b0ed09f9ef47ece464f
 Author: Sean Hefty <sean.hefty@intel.com>
 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 <rdma/rdma_cma.h>
+ #include <rdma/rsocket.h>
++#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 (file)
index fe297d5..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-Bottom: b2e4cd7d670a626fa22b05cff6a1dccc973e9f0d
-Top:    45f68867f729e3cb78043b0ed09f9ef47ece464f
-Author: Sean Hefty <sean.hefty@intel.com>
-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 <rdma/rdma_cma.h>
- #include <rdma/rsocket.h>
-+#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;
-               }