From: NeilBrown <neilb@suse.de>
To: "J. Bruce Fields" <bfields@fieldses.org>,
Chuck Lever <chuck.lever@oracle.com>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: releasing result pages in svc_xprt_release()
Date: Mon, 08 Feb 2021 10:59:24 +1100 [thread overview]
Message-ID: <871rdre8f7.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <20210205211351.GC32030@fieldses.org>
[-- Attachment #1: Type: text/plain, Size: 1516 bytes --]
On Fri, Feb 05 2021, J. Bruce Fields wrote:
> On Fri, Feb 05, 2021 at 08:20:28PM +0000, Chuck Lever wrote:
>> Baby steps.
>>
>> Because I'm perverse I started with bulk page freeing. In the course
>> of trying to invent a new API, I discovered there already is a batch
>> free_page() function called release_pages().
>>
>> It seems to work as advertised for pages that are truly no longer
>> in use (ie RPC/RDMA pages) but not for pages that are still in flight
>> but released (ie TCP pages).
>>
>> release_pages() chains the pages in the passed-in array onto a list
>> by their page->lru fields. This seems to be a problem if a page
>> is still in use.
>
> I thought I remembered reading an lwn article about bulk page
> allocation. Looking around now all I can see is
>
> https://lwn.net/Articles/684616/
> https://lwn.net/Articles/711075/
The work in this last one seems to have been merged, without the
alloc_pages_bulk() as foretold in the article. i.e. __rmqueue_pcp_list
has been split out.
Adding that alloc_page_bulk() for testing should be fairly easy
http://lkml.iu.edu/hypermail/linux/kernel/1701.1/00732.html
If you can show a benefit in a real use-case, it shouldn't be too hard
to get this API accepted.
> Therefore, IMO concentrating on making svc_alloc_arg() more efficient
> should provide the biggest bang for both socket and RDMA transports.
I agree that this is the best first step. It might make the other steps
irrelevant.
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 853 bytes --]
next prev parent reply other threads:[~2021-02-08 0:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-29 16:19 releasing result pages in svc_xprt_release() Chuck Lever
2021-01-29 22:43 ` NeilBrown
2021-01-29 23:06 ` Chuck Lever
2021-01-31 23:45 ` NeilBrown
2021-02-01 0:19 ` Chuck Lever
2021-02-01 23:27 ` NeilBrown
2021-02-05 20:20 ` Chuck Lever
2021-02-05 21:13 ` J. Bruce Fields
2021-02-06 17:59 ` Chuck Lever
2021-02-07 23:59 ` NeilBrown [this message]
2021-02-07 23:42 ` NeilBrown
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=871rdre8f7.fsf@notabene.neil.brown.name \
--to=neilb@suse.de \
--cc=bfields@fieldses.org \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.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