[openib-general] RDMA Read performance - svn diff

Galen Shipman gshipman at lanl.gov
Fri Aug 19 07:22:09 PDT 2005


Hello,

I am seeing BW of ~192 MB/sec using RDMA Write as opposed to ~950MB/sec 
using RDMA Read,
Any ideas?


> Normally patches should be attached as "plain text"

Here is the svn diff to gen2/src/userspace/perftest/rdma_bw.c to make 
it use RDMA Read instead or RDMA Write:


Index: rdma_bw.c
===================================================================
--- rdma_bw.c   (revision 3134)
+++ rdma_bw.c   (working copy)
@@ -299,7 +299,7 @@
         }

         ctx->mr = ibv_reg_mr(ctx->pd, ctx->buf, size * 2,
-                            IBV_ACCESS_REMOTE_WRITE);
+                            IBV_ACCESS_LOCAL_WRITE | 
IBV_ACCESS_REMOTE_WRITE | IBV_ACCESS_REMOTE_READ);
         if (!ctx->mr) {
                 fprintf(stderr, "Couldn't allocate MR\n");
                 return NULL;
@@ -340,7 +340,7 @@
                 attr.qp_state        = IBV_QPS_INIT;
                 attr.pkey_index      = 0;
                 attr.port_num        = port;
-               attr.qp_access_flags = IBV_ACCESS_REMOTE_WRITE;
+               attr.qp_access_flags = IBV_ACCESS_REMOTE_WRITE | 
IBV_ACCESS_REMOTE_READ;

                 if (ibv_modify_qp(ctx->qp, &attr,
                                   IBV_QP_STATE              |
@@ -664,7 +664,7 @@
         ctx->wr.wr_id      = PINGPONG_RDMA_WRID;
         ctx->wr.sg_list    = &ctx->list;
         ctx->wr.num_sge    = 1;
-       ctx->wr.opcode     = IBV_WR_RDMA_WRITE;
+       ctx->wr.opcode     = IBV_WR_RDMA_READ;
         ctx->wr.send_flags = IBV_SEND_SIGNALED;
         ctx->wr.next       = NULL;




More information about the general mailing list