lkml.org 
[lkml]   [2022]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm: gup: fix the fast GUP race against THP collapse
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.

--
Peter Xu

\
 
 \ /
  Last update: 2022-09-02 22:35    [W:0.091 / U:2.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site