linux/net/sunrpc
Chuck Lever 05eb06d866 xprtrdma: Fix occasional transport deadlock
Under high I/O workloads, I've noticed that an RPC/RDMA transport
occasionally deadlocks (IOPS goes to zero, and doesn't recover).
Diagnosis shows that the sendctx queue is empty, but when sendctxs
are returned to the queue, the xprt_write_space wake-up never
occurs. The wake-up logic in rpcrdma_sendctx_put_locked is racy.

I noticed that both EMPTY_SCQ and XPRT_WRITE_SPACE are implemented
via an atomic bit. Just one of those is sufficient. Removing
EMPTY_SCQ in favor of the generic bit mechanism makes the deadlock
un-reproducible.

Without EMPTY_SCQ, rpcrdma_buffer::rb_flags is no longer used and
is therefore removed.

Unfortunately this patch does not apply cleanly to stable. If
needed, someone will have to port it and test it.

Fixes: 2fad659209 ("xprtrdma: Wait on empty sendctx queue")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2019-07-09 10:30:16 -04:00
..
auth_gss This pull consists mostly of nfsd container work: 2019-05-15 18:21:43 -07:00
xprtrdma xprtrdma: Fix occasional transport deadlock 2019-07-09 10:30:16 -04:00
addr.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
auth_null.c SUNRPC: Add rpc_auth::au_ralign field 2019-02-14 11:48:36 -05:00
auth_unix.c SUNRPC: Use the client user namespace when encoding creds 2019-04-26 16:24:32 -04:00
auth.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
backchannel_rqst.c SUNRPC: Allow dynamic allocation of back channel slots 2019-03-02 16:25:26 -05:00
cache.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 363 2019-06-05 17:37:09 +02:00
clnt.c SUNRPC: Fix a use after free when a server rejects the RPCSEC_GSS credential 2019-05-30 15:29:41 -04:00
debugfs.c SUNRPC: Fix up tracking of timeouts 2019-04-25 14:18:13 -04:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile SUNRPC: remove generic cred code. 2018-12-19 13:52:46 -05:00
netns.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rpc_pipe.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
rpcb_clnt.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
sched.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
socklib.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
stats.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
sunrpc_syms.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
sunrpc.h sunrpc: whitespace fixes 2018-07-31 12:53:40 -04:00
svc_xprt.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
svc.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
svcauth_unix.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
svcauth.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
svcsock.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
sysctl.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
timer.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
xdr.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
xprt.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
xprtmultipath.c SUNRPC: Fix some kernel doc complaints 2019-01-02 12:05:18 -05:00
xprtsock.c SUNRPC: Add tracking of RPC level errors 2019-04-25 14:18:13 -04:00