]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xprtrdma: Micro-optimize MR DMA-unmapping
authorChuck Lever <chuck.lever@oracle.com>
Mon, 9 Nov 2020 19:40:19 +0000 (14:40 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 11 Nov 2020 15:57:39 +0000 (10:57 -0500)
commit7a03aeb66c410366acc5439ae2a341f110c4f845
tree946c3cd8c965bfe66291c8c1e01524f63c45d3b3
parentef2be5918ff57bea9cd1e63968c73b1358a765ca
xprtrdma: Micro-optimize MR DMA-unmapping

Now that rpcrdma_ep is no longer part of rpcrdma_xprt, there are
four or five serial address dereferences needed to get to the
IB device needed for DMA unmapping.

Instead, let's use the same pattern that regbufs use: cache a
pointer to the device in the MR, and use that as the indication
that unmapping is necessary.

This also guarantees that the exact same device is used for DMA
mapping and unmapping, even if the r_xprt's ep has been replaced. I
don't think this can happen today, but future changes might break
this assumption.

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