lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a77923d3-ce26-4e29-bb98-b908ce2355c2@bytedance.com>
Date: Thu, 27 Feb 2025 11:04:51 +0800
From: Qi Zheng <zhengqi.arch@...edance.com>
To: Johannes Weiner <hannes@...xchg.org>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: CONFIG_PT_RECLAIM

Hi Johannes,

On 2/27/25 2:30 AM, Johannes Weiner wrote:
> Does PT_RECLAIM need to be configurable by the user?

The PT_RECLAIM will select MMU_GATHER_RCU_TABLE_FREE, but not all archs
support MMU_GATHER_RCU_TABLE_FREE, and even before Rik's a37259732a7dc 
("x86/mm: Make MMU_GATHER_RCU_TABLE_FREE unconditional"), x86 only
supports MMU_GATHER_RCU_TABLE_FREE in the case of PARAVIRT.

Therefore, PT_RECLAIM also implies the meaning of enabling
MMU_GATHER_RCU_TABLE_FREE, so I made it user-configurable. And I just
thought that as a new feature, it would be better to give users the
ability to turn it on and off.

> 
> Why not always try to free the page tables if the arch supports it?

If so, maybe changing

select MMU_GATHER_RCU_TABLE_FREE

to

depends on MMU_GATHER_RCU_TABLE_FREE

would be better?

> 
> diff --git a/mm/Kconfig b/mm/Kconfig
> index 2761098dbc1a..99383c93db33 100644
> --- a/mm/Kconfig
> +++ b/mm/Kconfig
> @@ -1309,16 +1309,9 @@ config ARCH_SUPPORTS_PT_RECLAIM
>   	def_bool n
>   
>   config PT_RECLAIM
> -	bool "reclaim empty user page table pages"
> -	default y
> +	def_bool 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.
> -

Maybe keep the help information?

Thanks,
Qi

>   
>   source "mm/damon/Kconfig"
>   


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ