Commit e340c2d6 authored by Chuck Lever's avatar Chuck Lever Committed by Anna Schumaker

xprtrdma: Reduce the doorbell rate (Receive)

Post RECV WRs in batches to reduce the hardware doorbell rate per
transport. This helps the RPC-over-RDMA client scale better in
number of transports.
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent d4550bbe
...@@ -1480,6 +1480,8 @@ rpcrdma_post_recvs(struct rpcrdma_xprt *r_xprt, bool temp) ...@@ -1480,6 +1480,8 @@ rpcrdma_post_recvs(struct rpcrdma_xprt *r_xprt, bool temp)
if (ep->rep_receive_count > needed) if (ep->rep_receive_count > needed)
goto out; goto out;
needed -= ep->rep_receive_count; needed -= ep->rep_receive_count;
if (!temp)
needed += RPCRDMA_MAX_RECV_BATCH;
count = 0; count = 0;
wr = NULL; wr = NULL;
......
...@@ -205,6 +205,16 @@ struct rpcrdma_rep { ...@@ -205,6 +205,16 @@ struct rpcrdma_rep {
struct ib_recv_wr rr_recv_wr; struct ib_recv_wr rr_recv_wr;
}; };
/* To reduce the rate at which a transport invokes ib_post_recv
* (and thus the hardware doorbell rate), xprtrdma posts Receive
* WRs in batches.
*
* Setting this to zero disables Receive post batching.
*/
enum {
RPCRDMA_MAX_RECV_BATCH = 7,
};
/* struct rpcrdma_sendctx - DMA mapped SGEs to unmap after Send completes /* struct rpcrdma_sendctx - DMA mapped SGEs to unmap after Send completes
*/ */
struct rpcrdma_req; struct rpcrdma_req;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment