[RFC PATCH v2 2/7] mm: introduce CONFIG_PT_RECLAIM

Qi Zheng posted 7 patches 1 year, 6 months ago
There is a newer version of this series
[RFC PATCH v2 2/7] mm: introduce CONFIG_PT_RECLAIM
Posted by Qi Zheng 1 year, 6 months ago
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 --git a/mm/Kconfig b/mm/Kconfig
index 3936fe4d26d91..c10741c54dcb1 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -1278,6 +1278,20 @@ config NUMA_EMU
 	  into virtual nodes when booted with "numa=fake=N", where N is the
 	  number of nodes. This is only useful for debugging.
 
+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
-- 
2.20.1
Re: [RFC PATCH v2 2/7] mm: introduce CONFIG_PT_RECLAIM
Posted by David Hildenbrand 1 year, 6 months ago
On 05.08.24 14:55, Qi Zheng wrote:
> 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.

Please squash this into #4

-- 
Cheers,

David / dhildenb
Re: [RFC PATCH v2 2/7] mm: introduce CONFIG_PT_RECLAIM
Posted by Qi Zheng 1 year, 6 months ago

On 2024/8/6 22:25, David Hildenbrand wrote:
> On 05.08.24 14:55, Qi Zheng wrote:
>> 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.
> 
> Please squash this into #4

OK, will do.

>