Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: Calum Mackay <calum.mackay@oracle.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

+5 -6
+5 -6
net/sunrpc/svc.c
··· 878 878 */ 879 879 void svc_rqst_release_pages(struct svc_rqst *rqstp) 880 880 { 881 - while (rqstp->rq_next_page != rqstp->rq_respages) { 882 - struct page **pp = --rqstp->rq_next_page; 881 + int i, count = rqstp->rq_next_page - rqstp->rq_respages; 883 882 884 - if (*pp) { 885 - put_page(*pp); 886 - *pp = NULL; 887 - } 883 + if (count) { 884 + release_pages(rqstp->rq_respages, count); 885 + for (i = 0; i < count; i++) 886 + rqstp->rq_respages[i] = NULL; 888 887 } 889 888 } 890 889