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: 2fad659209d5 ("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
..
2018-04-16 11:53:35 +01:00
2017-12-13 15:10:01 -05:00
2019-05-07 11:34:19 -07:00
2017-11-17 14:58:01 -08:00
2017-11-17 09:51:57 -08:00
2019-03-27 15:52:01 -03:00
2017-09-25 20:38:26 +02:00
2018-07-26 10:17:47 +02:00
2018-02-13 21:30:22 +01:00
2017-12-19 10:56:24 +01:00
2019-05-09 14:33:15 -07:00
2019-03-24 20:29:33 +01:00