From: Joao Martins <joao.m.martins@oracle.com>
To: Matthew Wilcox <willy@infradead.org>,
Anthony Yznaga <anthony.yznaga@oracle.com>
Cc: Mel Gorman <mgorman@techsingularity.net>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v2] mm: Optimise put_pages_list()
Date: Thu, 21 Oct 2021 15:41:04 +0100 [thread overview]
Message-ID: <c5b405ed-c22a-1bcd-b81f-d93b34e5a9e2@oracle.com> (raw)
In-Reply-To: <YWBS6iJr/4RJ+hNE@casper.infradead.org>
On 10/8/21 15:17, Matthew Wilcox wrote:
> On Thu, Oct 07, 2021 at 04:35:54PM -0700, Andrew Morton wrote:
>> On Thu, 7 Oct 2021 21:55:21 +0100 Matthew Wilcox <willy@infradead.org> wrote:
>>> My first response is an appeal to authority -- release_pages() does
>>> this same thing. Only it takes an array, constructs a list and passes
>>> that to put_unref_page_list(). So if that's slower (and lists _are_
>>> slower than arrays), we should have a put_unref_page_array().
>>
>> And put_unref_page_list() does two passes across the list!
>>
>> <quietly sobs>
>>
>> Here is my beautiful release_pages(), as disrtibuted in linux-2.5.33:
>
> I think that looks much better!
>
For what is worth, something that was suggested by Jason over the unpin_user_pages*
improvements series was to apply the same trick to how we iterate a page array to
release_pages(). Purpose would be to batch the page refcount update if you pass N
contiguous struct pages.
Joao
next prev parent reply other threads:[~2021-10-21 14:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-07 19:21 [PATCH v2] mm: Optimise put_pages_list() Matthew Wilcox (Oracle)
2021-10-07 19:31 ` Andrew Morton
2021-10-07 20:55 ` Matthew Wilcox
2021-10-07 23:35 ` Andrew Morton
2021-10-08 14:17 ` Matthew Wilcox
2021-10-20 22:07 ` Anthony Yznaga
2021-10-21 14:41 ` Joao Martins [this message]
2021-10-22 23:26 ` Anthony Yznaga
2021-10-23 1:13 ` Matthew Wilcox
2021-10-23 6:11 ` Anthony Yznaga
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=c5b405ed-c22a-1bcd-b81f-d93b34e5a9e2@oracle.com \
--to=joao.m.martins@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=anthony.yznaga@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--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;
as well as URLs for NNTP newsgroup(s).