]> git.baikalelectronics.ru Git - kernel.git/commit
SUNRPC: Add svc_rqst_replace_page() API
authorChuck Lever <chuck.lever@oracle.com>
Thu, 1 Jul 2021 14:03:10 +0000 (10:03 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Tue, 17 Aug 2021 15:47:52 +0000 (11:47 -0400)
commit86b078584545a6494f7c110687c2eacdc5734c94
treef426289ca32413bb582d1b8ecb7d673d155ddc2f
parentb048721c623d72a1309bc0f795c9846bb6036898
SUNRPC: Add svc_rqst_replace_page() API

Replacing a page in rq_pages[] requires a get_page(), which is a
bus-locked operation, and a put_page(), which can be even more
costly.

To reduce the cost of replacing a page in rq_pages[], batch the
put_page() operations by collecting "freed" pages in a pagevec,
and then release those pages when the pagevec is full. This
pagevec is also emptied when each RPC completes.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
include/linux/sunrpc/svc.h
net/sunrpc/svc.c
net/sunrpc/svc_xprt.c