]> 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)
commita945f9691b906f1f08a0dae8cee640debb1b1813
tree946c3cd8c965bfe66291c8c1e01524f63c45d3b3
parente3c701a5450f0aed901b6b6811736154b882b5a7
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