* [PATCH] mm/damon/Kconfig: enforce DAMON_STAT when DAMON_STAT_ENABLED_DEFAULT is selected
@ 2025-08-14 12:17 Enze Li
2025-08-14 16:24 ` SeongJae Park
0 siblings, 1 reply; 3+ messages in thread
From: Enze Li @ 2025-08-14 12:17 UTC (permalink / raw)
To: sj, akpm; +Cc: damon, linux-mm, enze.li, Enze Li
The DAMON_STAT_ENABLED_DEFAULT option is strongly tied to
DAMON_STAT -- enabling it alone is meaningless. 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
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mm/damon/Kconfig: enforce DAMON_STAT when DAMON_STAT_ENABLED_DEFAULT is selected
2025-08-14 12:17 [PATCH] mm/damon/Kconfig: enforce DAMON_STAT when DAMON_STAT_ENABLED_DEFAULT is selected Enze Li
@ 2025-08-14 16:24 ` SeongJae Park
2025-08-15 9:15 ` Enze Li
0 siblings, 1 reply; 3+ messages in thread
From: SeongJae Park @ 2025-08-14 16:24 UTC (permalink / raw)
To: Enze Li; +Cc: SeongJae Park, akpm, damon, linux-mm, enze.li
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mm/damon/Kconfig: enforce DAMON_STAT when DAMON_STAT_ENABLED_DEFAULT is selected
2025-08-14 16:24 ` SeongJae Park
@ 2025-08-15 9:15 ` Enze Li
0 siblings, 0 replies; 3+ messages in thread
From: Enze Li @ 2025-08-15 9:15 UTC (permalink / raw)
To: SeongJae Park; +Cc: akpm, damon, linux-mm, enze.li
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-08-15 9:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-14 12:17 [PATCH] mm/damon/Kconfig: enforce DAMON_STAT when DAMON_STAT_ENABLED_DEFAULT is selected Enze Li
2025-08-14 16:24 ` SeongJae Park
2025-08-15 9:15 ` Enze Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).