svcrdma: Single-stage RDMA Read
authorChuck Lever <chuck.lever@oracle.com>
Tue, 22 Dec 2020 18:22:20 +0000 (13:22 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Wed, 31 Mar 2021 19:57:39 +0000 (15:57 -0400)
commit7d81ee8722d69f753c88e7d594790fa10a384f1a
treebe43bbe533a2c8f3a333286256199bd1df536b06
parent82011c80b3ec0e05940a2ee2c76c1df9fd2b1ce8
svcrdma: Single-stage RDMA Read

Currently the generic RPC server layer calls svc_rdma_recvfrom()
twice to retrieve an RPC message that uses Read chunks. I'm not
exactly sure why this design was chosen originally.

Instead, let's wait for the Read chunk completion inline in the
first call to svc_rdma_recvfrom().

The goal is to eliminate some page allocator churn.
rdma_read_complete() replaces pages in the second svc_rqst by
calling put_page() repeatedly while the upper layer waits for the
request to be constructed, which adds unnecessary NFS WRITE round-
trip latency.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Tom Talpey <tom@talpey.com>
net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
net/sunrpc/xprtrdma/svc_rdma_rw.c