Re: [PATCH v3 2/3] SUNRPC: Add svc_rqst_replace_page() API
From: Matthew Wilcox <willy@infradead.org>
Date: 2021-07-08 23:31:17
Also in:
linux-mm
From: Matthew Wilcox <willy@infradead.org>
Date: 2021-07-08 23:31:17
Also in:
linux-mm
On Thu, Jul 08, 2021 at 11:26:29AM -0400, Chuck Lever wrote:
@@ -256,6 +256,9 @@ struct svc_rqst { struct page * *rq_next_page; /* next reply page to use */ struct page * *rq_page_end; /* one past the last page */ + struct page *rq_relpages[16]; + int rq_numrelpages;
This is only one struct page away from being a pagevec ... ?
@@ -838,6 +839,33 @@ svc_set_num_threads_sync(struct svc_serv *serv, struct svc_pool *pool, int nrser } EXPORT_SYMBOL_GPL(svc_set_num_threads_sync); +static void svc_rqst_release_replaced_pages(struct svc_rqst *rqstp) +{ + release_pages(rqstp->rq_relpages, rqstp->rq_numrelpages); + rqstp->rq_numrelpages = 0;
This would be pagevec_release()