]> asedeno.scripts.mit.edu Git - linux.git/commit
xprtrdma: Use an llist to manage free rpcrdma_reps
authorChuck Lever <chuck.lever@oracle.com>
Mon, 19 Aug 2019 22:48:43 +0000 (18:48 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 21 Aug 2019 15:45:27 +0000 (11:45 -0400)
commitb0b227f071a06d0ce5ef803538899299933d2931
treea4d8eaa70289da84c14a528cbc38257bc53f9994
parent4d6b8890ddb16120c5dd25edc8d215cfd8222b63
xprtrdma: Use an llist to manage free rpcrdma_reps

rpcrdma_rep objects are removed from their free list by only a
single thread: the Receive completion handler. Thus that free list
can be converted to an llist, where a single-threaded consumer and
a multi-threaded producer (rpcrdma_buffer_put) can both access the
llist without the need for any serialization.

This eliminates spin lock contention between the Receive completion
handler and rpcrdma_buffer_get, and makes the rep consumer wait-
free.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtrdma/verbs.c
net/sunrpc/xprtrdma/xprt_rdma.h