[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87b7f24d-0065-9f55-5c96-e7853b2e8068@oracle.com>
Date: Thu, 11 Feb 2021 10:45:02 +0000
From: Joao Martins <joao.m.martins@...cle.com>
To: Jason Gunthorpe <jgg@...pe.ca>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
linux-rdma@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Doug Ledford <dledford@...hat.com>,
John Hubbard <jhubbard@...dia.com>,
Matthew Wilcox <willy@...radead.org>
Subject: Re: [PATCH v3 1/4] mm/gup: add compound page list iterator
On 2/10/21 11:20 PM, Jason Gunthorpe wrote:
> On Fri, Feb 05, 2021 at 08:41:24PM +0000, Joao Martins wrote:
>> Add an helper that iterates over head pages in a list of pages. It
>> essentially counts the tails until the next page to process has a
>> different head that the current. This is going to be used by
>> unpin_user_pages() family of functions, to batch the head page refcount
>> updates once for all passed consecutive tail pages.
>>
>> Suggested-by: Jason Gunthorpe <jgg@...dia.com>
>> Signed-off-by: Joao Martins <joao.m.martins@...cle.com>
>> Reviewed-by: John Hubbard <jhubbard@...dia.com>
>> ---
>> mm/gup.c | 26 ++++++++++++++++++++++++++
>> 1 file changed, 26 insertions(+)
>
> Reviewed-by: Jason Gunthorpe <jgg@...dia.com>
>
Thanks!
> This can be used for check_and_migrate_cma_pages() too (there is a
> series around to change this logic though, not sure if it is landed
> yet)
It got unqueued AFAIUI.
It makes sense for most users today except hugetlb pages, which are also
the fastest page pinner today. And unilaterally using this iterator makes
all page types pay the added cost. So either keeping the current loop having
the exception to PageHuge() head pages, or doing it correctly with that
split logic we were talking on the other thread.
Joao
Powered by blists - more mailing lists