[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bb46d28c-57e3-4cfd-b5b3-e4c6db1f003f@linux.ibm.com>
Date: Sun, 4 Sep 2022 22:19:54 +0530
From: Aneesh Kumar K V <aneesh.kumar@...ux.ibm.com>
To: David Hildenbrand <david@...hat.com>, Peter Xu <peterx@...hat.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
Sasha Levin <sasha.levin@...cle.com>,
"Aneesh Kumar K . V" <aneesh.kumar@...ux.vnet.ibm.com>,
Vlastimil Babka <vbabka@...e.cz>,
Jerome Marchand <jmarchan@...hat.com>,
Andrea Arcangeli <aarcange@...hat.com>,
Hugh Dickins <hughd@...gle.com>,
Jason Gunthorpe <jgg@...dia.com>,
John Hubbard <jhubbard@...dia.com>,
Yang Shi <shy828301@...il.com>
Subject: Re: [PATCH v1] mm/gup: adjust stale comment for RCU GUP-fast
On 9/1/22 10:04 PM, David Hildenbrand wrote:
> On 01.09.22 18:28, Peter Xu 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@...ux.intel.com>
>>> Cc: Sasha Levin <sasha.levin@...cle.com>
>>> Cc: Aneesh Kumar K.V <aneesh.kumar@...ux.vnet.ibm.com>
>>> Cc: Vlastimil Babka <vbabka@...e.cz>
>>> Cc: Jerome Marchand <jmarchan@...hat.com>
>>> Cc: Andrea Arcangeli <aarcange@...hat.com>
>>> Cc: Hugh Dickins <hughd@...gle.com>
>>> Cc: Jason Gunthorpe <jgg@...dia.com>
>>> Cc: John Hubbard <jhubbard@...dia.com>
>>> Cc: Peter Xu <peterx@...hat.com>
>>> Cc: Yang Shi <shy828301@...il.com>
>>> Signed-off-by: David Hildenbrand <david@...hat.com>
>>> ---
>>> mm/gup.c | 5 ++---
>>> 1 file changed, 2 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/mm/gup.c b/mm/gup.c
>>> index 5abdaf487460..cfe71f422787 100644
>>> --- a/mm/gup.c
>>> +++ b/mm/gup.c
>>> @@ -2309,9 +2309,8 @@ EXPORT_SYMBOL(get_user_pages_unlocked);
>>> *
>>> * Another way to achieve this is to batch up page table containing pages
>>> * belonging to more than one mm_user, then rcu_sched a callback to free those
>>> - * pages. Disabling interrupts will allow the fast_gup walker to both block
>>> - * the rcu_sched callback, and an IPI that we broadcast for splitting THPs
>>> - * (which is a relatively rare event). The code below adopts this strategy.
>>> + * pages. Disabling interrupts will allow the fast_gup walker to block the
>>> + * rcu_sched callback.
>>
>> This is the comment for fast-gup in general but not only for thp split.
>
> "an IPI that we broadcast for splitting THP" is about splitting THP.
>
>>
>> I can understand that we don't need IPI for thp split, but isn't the IPIs
>> still needed for thp collapse (aka pmdp_collapse_flush)?
>
> That was, unfortunately, never documented -- and as discussed in the
> other thread, arm64 doesn't do that IPI before collapse and might need
> fixing. We'll most probably end up getting rid of that
> (undocumented/forgotten) IPI requirement and fix it in GUP-fast by
> re-rechecking if the PMD changed.
>
Can you point to the other thread ?
-aneesh
Powered by blists - more mailing lists