diff mbox series

[RFC,2/7] mm: introduce CONFIG_PT_RECLAIM

Message ID 58942ecf91fea0a62307e5ab848228142a1270ac.1719570849.git.zhengqi.arch@bytedance.com (mailing list archive)
State New
Headers show
Series synchronously scan and reclaim empty user PTE pages | expand

Commit Message

Qi Zheng July 1, 2024, 8:46 a.m. UTC
This configuration variable will be used to build the code needed
to free empty user page table pages.

This feature is not available on all architectures yet, so
ARCH_SUPPORTS_PT_RECLAIM is needed. We can remove it once all
architectures support this feature.

Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com>
---
 mm/Kconfig | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
diff mbox series

Patch

diff --git a/mm/Kconfig b/mm/Kconfig
index 991fa9cf6137..7e2c87784d86 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -1256,6 +1256,20 @@  config IOMMU_MM_DATA
 config EXECMEM
 	bool
 
+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
+	select MMU_GATHER_RCU_TABLE_FREE
+	help
+	  Try to reclaim empty user page table pages in paths other that munmap
+	  and exit_mmap path.
+
+	  Note: now only empty user PTE page table pages will be reclaimed.
+
 source "mm/damon/Kconfig"
 
 endmenu