Message ID | 20210414085915.301189-1-aneesh.kumar@linux.ibm.com (mailing list archive) |
---|---|
Headers | show |
Series | Speedup mremap on ppc64 | expand |
"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com> writes: > Architectures like ppc64 support faster mremap only with radix > translation. Hence allow a runtime check w.r.t support for fast mremap. > > Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> > --- > arch/powerpc/include/asm/tlb.h | 6 ++++++ > mm/mremap.c | 15 ++++++++++++++- > 2 files changed, 20 insertions(+), 1 deletion(-) > > diff --git a/arch/powerpc/include/asm/tlb.h b/arch/powerpc/include/asm/tlb.h > index 160422a439aa..058918a7cd3c 100644 > --- a/arch/powerpc/include/asm/tlb.h > +++ b/arch/powerpc/include/asm/tlb.h > @@ -83,5 +83,11 @@ static inline int mm_is_thread_local(struct mm_struct *mm) > } > #endif > > +#define arch_supports_page_tables_move arch_supports_page_tables_move > +static inline bool arch_supports_page_tables_move(void) > +{ > + return radix_enabled(); > +} Not sure it's worth a respin on its own, but page table*s* move is slightly strange phrasing. arch_supports_move_page_tables() or arch_supports_page_table_move() would be more typical. cheers
On 4/20/21 9:22 AM, Michael Ellerman wrote: > "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com> writes: >> Architectures like ppc64 support faster mremap only with radix >> translation. Hence allow a runtime check w.r.t support for fast mremap. >> >> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> >> --- >> arch/powerpc/include/asm/tlb.h | 6 ++++++ >> mm/mremap.c | 15 ++++++++++++++- >> 2 files changed, 20 insertions(+), 1 deletion(-) >> >> diff --git a/arch/powerpc/include/asm/tlb.h b/arch/powerpc/include/asm/tlb.h >> index 160422a439aa..058918a7cd3c 100644 >> --- a/arch/powerpc/include/asm/tlb.h >> +++ b/arch/powerpc/include/asm/tlb.h >> @@ -83,5 +83,11 @@ static inline int mm_is_thread_local(struct mm_struct *mm) >> } >> #endif >> >> +#define arch_supports_page_tables_move arch_supports_page_tables_move >> +static inline bool arch_supports_page_tables_move(void) >> +{ >> + return radix_enabled(); >> +} > > Not sure it's worth a respin on its own, but page table*s* move is > slightly strange phrasing. > > arch_supports_move_page_tables() or arch_supports_page_table_move() > would be more typical. > I will switch to arch_supports_page_table_move() -aneesh