]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xprtrdma: Acquire MRs in rpcrdma_register_external()
authorChuck Lever <chuck.lever@oracle.com>
Tue, 25 Aug 2015 18:49:26 +0000 (12:49 -0600)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 31 Aug 2015 20:45:56 +0000 (14:45 -0600)
commit6844c3728b49bf7b15329c51c0cec512dbd897b8
tree603f11cdb438c217c4ff6680303e7579e964d0e6
parent5470258f9fe3dfeb0e2536e0574b5e7d0644220a
xprtrdma: Acquire MRs in rpcrdma_register_external()

[ Upstream commit c14d86e5913564a6e9313a78604a7caf899c063f ]

Acquiring 64 MRs in rpcrdma_buffer_get() while holding the buffer
pool lock is expensive, and unnecessary because most modern adapters
can transfer 100s of KBs of payload using just a single MR.

Instead, acquire MRs one-at-a-time as chunks are registered, and
return them to rb_mws immediately during deregistration.

Note: commit 539431a437d2 ("xprtrdma: Don't invalidate FRMRs if
registration fails") is reverted: There is now a valid case where
registration can fail (with -ENOMEM) but the QP is still in RTS.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Tested-By: Devesh Sharma <devesh.sharma@avagotech.com>
Reviewed-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtrdma/frwr_ops.c
net/sunrpc/xprtrdma/rpc_rdma.c
net/sunrpc/xprtrdma/verbs.c