From: Enze Li <lienze@kylinos.cn>
To: SeongJae Park <sj@kernel.org>
Cc: 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: Fri, 15 Aug 2025 17:15:54 +0800 [thread overview]
Message-ID: <87a541c5dh.fsf@kylinos.cn> (raw)
In-Reply-To: <20250814162446.69575-1-sj@kernel.org> (SeongJae Park's message of "Thu, 14 Aug 2025 09:24:46 -0700")
Hi SJ,
On Thu, Aug 14 2025 at 09:24:46 AM -0700, SeongJae Park wrote:
> 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
Thanks for your review. I've updated the patch addressing all your
comments below. And I'll send the new version to the list shortly.
>
> 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" ?
>
Best Regards,
Enze
prev parent reply other threads:[~2025-08-15 9:16 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
2025-08-15 9:15 ` Enze Li [this message]
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=87a541c5dh.fsf@kylinos.cn \
--to=lienze@kylinos.cn \
--cc=akpm@linux-foundation.org \
--cc=damon@lists.linux.dev \
--cc=enze.li@gmx.com \
--cc=linux-mm@kvack.org \
--cc=sj@kernel.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