]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
refresh (create temporary patch)
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/refresh-temp [new file with mode: 0644]

diff --git a/meta b/meta
index 7953bdfe009730e97a4a66f22d304ea1e27ae754..3b3e632e35c9ad4dca051cf79d6bd024852a50b6 100644 (file)
--- a/meta
+++ b/meta
@@ -1,9 +1,10 @@
 Version: 1
-Previous: d7ac6c4549ccfbd7b35b0ef878155f1363e7af9e
-Head: 4b3cdaa5d7d7b873294bb6967f5c52dc7d24f246
+Previous: af20e9dcf465401e16722128a4b40ffd4c8e3e21
+Head: 2f5e1cad7ac6e2fce78085e5ae67f211d44b71a9
 Applied:
   rs-locking: c4f4253dedaacc9fa27726bda6f1167b280576ad
   comp_locks: 4b3cdaa5d7d7b873294bb6967f5c52dc7d24f246
+  refresh-temp: 2f5e1cad7ac6e2fce78085e5ae67f211d44b71a9
 Unapplied:
   preload: 5dfe7abc07064485c5100e04e5412279244c2bc3
 Hidden:
diff --git a/patches/refresh-temp b/patches/refresh-temp
new file mode 100644 (file)
index 0000000..fe297d5
--- /dev/null
@@ -0,0 +1,74 @@
+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;
+               }