xprtrdma: Count RDMA_NOMSG type calls
authorChuck Lever <chuck.lever@oracle.com>
Mon, 3 Aug 2015 17:04:45 +0000 (13:04 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 5 Aug 2015 20:21:28 +0000 (16:21 -0400)
RDMA_NOMSG type calls are less efficient than RDMA_MSG. Count NOMSG
calls so administrators can tell if they happen to be used more than
expected.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Tested-by: Devesh Sharma <devesh.sharma@avagotech.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtrdma/rpc_rdma.c
net/sunrpc/xprtrdma/transport.c
net/sunrpc/xprtrdma/xprt_rdma.h

index 272158623b00ae4063f69ab6d913ade9ce323af8..bc8bd6577467d5d2346b452a3c0d3c65411b3639 100644 (file)
@@ -489,6 +489,7 @@ rpcrdma_marshal_req(struct rpc_rqst *rqst)
        } else if (rqst->rq_snd_buf.flags & XDRBUF_WRITE) {
                rtype = rpcrdma_readch;
        } else {
+               r_xprt->rx_stats.nomsg_call_count++;
                headerp->rm_type = htonl(RDMA_NOMSG);
                rtype = rpcrdma_areadch;
                rpclen = 0;
index 0985b2b5de9d3aaeab0891259d64ee8af6f16140..64443eb754ad0fe7fd0b16633c3aa10cebdc3e26 100644 (file)
@@ -659,7 +659,7 @@ static void xprt_rdma_print_stats(struct rpc_xprt *xprt, struct seq_file *seq)
                   xprt->stat.bad_xids,
                   xprt->stat.req_u,
                   xprt->stat.bklog_u);
-       seq_printf(seq, "%lu %lu %lu %llu %llu %llu %llu %lu %lu %lu\n",
+       seq_printf(seq, "%lu %lu %lu %llu %llu %llu %llu %lu %lu %lu %lu\n",
                   r_xprt->rx_stats.read_chunk_count,
                   r_xprt->rx_stats.write_chunk_count,
                   r_xprt->rx_stats.reply_chunk_count,
@@ -669,7 +669,8 @@ static void xprt_rdma_print_stats(struct rpc_xprt *xprt, struct seq_file *seq)
                   r_xprt->rx_stats.fixup_copy_count,
                   r_xprt->rx_stats.hardway_register_count,
                   r_xprt->rx_stats.failed_marshal_count,
-                  r_xprt->rx_stats.bad_reply_count);
+                  r_xprt->rx_stats.bad_reply_count,
+                  r_xprt->rx_stats.nomsg_call_count);
 }
 
 static int
index 8422c09043b0eef0cc2e7d88af5dfdac70acff24..d252457ff21a71567844b9f92cfc3345ecccfc34 100644 (file)
@@ -340,6 +340,7 @@ struct rpcrdma_stats {
        unsigned long           hardway_register_count;
        unsigned long           failed_marshal_count;
        unsigned long           bad_reply_count;
+       unsigned long           nomsg_call_count;
 };
 
 /*