SUNRPC: Optimize page release in svc_rdma_sendto()
authorChuck Lever <chuck.lever@oracle.com>
Mon, 12 Jun 2023 14:10:27 +0000 (10:10 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Sat, 17 Jun 2023 17:18:06 +0000 (13:18 -0400)
commit5581cf8efc3863e3831a3ee50854e823ec618df8
treef4479f00f9349499b137024fff2b9d41f7d6074b
parentbaf6d18b116b7dc84ed5e212c3a89f17cdc3f28c
SUNRPC: Optimize page release in svc_rdma_sendto()

Now that we have bulk page allocation and release APIs, it's more
efficient to use those than it is for nfsd threads to wait for send
completions. Previous patches have eliminated the calls to
wait_for_completion() and complete(), in order to avoid scheduler
overhead.

Now release pages-under-I/O in the send completion handler using
the efficient bulk release API.

I've measured a 7% reduction in cumulative CPU utilization in
svc_rdma_sendto(), svc_rdma_wc_send(), and svc_xprt_release(). In
particular, using release_pages() instead of complete() cuts the
time per svc_rdma_wc_send() call by two-thirds. This helps improve
scalability because svc_rdma_wc_send() is single-threaded per
connection.

Reviewed-by: Tom Talpey <tom@talpey.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
net/sunrpc/xprtrdma/svc_rdma_sendto.c