[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c5b405ed-c22a-1bcd-b81f-d93b34e5a9e2@oracle.com>
Date: Thu, 21 Oct 2021 15:41:04 +0100
From: Joao Martins <joao.m.martins@...cle.com>
To: Matthew Wilcox <willy@...radead.org>,
Anthony Yznaga <anthony.yznaga@...cle.com>
Cc: Mel Gorman <mgorman@...hsingularity.net>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v2] mm: Optimise put_pages_list()
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@...radead.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
Powered by blists - more mailing lists