linux-stable/net/sunrpc
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
..
auth_gss NFS client updates for Linux 4.13 2017-07-13 14:35:37 -07:00
xprtrdma xprtrdma: Spread reply processing over more CPUs 2017-12-15 14:31:50 -05:00
addr.c replace strict_strto calls 2014-07-12 18:45:49 -04:00
auth.c sched/headers: Prepare to remove <linux/cred.h> inclusion from <linux/sched.h> 2017-03-02 08:42:31 +01:00
auth_generic.c NFS client updates for Linux 4.9 2016-10-13 21:28:20 -07:00
auth_null.c sunrpc: remove dead codes of cr_magic in rpc_cred 2017-02-08 17:02:46 -05:00
auth_unix.c sunrpc: rename NFS_NGROUPS to UNX_NGROUPS for auth unix 2017-02-08 17:02:45 -05:00
backchannel_rqst.c SUNRPC: Don't hold the transport lock when receiving backchannel data 2017-08-16 15:10:16 -04:00
cache.c NFS client updates for Linux 4.11 2017-03-01 16:10:30 -08:00
clnt.c SUNRPC: Handle ENETDOWN errors 2017-11-30 11:52:52 -05:00
debugfs.c sunrpc: record rpc client pointer in seq->private directly 2017-02-08 17:02:47 -05:00
Kconfig svcrdma: Introduce local rdma_rw API helpers 2017-04-25 17:25:55 -04:00
Makefile SUNRPC: Add a structure to track multiple transports 2016-02-05 18:48:54 -05:00
netns.h netns: make struct pernet_operations::id unsigned int 2016-11-18 10:59:15 -05:00
rpc_pipe.c sunrpc: remove net pointer from messages 2017-11-17 16:43:51 -05:00
rpcb_clnt.c sunrpc: remove net pointer from messages 2017-11-17 16:43:51 -05:00
sched.c sunrpc: Fix rpc_task_begin trace point 2017-11-17 16:43:44 -05:00
socklib.c sunrpc: do not pull udp headers on receive 2016-04-11 15:31:33 -04:00
stats.c sunrpc: move pc_count out of struct svc_procinfo 2017-07-13 15:58:02 -04:00
sunrpc.h
sunrpc_syms.c sunrpc: exit_net cleanup check added 2017-11-17 16:43:50 -05:00
svc.c sunrpc: Const-ify struct sv_serv_ops 2017-08-24 22:13:50 -04:00
svc_xprt.c sunrpc: Allocate up to RPCSVC_MAXPAGES per svc_rqst 2017-07-12 15:54:55 -04:00
svcauth.c locking/atomic, kref: Implement kref_put_lock() 2017-01-18 10:03:29 +01:00
svcauth_unix.c sunrpc: rename NFS_NGROUPS to UNX_NGROUPS for auth unix 2017-02-08 17:02:45 -05:00
svcsock.c NFS client updates for Linux 4.14 2017-09-11 22:01:44 -07:00
sysctl.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
timer.c
xdr.c sunrpc: Fix xdr_init_decode_pages() documenting comment 2017-04-25 16:12:34 -04:00
xprt.c net: sunrpc: mark expected switch fall-throughs 2017-11-17 16:43:44 -05:00
xprtmultipath.c SUNRPC search xprt switch for sockaddr 2016-09-19 13:08:36 -04:00
xprtsock.c SUNRPC: Handle ENETDOWN errors 2017-11-30 11:52:52 -05:00