Skip to content

Commit 9c8c02d

Browse files
Qi Zhengakpm00
authored andcommitted
mm: make PT_RECLAIM depends on MMU_GATHER_RCU_TABLE_FREE
The PT_RECLAIM can work on all architectures that support MMU_GATHER_RCU_TABLE_FREE, except for those that have selected HAVE_ARCH_TLB_REMOVE_TABLE,so make PT_RECLAIM depends on MMU_GATHER_RCU_TABLE_FREE && !HAVE_ARCH_TLB_REMOVE_TABLE. BTW, change PT_RECLAIM to be enabled by default, since nobody should want to turn it off. Link: https://lkml.kernel.org/r/83b034810935a9ff18e425b085e065bb0acb28f3.1769515122.git.zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com> Acked-by: David Hildenbrand (Red Hat) <david@kernel.org> Cc: Andreas Larsson <andreas@gaisler.com> Cc: "Aneesh Kumar K.V" <aneesh.kumar@kernel.org> Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Dev Jain <dev.jain@arm.com> Cc: Helge Deller <deller@gmx.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Huacai Chen <chenhuacai@kernel.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: Lance Yang <ioworker0@gmail.com> Cc: "Liam R. Howlett" <Liam.Howlett@oracle.com> Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Cc: Magnus Lindholm <linmag7@gmail.com> Cc: Matt Turner <mattst88@gmail.com> Cc: Michal Hocko <mhocko@suse.com> Cc: Mike Rapoport <rppt@kernel.org> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Richard Henderson <richard.henderson@linaro.org> Cc: Richard Weinberger <richard@nod.at> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Cc: Thomas Gleixner <tglx@kernel.org> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: WANG Xuerui <kernel@xen0n.name> Cc: Wei Yang <richard.weiyang@gmail.com> Cc: Will Deacon <will@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 086498a commit 9c8c02d

2 files changed

Lines changed: 2 additions & 8 deletions

File tree

arch/x86/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,6 @@ config X86
331331
select FUNCTION_ALIGNMENT_4B
332332
imply IMA_SECURE_AND_OR_TRUSTED_BOOT if EFI
333333
select HAVE_DYNAMIC_FTRACE_NO_PATCHABLE
334-
select ARCH_SUPPORTS_PT_RECLAIM if X86_64
335334
select ARCH_SUPPORTS_SCHED_SMT if SMP
336335
select SCHED_SMT if SMP
337336
select ARCH_SUPPORTS_SCHED_CLUSTER if SMP

mm/Kconfig

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,14 +1451,9 @@ config ARCH_HAS_USER_SHADOW_STACK
14511451
config HAVE_ARCH_TLB_REMOVE_TABLE
14521452
def_bool n
14531453

1454-
config ARCH_SUPPORTS_PT_RECLAIM
1455-
def_bool n
1456-
14571454
config PT_RECLAIM
1458-
bool "reclaim empty user page table pages"
1459-
default y
1460-
depends on ARCH_SUPPORTS_PT_RECLAIM && MMU && SMP
1461-
select MMU_GATHER_RCU_TABLE_FREE
1455+
def_bool y
1456+
depends on MMU_GATHER_RCU_TABLE_FREE && !HAVE_ARCH_TLB_REMOVE_TABLE
14621457
help
14631458
Try to reclaim empty user page table pages in paths other than munmap
14641459
and exit_mmap path.

0 commit comments

Comments
 (0)