* [PATCH 0/3] samples/damon: fix boot time enable handling fixup merge mistakes
@ 2025-09-09 2:22 SeongJae Park
2025-09-09 2:22 ` [PATCH 1/3] samples/damon/wsse: avoid starting DAMON before initialization SeongJae Park
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: SeongJae Park @ 2025-09-09 2:22 UTC (permalink / raw)
To: Andrew Morton
Cc: SeongJae Park, # 6 . 17-rc1, damon, kernel-team, linux-kernel, linux-mm
First three patches of the patch series "mm/damon: fix misc bugs in
DAMON modules" [1] was trying to fix boot time DAMON sample modules
enabling issues by avoiding starting DAMON before the module
initialization phase. However, probably by a mistake during a merge,
only half of the change is merged, and the part for avoiding the
starting of DAMON before the module initialized is missed. So the
problem is not solved. Fix those.
Note that the broken commits are merged into 6.17-rc1, but also
backported to relevant stable kernels. So this series also need to be
merged into the stable kernels. Hence Cc-ing stable@.
[1] https://lore.kernel.org/20250706193207.39810-1-sj@kernel.org
SeongJae Park (3):
samples/damon/wsse: avoid starting DAMON before initialization
samples/damon/prcl: avoid starting DAMON before initialization
samples/damon/mtier: avoid starting DAMON before initialization
samples/damon/mtier.c | 3 +++
samples/damon/prcl.c | 3 +++
samples/damon/wsse.c | 3 +++
3 files changed, 9 insertions(+)
base-commit: 186951910f4e44e20738d85c0421032634ddb298
--
2.39.5
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/3] samples/damon/wsse: avoid starting DAMON before initialization
2025-09-09 2:22 [PATCH 0/3] samples/damon: fix boot time enable handling fixup merge mistakes SeongJae Park
@ 2025-09-09 2:22 ` SeongJae Park
2025-09-09 2:22 ` [PATCH 2/3] samples/damon/prcl: " SeongJae Park
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: SeongJae Park @ 2025-09-09 2:22 UTC (permalink / raw)
To: Andrew Morton
Cc: SeongJae Park, # 6 . 17-rc1, damon, kernel-team, linux-kernel, linux-mm
Commit 0ed1165c3727 ("samples/damon/wsse: fix boot time enable
handling") is somehow incompletely applying the origin patch [1]. It is
missing the part that avoids starting DAMON before module
initialization. Probably a mistake during a merge has happened. Fix it
by applying the missed part again.
[1] https://lore.kernel.org/20250706193207.39810-2-sj@kernel.org
Fixes: 0ed1165c3727 ("samples/damon/wsse: fix boot time enable handling")
Cc: <stable@vger.kernel.org> # 6.17-rc1
Signed-off-by: SeongJae Park <sj@kernel.org>
---
samples/damon/wsse.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/samples/damon/wsse.c b/samples/damon/wsse.c
index da052023b099..21eaf15f987d 100644
--- a/samples/damon/wsse.c
+++ b/samples/damon/wsse.c
@@ -118,6 +118,9 @@ static int damon_sample_wsse_enable_store(
return 0;
if (enabled) {
+ if (!init_called)
+ return 0;
+
err = damon_sample_wsse_start();
if (err)
enabled = false;
--
2.39.5
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/3] samples/damon/prcl: avoid starting DAMON before initialization
2025-09-09 2:22 [PATCH 0/3] samples/damon: fix boot time enable handling fixup merge mistakes SeongJae Park
2025-09-09 2:22 ` [PATCH 1/3] samples/damon/wsse: avoid starting DAMON before initialization SeongJae Park
@ 2025-09-09 2:22 ` SeongJae Park
2025-09-09 2:22 ` [PATCH 3/3] samples/damon/mtier: " SeongJae Park
2025-09-09 2:35 ` [PATCH 0/3] samples/damon: fix boot time enable handling fixup merge mistakes Andrew Morton
3 siblings, 0 replies; 8+ messages in thread
From: SeongJae Park @ 2025-09-09 2:22 UTC (permalink / raw)
To: Andrew Morton
Cc: SeongJae Park, # 6 . 17-rc1, damon, kernel-team, linux-kernel, linux-mm
Commit 2780505ec2b4 ("samples/damon/prcl: fix boot time enable crash")
is somehow incompletely applying the origin patch [1]. It is missing
the part that avoids starting DAMON before module initialization.
Probably a mistake during a merge has happened. Fix it by applying the
missed part again.
[1] https://lore.kernel.org/20250706193207.39810-3-sj@kernel.org
Fixes: 2780505ec2b4 ("samples/damon/prcl: fix boot time enable crash")
Cc: <stable@vger.kernel.org> # 6.17-rc1
Signed-off-by: SeongJae Park <sj@kernel.org>
---
samples/damon/prcl.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/samples/damon/prcl.c b/samples/damon/prcl.c
index 1b839c06a612..0226652f94d5 100644
--- a/samples/damon/prcl.c
+++ b/samples/damon/prcl.c
@@ -137,6 +137,9 @@ static int damon_sample_prcl_enable_store(
if (enabled == is_enabled)
return 0;
+ if (!init_called)
+ return 0;
+
if (enabled) {
err = damon_sample_prcl_start();
if (err)
--
2.39.5
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 3/3] samples/damon/mtier: avoid starting DAMON before initialization
2025-09-09 2:22 [PATCH 0/3] samples/damon: fix boot time enable handling fixup merge mistakes SeongJae Park
2025-09-09 2:22 ` [PATCH 1/3] samples/damon/wsse: avoid starting DAMON before initialization SeongJae Park
2025-09-09 2:22 ` [PATCH 2/3] samples/damon/prcl: " SeongJae Park
@ 2025-09-09 2:22 ` SeongJae Park
2025-09-09 2:35 ` [PATCH 0/3] samples/damon: fix boot time enable handling fixup merge mistakes Andrew Morton
3 siblings, 0 replies; 8+ messages in thread
From: SeongJae Park @ 2025-09-09 2:22 UTC (permalink / raw)
To: Andrew Morton
Cc: SeongJae Park, # 6 . 17-rc1, damon, kernel-team, linux-kernel, linux-mm
Commit 964314344eab ("samples/damon/mtier: support boot time enable
setup") is somehow incompletely applying the origin patch [1]. It is
missing the part that avoids starting DAMON before module
initialization. Probably a mistake during a merge has happened. Fix it
by applying the missed part again.
[1] https://lore.kernel.org/20250706193207.39810-4-sj@kernel.org
Fixes: 964314344eab ("samples/damon/mtier: support boot time enable setup")
Cc: <stable@vger.kernel.org> # 6.17-rc1
Signed-off-by: SeongJae Park <sj@kernel.org>
---
samples/damon/mtier.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/samples/damon/mtier.c b/samples/damon/mtier.c
index 7ebd352138e4..beaf36657dea 100644
--- a/samples/damon/mtier.c
+++ b/samples/damon/mtier.c
@@ -208,6 +208,9 @@ static int damon_sample_mtier_enable_store(
if (enabled == is_enabled)
return 0;
+ if (!init_called)
+ return 0;
+
if (enabled) {
err = damon_sample_mtier_start();
if (err)
--
2.39.5
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] samples/damon: fix boot time enable handling fixup merge mistakes
2025-09-09 2:22 [PATCH 0/3] samples/damon: fix boot time enable handling fixup merge mistakes SeongJae Park
` (2 preceding siblings ...)
2025-09-09 2:22 ` [PATCH 3/3] samples/damon/mtier: " SeongJae Park
@ 2025-09-09 2:35 ` Andrew Morton
2025-09-09 3:51 ` SeongJae Park
3 siblings, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2025-09-09 2:35 UTC (permalink / raw)
To: SeongJae Park; +Cc: # 6 . 17-rc1, damon, kernel-team, linux-kernel, linux-mm
On Mon, 8 Sep 2025 19:22:35 -0700 SeongJae Park <sj@kernel.org> wrote:
> First three patches of the patch series "mm/damon: fix misc bugs in
> DAMON modules" [1] was trying to fix boot time DAMON sample modules
> enabling issues by avoiding starting DAMON before the module
> initialization phase. However, probably by a mistake during a merge,
> only half of the change is merged, and the part for avoiding the
> starting of DAMON before the module initialized is missed. So the
> problem is not solved. Fix those.
>
> Note that the broken commits are merged into 6.17-rc1, but also
> backported to relevant stable kernels. So this series also need to be
> merged into the stable kernels. Hence Cc-ing stable@.
That's unfortunate, but the about doesn't actually tell us what this
series does.
> [1] https://lore.kernel.org/20250706193207.39810-1-sj@kernel.org
Presumably it's in there somewhere?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] samples/damon: fix boot time enable handling fixup merge mistakes
2025-09-09 2:35 ` [PATCH 0/3] samples/damon: fix boot time enable handling fixup merge mistakes Andrew Morton
@ 2025-09-09 3:51 ` SeongJae Park
2025-09-09 4:18 ` Andrew Morton
0 siblings, 1 reply; 8+ messages in thread
From: SeongJae Park @ 2025-09-09 3:51 UTC (permalink / raw)
To: Andrew Morton
Cc: SeongJae Park, # 6 . 17-rc1, damon, kernel-team, linux-kernel, linux-mm
On Mon, 8 Sep 2025 19:35:48 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:
> On Mon, 8 Sep 2025 19:22:35 -0700 SeongJae Park <sj@kernel.org> wrote:
>
> > First three patches of the patch series "mm/damon: fix misc bugs in
> > DAMON modules" [1] was trying to fix boot time DAMON sample modules
> > enabling issues by avoiding starting DAMON before the module
> > initialization phase. However, probably by a mistake during a merge,
> > only half of the change is merged, and the part for avoiding the
> > starting of DAMON before the module initialized is missed. So the
> > problem is not solved. Fix those.
> >
> > Note that the broken commits are merged into 6.17-rc1, but also
> > backported to relevant stable kernels. So this series also need to be
> > merged into the stable kernels. Hence Cc-ing stable@.
>
> That's unfortunate, but the about doesn't actually tell us what this
> series does.
Good point. The issue is that the sample modules can crash if those are
enabled at boot time before DAMON is initialized, via kernel command line.
Would you prefer me sending another version of this patch series with an
elaborated cover letter?
>
> > [1] https://lore.kernel.org/20250706193207.39810-1-sj@kernel.org
>
> Presumably it's in there somewhere?
You're right. Both the cover letter and the individual fix patches (first
three of the series) describes the issue and origin broken commit.
Please let me know if there is anything I can help for this patch series from
my side :)
Thanks,
SJ
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] samples/damon: fix boot time enable handling fixup merge mistakes
2025-09-09 3:51 ` SeongJae Park
@ 2025-09-09 4:18 ` Andrew Morton
2025-09-09 4:30 ` SeongJae Park
0 siblings, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2025-09-09 4:18 UTC (permalink / raw)
To: SeongJae Park; +Cc: # 6 . 17-rc1, damon, kernel-team, linux-kernel, linux-mm
On Mon, 8 Sep 2025 20:51:41 -0700 SeongJae Park <sj@kernel.org> wrote:
> > > Note that the broken commits are merged into 6.17-rc1, but also
> > > backported to relevant stable kernels. So this series also need to be
> > > merged into the stable kernels. Hence Cc-ing stable@.
> >
> > That's unfortunate, but the about doesn't actually tell us what this
> > series does.
>
> Good point. The issue is that the sample modules can crash if those are
> enabled at boot time before DAMON is initialized, via kernel command line.
>
> Would you prefer me sending another version of this patch series with an
> elaborated cover letter?
Please just send out the appropriate words and I'll paste it in.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] samples/damon: fix boot time enable handling fixup merge mistakes
2025-09-09 4:18 ` Andrew Morton
@ 2025-09-09 4:30 ` SeongJae Park
0 siblings, 0 replies; 8+ messages in thread
From: SeongJae Park @ 2025-09-09 4:30 UTC (permalink / raw)
To: Andrew Morton
Cc: SeongJae Park, # 6 . 17-rc1, damon, kernel-team, linux-kernel, linux-mm
On Mon, 8 Sep 2025 21:18:45 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:
> On Mon, 8 Sep 2025 20:51:41 -0700 SeongJae Park <sj@kernel.org> wrote:
>
> > > > Note that the broken commits are merged into 6.17-rc1, but also
> > > > backported to relevant stable kernels. So this series also need to be
> > > > merged into the stable kernels. Hence Cc-ing stable@.
> > >
> > > That's unfortunate, but the about doesn't actually tell us what this
> > > series does.
> >
> > Good point. The issue is that the sample modules can crash if those are
> > enabled at boot time before DAMON is initialized, via kernel command line.
> >
> > Would you prefer me sending another version of this patch series with an
> > elaborated cover letter?
>
> Please just send out the appropriate words and I'll paste it in.
Thank you for the guidance, Andrew. How about below?
"""
First three patches of the patch series "mm/damon: fix misc bugs in DAMON
modules" [1] was trying to fix boot time DAMON sample modules enabling issues.
The issues are the modules can crash if those are enabled before DAMON is
enabled, like using boot time parameter options. The three patches were fixing
the issues by avoiding starting DAMON before the module initialization phase.
However, probably by a mistake during a merge, only half of the change is
merged, and the part for avoiding the starting of DAMON before the module
initialized is missed. So the problem is not solved and thus the modules can
still crash if enabled before DAMON is initialized. Fix those by applying the
unmerged parts again.
Note that the broken commits are merged into 6.17-rc1, but also backported to
relevant stable kernels. So this series also needs to be merged into the
stable kernels. Hence Cc-ing stable@.
"""
Thanks,
SJ
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-09-09 4:30 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-09 2:22 [PATCH 0/3] samples/damon: fix boot time enable handling fixup merge mistakes SeongJae Park
2025-09-09 2:22 ` [PATCH 1/3] samples/damon/wsse: avoid starting DAMON before initialization SeongJae Park
2025-09-09 2:22 ` [PATCH 2/3] samples/damon/prcl: " SeongJae Park
2025-09-09 2:22 ` [PATCH 3/3] samples/damon/mtier: " SeongJae Park
2025-09-09 2:35 ` [PATCH 0/3] samples/damon: fix boot time enable handling fixup merge mistakes Andrew Morton
2025-09-09 3:51 ` SeongJae Park
2025-09-09 4:18 ` Andrew Morton
2025-09-09 4:30 ` SeongJae Park
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox