Skip to content

Commit cce6dee

Browse files
chuckleveramschuma-ntap
authored andcommitted
xprtrdma: Avoid using Write list for small NFS READ requests
Avoid the latency and interrupt overhead of registering a Write chunk when handling NFS READ requests of a few hundred bytes or less. This change does not interoperate with Linux NFS/RDMA servers that do not have commit 9d11b51 ('svcrdma: Fix send_reply() scatter/gather set-up'). Commit 9d11b51 was introduced in v4.3, and is included in 4.2.y, 4.1.y, and 3.18.y. Oracle bug 22925946 has been filed to request that the above fix be included in the Oracle Linux UEK4 NFS/RDMA server. Red Hat bugzillas 1327280 and 1327554 have been filed to request that RHEL NFS/RDMA server backports include the above fix. Workaround: Replace the "proto=rdma,port=20049" mount options with "proto=tcp" until commit 9d11b51 is applied to your NFS server. Signed-off-by: Chuck Lever <[email protected]> Tested-by: Steve Wise <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
1 parent 302d3de commit cce6dee

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

net/sunrpc/xprtrdma/rpc_rdma.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -539,15 +539,16 @@ rpcrdma_marshal_req(struct rpc_rqst *rqst)
539539
/*
540540
* Chunks needed for results?
541541
*
542-
* o Read ops return data as write chunk(s), header as inline.
543542
* o If the expected result is under the inline threshold, all ops
544543
* return as inline.
544+
* o Large read ops return data as write chunk(s), header as
545+
* inline.
545546
* o Large non-read ops return as a single reply chunk.
546547
*/
547-
if (rqst->rq_rcv_buf.flags & XDRBUF_READ)
548-
wtype = rpcrdma_writech;
549-
else if (rpcrdma_results_inline(r_xprt, rqst))
548+
if (rpcrdma_results_inline(r_xprt, rqst))
550549
wtype = rpcrdma_noch;
550+
else if (rqst->rq_rcv_buf.flags & XDRBUF_READ)
551+
wtype = rpcrdma_writech;
551552
else
552553
wtype = rpcrdma_replych;
553554

0 commit comments

Comments
 (0)