linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: SeongJae Park <sj@kernel.org>
To: Enze Li <lienze@kylinos.cn>
Cc: SeongJae Park <sj@kernel.org>,
	akpm@linux-foundation.org, damon@lists.linux.dev,
	linux-mm@kvack.org, enze.li@gmx.com
Subject: Re: [PATCH] mm/damon/Kconfig: enforce DAMON_STAT when DAMON_STAT_ENABLED_DEFAULT is selected
Date: Thu, 14 Aug 2025 09:24:46 -0700	[thread overview]
Message-ID: <20250814162446.69575-1-sj@kernel.org> (raw)
In-Reply-To: <20250814121703.648925-1-lienze@kylinos.cn>

Hi Enze,

On Thu, 14 Aug 2025 20:17:03 +0800 Enze Li <lienze@kylinos.cn> wrote:

> The DAMON_STAT_ENABLED_DEFAULT option is strongly tied to
> DAMON_STAT -- enabling it alone is meaningless.

Nice catch, thank you Enze!

> This patch modifies the
> logic to automatically enable DAMON_STAT whenever
> DAMON_STAT_ENABLED_DEFAULT is selected, ensuring functional consistency.
> 
> Signed-off-by: Enze Li <lienze@kylinos.cn>
> ---
>  mm/damon/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/damon/Kconfig b/mm/damon/Kconfig
> index b3171f9406c1..5bc71354e6f3 100644
> --- a/mm/damon/Kconfig
> +++ b/mm/damon/Kconfig
> @@ -105,7 +105,7 @@ config DAMON_STAT
>  config DAMON_STAT_ENABLED_DEFAULT
>  	bool "Enable DAMON_STAT by default"
>  	depends on DAMON_PADDR
> -	default DAMON_STAT
> +	select DAMON_STAT

I don't think we need to drop 'default DAMON_STAT', though.

To me, it seems the problem is the wrong dependency.  What about making
DAMON_STAT_ENABLED_DEFAULT depends on DAMON_STAT, like below?

"""
diff --git a/mm/damon/Kconfig b/mm/damon/Kconfig
index ecbdb3e2ae58..d5f8db812dd3 100644
--- a/mm/damon/Kconfig
+++ b/mm/damon/Kconfig
@@ -104,7 +104,7 @@ config DAMON_STAT

 config DAMON_STAT_ENABLED_DEFAULT
        bool "Enable DAMON_STAT by default"
-       depends on DAMON_PADDR
+       depends on DAMON_STAT
        default DAMON_STAT
        help
          Whether to enable DAMON_STAT by default.  Users can disable it in
"""

Also, the subject sounds like a bit strong tone ("enforce").  How about

"mm/damon/Kconfig: make DAMON_STAT_ENABLED_DEFAULT depends on DAMON_STAT" ?

>  	help
>  	  Whether to enable DAMON_STAT by default.  Users can disable it in
>  	  boot or runtime using its 'enabled' parameter.
> 
> base-commit: 0cc53520e68bea7fb80fdc6bdf8d226d1b6a98d9
> -- 
> 2.43.0


Thanks,
SJ


  reply	other threads:[~2025-08-14 16:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-14 12:17 Enze Li
2025-08-14 16:24 ` SeongJae Park [this message]
2025-08-15  9:15   ` Enze Li

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=20250814162446.69575-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=damon@lists.linux.dev \
    --cc=enze.li@gmx.com \
    --cc=lienze@kylinos.cn \
    --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