OSDN Git Service

SUNRPC: Be even lazier about releasing pages
authorChuck Lever <chuck.lever@oracle.com>
Sat, 15 Apr 2023 00:18:15 +0000 (20:18 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Thu, 27 Apr 2023 22:49:23 +0000 (18:49 -0400)
commit6a0cdf56bfc9a1791ddd6955d60f3678523e599c
treea5b156e0b6fbe3979be4da99385e23061fed2570
parent647a2a6428f2cd01e53079ac16e17fdeff229e68
SUNRPC: Be even lazier about releasing pages

A single RPC transaction that touches only a couple of pages means
rq_pvec will not be even close to full in svc_xpt_release(). This is
a common case.

Instead, just leave the pages in rq_pvec until it is completely
full. This improves the efficiency of the batch release mechanism
on workloads that involve small RPC messages.

The rq_pvec is also fully emptied just before thread exit.

Reviewed-by: Calum Mackay <calum.mackay@oracle.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
net/sunrpc/svc.c
net/sunrpc/svc_xprt.c