linux-stable/net/sunrpc/xprtrdma
Chuck Lever 3316f06311 svcrdma: Persistently allocate and DMA-map Receive buffers
The current Receive path uses an array of pages which are allocated
and DMA mapped when each Receive WR is posted, and then handed off
to the upper layer in rqstp::rq_arg. The page flip releases unused
pages in the rq_pages pagelist. This mechanism introduces a
significant amount of overhead.

So instead, kmalloc the Receive buffer, and leave it DMA-mapped
while the transport remains connected. This confers a number of
benefits:

* Each Receive WR requires only one receive SGE, no matter how large
  the inline threshold is. This helps the server-side NFS/RDMA
  transport operate on less capable RDMA devices.

* The Receive buffer is left allocated and mapped all the time. This
  relieves svc_rdma_post_recv from the overhead of allocating and
  DMA-mapping a fresh buffer.

* svc_rdma_wc_receive no longer has to DMA unmap the Receive buffer.
  It has to DMA sync only the number of bytes that were received.

* svc_rdma_build_arg_xdr no longer has to free a page in rq_pages
  for each page in the Receive buffer, making it a constant-time
  function.

* The Receive buffer is now plugged directly into the rq_arg's
  head[0].iov_vec, and can be larger than a page without spilling
  over into rq_arg's page list. This enables simplification of
  the RDMA Read path in subsequent patches.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2018-05-11 15:48:57 -04:00
..
backchannel.c svcrdma: Trace key RDMA API events 2018-05-11 15:48:57 -04:00
fmr_ops.c svcrdma: Trace key RDMA API events 2018-05-11 15:48:57 -04:00
frwr_ops.c svcrdma: Trace key RDMA API events 2018-05-11 15:48:57 -04:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
module.c xprtrdma: Prepare RPC/RDMA includes for server-side trace points 2018-05-11 15:48:57 -04:00
rpc_rdma.c svcrdma: Trace key RDMA API events 2018-05-11 15:48:57 -04:00
svc_rdma.c xprtrdma: Prepare RPC/RDMA includes for server-side trace points 2018-05-11 15:48:57 -04:00
svc_rdma_backchannel.c svcrdma: Trace key RDMA API events 2018-05-11 15:48:57 -04:00
svc_rdma_recvfrom.c svcrdma: Persistently allocate and DMA-map Receive buffers 2018-05-11 15:48:57 -04:00
svc_rdma_rw.c svcrdma: Persistently allocate and DMA-map Receive buffers 2018-05-11 15:48:57 -04:00
svc_rdma_sendto.c svcrdma: Persistently allocate and DMA-map Receive buffers 2018-05-11 15:48:57 -04:00
svc_rdma_transport.c svcrdma: Persistently allocate and DMA-map Receive buffers 2018-05-11 15:48:57 -04:00
transport.c svcrdma: Trace key RDMA API events 2018-05-11 15:48:57 -04:00
verbs.c xprtrdma: Prepare RPC/RDMA includes for server-side trace points 2018-05-11 15:48:57 -04:00
xprt_rdma.h xprtrdma: Prepare RPC/RDMA includes for server-side trace points 2018-05-11 15:48:57 -04:00