lkml.org 
[lkml]   [2022]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] mm: gup: fix the fast GUP race against THP collapse
Date
Peter Xu <peterx@redhat.com> writes:

>
> On Fri, Sep 02, 2022 at 10:45:20AM -0700, Yang Shi wrote:
>> > How about another patch to remove the ppc impl too? Then it can be a two
>> > patches series.
>>
>> BTW, I don't think we could remove the ppc implementation since it is
>> different from the generic pmdp_collapse_flush(), particularly for the
>> hash part IIUC.
>>
>> The generic version calls flush_tlb_range() -> hash__flush_tlb_range()
>> for hash, but the hash call is actually no-op. The ppc version calls
>> hash__pmdp_collapse_flush() -> flush_tlb_pmd_range(), which does
>> something useful.
>
> One thing I found interesting (and also a bit confused..) is that the ppc
> code used the name flush_tlb_pmd_range() to "flush tlb range in pte level",
> which is kind of against the tlb API design..
>
> The generic tlb API has a very close function called flush_pmd_tlb_range()
> which is only used to do pmd-level flushing, while here the ppc version of
> flush_tlb_pmd_range() is actually flush_tlb_range() in the generic API.
>
> Agreed that it may worth having a look from ppc developers.
>

It is actually flushing the hash page table entries. I will rename
flush_tlb_pmd_range to flush_hash_table_pmd_range().

-aneesh

\
 
 \ /
  Last update: 2022-09-05 10:58    [W:0.093 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site