linux/net/sunrpc/xprtrdma
Chuck Lever cace564f8b svcrdma: Tail iovec leaves an orphaned DMA mapping
The ctxt's count field is overloaded to mean the number of pages in
the ctxt->page array and the number of SGEs in the ctxt->sge array.
Typically these two numbers are the same.

However, when an inline RPC reply is constructed from an xdr_buf
with a tail iovec, the head and tail often occupy the same page,
but each are DMA mapped independently. In that case, ->count equals
the number of pages, but it does not equal the number of SGEs.
There's one more SGE, for the tail iovec. Hence there is one more
DMA mapping than there are pages in the ctxt->page array.

This isn't a real problem until the server's iommu is enabled. Then
each RPC reply that has content in that iovec orphans a DMA mapping
that consists of real resources.

krb5i and krb5p always populate that tail iovec. After a couple
million sent krb5i/p RPC replies, the NFS server starts behaving
erratically. Reboot is needed to clear the problem.

Fixes: 9d11b51ce7 ("svcrdma: Fix send_reply() scatter/gather set-up")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2016-09-23 10:18:52 -04:00
..
backchannel.c sunrpc: Advertise maximum backchannel payload size 2016-05-17 15:47:57 -04:00
fmr_ops.c xprtrdma: Place registered MWs on a per-req list 2016-07-11 15:50:43 -04:00
frwr_ops.c xprtrdma: Place registered MWs on a per-req list 2016-07-11 15:50:43 -04:00
Makefile xprtrdma: Remove ALLPHYSICAL memory registration mode 2016-07-11 15:50:43 -04:00
module.c rpcrdma: Merge svcrdma and xprtrdma modules into one 2015-06-04 16:56:02 -04:00
rpc_rdma.c xprtrdma: No direct data placement with krb5i and krb5p 2016-07-11 15:50:43 -04:00
svc_rdma_backchannel.c svcrdma: Tail iovec leaves an orphaned DMA mapping 2016-09-23 10:18:52 -04:00
svc_rdma_marshal.c svcrdma: Generalize svc_rdma_xdr_decode_req() 2016-05-13 15:53:06 -04:00
svc_rdma_recvfrom.c svcrdma: Tail iovec leaves an orphaned DMA mapping 2016-09-23 10:18:52 -04:00
svc_rdma_sendto.c svcrdma: Tail iovec leaves an orphaned DMA mapping 2016-09-23 10:18:52 -04:00
svc_rdma_transport.c svcrdma: Tail iovec leaves an orphaned DMA mapping 2016-09-23 10:18:52 -04:00
svc_rdma.c svcrdma: Define maximum number of backchannel requests 2016-01-19 15:30:48 -05:00
transport.c xprtrdma: Place registered MWs on a per-req list 2016-07-11 15:50:43 -04:00
verbs.c xprtrdma: fix semicolon.cocci warnings 2016-07-19 16:56:12 -04:00
xprt_rdma.h xprtrdma: Chunk list encoders no longer share one rl_segments array 2016-07-11 15:50:43 -04:00