linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Qi Zheng <zhengqi.arch@bytedance.com>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: CONFIG_PT_RECLAIM
Date: Thu, 27 Feb 2025 11:04:51 +0800	[thread overview]
Message-ID: <a77923d3-ce26-4e29-bb98-b908ce2355c2@bytedance.com> (raw)
In-Reply-To: <20250226183013.GB1042@cmpxchg.org>

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"
>   



  reply	other threads:[~2025-02-27  3:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-26 18:30 CONFIG_PT_RECLAIM Johannes Weiner
2025-02-27  3:04 ` Qi Zheng [this message]
2025-02-27  6:08   ` CONFIG_PT_RECLAIM Johannes Weiner
2025-02-27  6:58     ` CONFIG_PT_RECLAIM Qi Zheng
2025-02-27  7:40       ` CONFIG_PT_RECLAIM Qi Zheng
2025-02-27  9:54 ` CONFIG_PT_RECLAIM David Hildenbrand

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=a77923d3-ce26-4e29-bb98-b908ce2355c2@bytedance.com \
    --to=zhengqi.arch@bytedance.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox