Commit 647a2a64 authored by Chuck Lever's avatar Chuck Lever

SUNRPC: Convert svc_xprt_release() to the release_pages() API

Instead of invoking put_page() one-at-a-time, pass the "response"
portion of rq_pages directly to release_pages() to reduce the number
of times each nfsd thread invokes a page allocator API.

Since svc_xprt_release() is not invoked while a client is waiting
for an RPC Reply, this is not expected to directly impact mean
request latencies on a lightly or moderately loaded server. However
as workload intensity increases, I expect somewhat better
scalability: the same number of server threads should be able to
handle more work.
Reviewed-by: default avatarCalum Mackay <calum.mackay@oracle.com>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent b20cb39d
...@@ -878,13 +878,12 @@ EXPORT_SYMBOL_GPL(svc_rqst_replace_page); ...@@ -878,13 +878,12 @@ EXPORT_SYMBOL_GPL(svc_rqst_replace_page);
*/ */
void svc_rqst_release_pages(struct svc_rqst *rqstp) void svc_rqst_release_pages(struct svc_rqst *rqstp)
{ {
while (rqstp->rq_next_page != rqstp->rq_respages) { int i, count = rqstp->rq_next_page - rqstp->rq_respages;
struct page **pp = --rqstp->rq_next_page;
if (*pp) { if (count) {
put_page(*pp); release_pages(rqstp->rq_respages, count);
*pp = NULL; for (i = 0; i < count; i++)
} rqstp->rq_respages[i] = NULL;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment