Re: [PATCH v1] mm/gup: adjust stale comment for RCU GUP-fast

From: David Hildenbrand
Date: Thu Sep 01 2022 - 12:30:20 EST


On 01.09.22 18:12, Jason Gunthorpe wrote:
> On Thu, Sep 01, 2022 at 09:21:19AM +0200, David Hildenbrand wrote:
>> commit 4b471e8898c3 ("mm, thp: remove infrastructure for handling splitting
>> PMDs") didn't remove all details about the THP split requirements for
>> RCU GUP-fast.
>>
>> IPI broeadcasts on THP split are no longer required.
>>
>> Cc: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
>> Cc: Sasha Levin <sasha.levin@xxxxxxxxxx>
>> Cc: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxxxxxxx>
>> Cc: Vlastimil Babka <vbabka@xxxxxxx>
>> Cc: Jerome Marchand <jmarchan@xxxxxxxxxx>
>> Cc: Andrea Arcangeli <aarcange@xxxxxxxxxx>
>> Cc: Hugh Dickins <hughd@xxxxxxxxxx>
>> Cc: Jason Gunthorpe <jgg@xxxxxxxxxx>
>> Cc: John Hubbard <jhubbard@xxxxxxxxxx>
>> Cc: Peter Xu <peterx@xxxxxxxxxx>
>> Cc: Yang Shi <shy828301@xxxxxxxxx>
>> Signed-off-by: David Hildenbrand <david@xxxxxxxxxx>
>> ---
>> mm/gup.c | 5 ++---
>> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> The comment a bit above seems to need touching to:
>
> * protected from page table pages being freed from under it, and should
> * block any THP splits.

Ah right. Will drop it as well -- thanks!

>
> What is the current situation for THP splits anyhow? Is there are
> comment in the fast pmd code explaining it?

Not aware of a comment, I think it just works naturally by always
re-routing references taken on tail pages to the head page refcount.

Before that, we had "Tail page refcounting", which -- as I understand --
was a mess.

ddc58f27f9eee9117219936f77e90ad5b2e00e96 contains some comments.

>
> But this seems OK too
>
> Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
>
> Jason
>


--
Thanks,

David / dhildenb