[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c35de63b-c0c6-47b3-95e2-d37ed3801b13@bytedance.com>
Date: Thu, 5 Dec 2024 11:35:00 +0800
From: Qi Zheng <zhengqi.arch@...edance.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: david@...hat.com, jannh@...gle.com, hughd@...gle.com,
willy@...radead.org, muchun.song@...ux.dev, vbabka@...nel.org,
peterx@...hat.com, mgorman@...e.de, catalin.marinas@....com,
will@...nel.org, dave.hansen@...ux.intel.com, luto@...nel.org,
peterz@...radead.org, x86@...nel.org, lorenzo.stoakes@...cle.com,
zokeefe@...gle.com, rientjes@...gle.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 09/11] mm: pgtable: reclaim empty PTE page in
madvise(MADV_DONTNEED)
On 2024/12/5 06:36, Andrew Morton wrote:
> On Wed, 4 Dec 2024 19:09:49 +0800 Qi Zheng <zhengqi.arch@...edance.com> wrote:
>
[...]
>>
>> --- a/mm/Kconfig
>> +++ b/mm/Kconfig
>> @@ -1301,6 +1301,21 @@ 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
>> + select MMU_GATHER_RCU_TABLE_FREE
>> + help
>> + Try to reclaim empty user page table pages in paths other than munmap
>> + and exit_mmap path.
>> +
>> + Note: now only empty user PTE page table pages will be reclaimed.
>> +
>
> Why is this optional? What is the case for permitting PT_RECLAIM to e
> disabled?
>
To reclaim the empty PTE pages, we need to free the PTE page through
RCU, which requires modifying the implementation in each architecture.
Making it an option will make it easier to gradually add support for
each architecture. And for now, we have only added support for x86.
Powered by blists - more mailing lists