]> git.baikalelectronics.ru Git - kernel.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)
commitaf08a20db372838243598239c9cbdd06e649edc0
tree946c3cd8c965bfe66291c8c1e01524f63c45d3b3
parent8eb39860e9ff3a03f72fa93c77bd87b3748748d2
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