From: Chuck Lever III <chuck.lever@oracle.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
Neil Brown <neilb@suse.de>
Subject: Re: [PATCH v3 2/3] SUNRPC: Add svc_rqst_replace_page() API
Date: Fri, 9 Jul 2021 03:04:44 +0000 [thread overview]
Message-ID: <958500C2-5570-4B04-9C62-5F971A12D018@oracle.com> (raw)
In-Reply-To: <YOeKsmTT5L9qjvXN@casper.infradead.org>
> On Jul 8, 2021, at 7:30 PM, Matthew Wilcox <willy@infradead.org> wrote:
>
> 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()
986 void __pagevec_release(struct pagevec *pvec)
987 {
988 if (!pvec->percpu_pvec_drained) {
989 lru_add_drain();
990 pvec->percpu_pvec_drained = true;
991 }
992 release_pages(pvec->pages, pagevec_count(pvec));
993 pagevec_reinit(pvec);
994 }
Pretty much the same under the bonnet. Fair enough!
--
Chuck Lever
next prev parent reply other threads:[~2021-07-09 3:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-08 15:26 [PATCH v3 0/3] Bulk-release pages during NFSD read splice Chuck Lever
2021-07-08 15:26 ` [PATCH v3 1/3] NFSD: Clean up splice actor Chuck Lever
2021-07-08 15:26 ` [PATCH v3 2/3] SUNRPC: Add svc_rqst_replace_page() API Chuck Lever
2021-07-08 23:30 ` Matthew Wilcox
2021-07-09 3:04 ` Chuck Lever III [this message]
2021-07-08 15:26 ` [PATCH v3 3/3] NFSD: Batch release pages during splice read Chuck Lever
2021-07-08 23:23 ` [PATCH v3 0/3] Bulk-release pages during NFSD read splice NeilBrown
2021-07-09 2:58 ` Chuck Lever III
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=958500C2-5570-4B04-9C62-5F971A12D018@oracle.com \
--to=chuck.lever@oracle.com \
--cc=linux-mm@kvack.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox