From: Dev Jain <dev.jain@arm.com>
To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
dave.hansen@linux.intel.com, x86@kernel.org,
catalin.marinas@arm.com, will@kernel.org,
akpm@linux-foundation.org, david@redhat.com, hannes@cmpxchg.org
Cc: ryan.roberts@arm.com, hpa@zytor.com, lorenzo.stoakes@oracle.com,
Liam.Howlett@oracle.com, vbabka@suse.cz, ppt@kernel.org,
surenb@google.com, mhocko@suse.com, zhengqi.arch@bytedance.com,
shakeel.butt@linux.dev, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, Dev Jain <dev.jain@arm.com>
Subject: [RFC PATCH] mm: Enable CONFIG_PT_RECLAIM on all architectures
Date: Mon, 3 Nov 2025 12:07:18 +0530 [thread overview]
Message-ID: <20251103063718.90743-1-dev.jain@arm.com> (raw)
The implementation of CONFIG_PT_RECLAIM is completely contained in generic
mm code. It depends on the RCU callback which will reclaim the pagetables -
there is nothing arch-specific about that. So, enable this config for
all architectures.
Signed-off-by: Dev Jain <dev.jain@arm.com>
---
arch/x86/Kconfig | 1 -
mm/Kconfig | 5 +----
mm/pt_reclaim.c | 2 +-
3 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index fa3b616af03a..5681308a5650 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -327,7 +327,6 @@ config X86
select FUNCTION_ALIGNMENT_4B
imply IMA_SECURE_AND_OR_TRUSTED_BOOT if EFI
select HAVE_DYNAMIC_FTRACE_NO_PATCHABLE
- select ARCH_SUPPORTS_PT_RECLAIM if X86_64
select ARCH_SUPPORTS_SCHED_SMT if SMP
select SCHED_SMT if SMP
select ARCH_SUPPORTS_SCHED_CLUSTER if SMP
diff --git a/mm/Kconfig b/mm/Kconfig
index 0e26f4fc8717..903c37d02555 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -1355,13 +1355,10 @@ config ARCH_HAS_USER_SHADOW_STACK
The architecture has hardware support for userspace shadow call
stacks (eg, x86 CET, arm64 GCS or RISC-V Zicfiss).
-config ARCH_SUPPORTS_PT_RECLAIM
- def_bool n
-
config PT_RECLAIM
bool "reclaim empty user page table pages"
default y
- depends on ARCH_SUPPORTS_PT_RECLAIM && MMU && SMP
+ depends on MMU && SMP
select MMU_GATHER_RCU_TABLE_FREE
help
Try to reclaim empty user page table pages in paths other than munmap
diff --git a/mm/pt_reclaim.c b/mm/pt_reclaim.c
index 7e9455a18aae..049e17f08c6a 100644
--- a/mm/pt_reclaim.c
+++ b/mm/pt_reclaim.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/hugetlb.h>
-#include <asm-generic/tlb.h>
+#include <asm/tlb.h>
#include <asm/pgalloc.h>
#include "internal.h"
--
2.30.2
next reply other threads:[~2025-11-03 6:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-03 6:37 Dev Jain [this message]
2025-11-03 7:03 ` [RFC PATCH] mm: Enable CONFIG_PT_RECLAIM on all architectures Qi Zheng
2025-11-03 8:43 ` Dev Jain
2025-11-03 9:07 ` Qi Zheng
2025-11-04 4:02 ` Dev Jain
2025-11-04 6:33 ` Qi Zheng
2025-11-04 13:13 ` Lance Yang
2025-11-04 13:21 ` Dev Jain
2025-11-04 13:15 ` Lance Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251103063718.90743-1-dev.jain@arm.com \
--to=dev.jain@arm.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=dave.hansen@linux.intel.com \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mhocko@suse.com \
--cc=mingo@redhat.com \
--cc=ppt@kernel.org \
--cc=ryan.roberts@arm.com \
--cc=shakeel.butt@linux.dev \
--cc=surenb@google.com \
--cc=tglx@linutronix.de \
--cc=vbabka@suse.cz \
--cc=will@kernel.org \
--cc=x86@kernel.org \
--cc=zhengqi.arch@bytedance.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.