linux/net/sunrpc/xprtrdma
Chuck Lever ccede75985 xprtrdma: Spread reply processing over more CPUs
Commit d8f532d20e ("xprtrdma: Invoke rpcrdma_reply_handler
directly from RECV completion") introduced a performance regression
for NFS I/O small enough to not need memory registration. In multi-
threaded benchmarks that generate primarily small I/O requests,
IOPS throughput is reduced by nearly a third. This patch restores
the previous level of throughput.

Because workqueues are typically BOUND (in particular ib_comp_wq,
nfsiod_workqueue, and rpciod_workqueue), NFS/RDMA workloads tend
to aggregate on the CPU that is handling Receive completions.

The usual approach to addressing this problem is to create a QP
and CQ for each CPU, and then schedule transactions on the QP
for the CPU where you want the transaction to complete. The
transaction then does not require an extra context switch during
completion to end up on the same CPU where the transaction was
started.

This approach doesn't work for the Linux NFS/RDMA client because
currently the Linux NFS client does not support multiple connections
per client-server pair, and the RDMA core API does not make it
straightforward for ULPs to determine which CPU is responsible for
handling Receive completions for a CQ.

So for the moment, record the CPU number in the rpcrdma_req before
the transport sends each RPC Call. Then during Receive completion,
queue the RPC completion on that same CPU.

Additionally, move all RPC completion processing to the deferred
handler so that even RPCs with simple small replies complete on
the CPU that sent the corresponding RPC Call.

Fixes: d8f532d20e ("xprtrdma: Invoke rpcrdma_reply_handler ...")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2017-12-15 14:31:50 -05:00
..
backchannel.c xprtrdma: Add a field of bit flags to struct rpcrdma_req 2017-11-17 13:47:57 -05:00
fmr_ops.c xprtrdma: Remove ro_unmap_safe 2017-10-16 13:51:27 -04:00
frwr_ops.c xprtrdma: Remove atomic send completion counting 2017-11-17 13:47:58 -05:00
Makefile svcrdma: Remove svc_rdma_marshal.c 2017-06-28 14:21:43 -04:00
module.c rpcrdma: Merge svcrdma and xprtrdma modules into one 2015-06-04 16:56:02 -04:00
rpc_rdma.c xprtrdma: Spread reply processing over more CPUs 2017-12-15 14:31:50 -05:00
svc_rdma_backchannel.c NFS-over-RDMA client updates for Linux 4.14 2017-09-05 15:16:04 -04:00
svc_rdma_recvfrom.c svcrdma: Properly compute .len and .buflen for received RPC Calls 2017-07-12 15:54:57 -04:00
svc_rdma_rw.c svcrdma: Populate tail iovec when receiving 2017-09-05 15:15:29 -04:00
svc_rdma_sendto.c svcrdma: fix an incorrect check on -E2BIG and -EINVAL 2017-07-13 14:18:47 -04:00
svc_rdma_transport.c svcrdma: Estimate Send Queue depth properly 2017-09-05 15:15:31 -04:00
svc_rdma.c svcrdma: Reduce size of sge array in struct svc_rdma_op_ctxt 2017-04-25 17:25:55 -04:00
transport.c xprtrdma: Spread reply processing over more CPUs 2017-12-15 14:31:50 -05:00
verbs.c xprtrdma: Spread reply processing over more CPUs 2017-12-15 14:31:50 -05:00
xprt_rdma.h xprtrdma: Spread reply processing over more CPUs 2017-12-15 14:31:50 -05:00