* [PATCH] mm/damon/core: fix damos_commit_filter not changing allow
@ 2025-08-15 9:40 Sang-Heon Jeon
2025-08-15 17:25 ` SeongJae Park
0 siblings, 1 reply; 5+ messages in thread
From: Sang-Heon Jeon @ 2025-08-15 9:40 UTC (permalink / raw)
To: sj, honggyu.kim; +Cc: damon, linux-mm, Sang-Heon Jeon
Current damos_commit_filter() not persist allow value of filter. As a
result, changing allow value of filter and commit doesn't change
allow value.
Add the missing allow value update, so commit filter now persist changing
allow value well.
Fixes: 9cb3d0b9dfce ("mm/damon/core: implement DAMON context commit function")
Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
---
While fixing kselftest, I found another bug and succeeded in
reproducing. I think this patch is similar with previeous patch [1].
Also instead of sending patch with test, should we check which is better:
a seperate patch or patchset?
[1] https://lore.kernel.org/damon/20250808220815.49644-1-sj@kernel.org/
---
mm/damon/core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/damon/core.c b/mm/damon/core.c
index 19c8f01fc81a..cb41fddca78c 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -900,6 +900,7 @@ static void damos_commit_filter(
{
dst->type = src->type;
dst->matching = src->matching;
+ dst->allow = src->allow;
damos_commit_filter_arg(dst, src);
}
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] mm/damon/core: fix damos_commit_filter not changing allow
2025-08-15 9:40 [PATCH] mm/damon/core: fix damos_commit_filter not changing allow Sang-Heon Jeon
@ 2025-08-15 17:25 ` SeongJae Park
2025-08-15 17:51 ` SeongJae Park
2025-08-16 1:18 ` Sang-Heon Jeon
0 siblings, 2 replies; 5+ messages in thread
From: SeongJae Park @ 2025-08-15 17:25 UTC (permalink / raw)
To: Sang-Heon Jeon; +Cc: SeongJae Park, honggyu.kim, damon, linux-mm, stablee
On Fri, 15 Aug 2025 18:40:59 +0900 Sang-Heon Jeon <ekffu200098@gmail.com> wrote:
> Current damos_commit_filter() not persist allow value of filter. As a
> result, changing allow value of filter and commit doesn't change
> allow value.
>
> Add the missing allow value update, so commit filter now persist changing
> allow value well.
Thank you for finding and fixing this!
>
> Fixes: 9cb3d0b9dfce ("mm/damon/core: implement DAMON context commit function")
At the time of the commit, damos_filter->allow didn't exist. I think below is
more correct.
Fixes: fe6d7fdd6249 ("mm/damon/core: add damos_filter->allow field")
Also,
Cc: stablee@vger.kernel.org # 6.14.x
> Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
> ---
> While fixing kselftest, I found another bug and succeeded in
> reproducing. I think this patch is similar with previeous patch [1].
> Also instead of sending patch with test, should we check which is better:
> a seperate patch or patchset?
Separate patches are better for me.
I'm not sure how you will make the test, but I'd usggest making the test as a
kunit test.
Please refer to mm/damon/tets/core-kunit.h file.
Thanks,
SJ
[...]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mm/damon/core: fix damos_commit_filter not changing allow
2025-08-15 17:25 ` SeongJae Park
@ 2025-08-15 17:51 ` SeongJae Park
2025-08-16 1:18 ` Sang-Heon Jeon
1 sibling, 0 replies; 5+ messages in thread
From: SeongJae Park @ 2025-08-15 17:51 UTC (permalink / raw)
To: SeongJae Park; +Cc: Sang-Heon Jeon, honggyu.kim, damon, linux-mm, stablee
On Fri, 15 Aug 2025 10:25:45 -0700 SeongJae Park <sj@kernel.org> wrote:
> On Fri, 15 Aug 2025 18:40:59 +0900 Sang-Heon Jeon <ekffu200098@gmail.com> wrote:
>
> > Current damos_commit_filter() not persist allow value of filter. As a
> > result, changing allow value of filter and commit doesn't change
> > allow value.
> >
> > Add the missing allow value update, so commit filter now persist changing
> > allow value well.
>
> Thank you for finding and fixing this!
>
> >
> > Fixes: 9cb3d0b9dfce ("mm/damon/core: implement DAMON context commit function")
>
> At the time of the commit, damos_filter->allow didn't exist. I think below is
> more correct.
>
> Fixes: fe6d7fdd6249 ("mm/damon/core: add damos_filter->allow field")
>
> Also,
>
> Cc: stablee@vger.kernel.org # 6.14.x
Sorry, s/stablee/stable/ please.
Thanks,
SJ
[...]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mm/damon/core: fix damos_commit_filter not changing allow
2025-08-15 17:25 ` SeongJae Park
2025-08-15 17:51 ` SeongJae Park
@ 2025-08-16 1:18 ` Sang-Heon Jeon
2025-08-16 16:02 ` SeongJae Park
1 sibling, 1 reply; 5+ messages in thread
From: Sang-Heon Jeon @ 2025-08-16 1:18 UTC (permalink / raw)
To: SeongJae Park; +Cc: honggyu.kim, damon, linux-mm, stablee
Hi SeongJae
On Sat, Aug 16, 2025 at 2:25 AM SeongJae Park <sj@kernel.org> wrote:
>
> On Fri, 15 Aug 2025 18:40:59 +0900 Sang-Heon Jeon <ekffu200098@gmail.com> wrote:
>
> > Current damos_commit_filter() not persist allow value of filter. As a
> > result, changing allow value of filter and commit doesn't change
> > allow value.
> >
> > Add the missing allow value update, so commit filter now persist changing
> > allow value well.
>
> Thank you for finding and fixing this!
>
> >
> > Fixes: 9cb3d0b9dfce ("mm/damon/core: implement DAMON context commit function")
>
> At the time of the commit, damos_filter->allow didn't exist. I think below is
> more correct.
>
> Fixes: fe6d7fdd6249 ("mm/damon/core: add damos_filter->allow field")
I found a wrong commit, I'll fix them.
> Also,
>
> Cc: stablee@vger.kernel.org # 6.14.x
I'll also add them.
> > Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
> > ---
> > While fixing kselftest, I found another bug and succeeded in
> > reproducing. I think this patch is similar with previeous patch [1].
> > Also instead of sending patch with test, should we check which is better:
> > a seperate patch or patchset?
>
> Separate patches are better for me.
>
> I'm not sure how you will make the test, but I'd usggest making the test as a
> kunit test.
> Please refer to mm/damon/tets/core-kunit.h file.
I made kselftest with drgn, but I think that kunit could be a solution as well.
Honestly, I haven't used kunit test before, so i need to look into of
that. Please just wait a little bit.
>
> Thanks,
> SJ
>
> [...]
Best Regards
Sang-Heon Jeon
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mm/damon/core: fix damos_commit_filter not changing allow
2025-08-16 1:18 ` Sang-Heon Jeon
@ 2025-08-16 16:02 ` SeongJae Park
0 siblings, 0 replies; 5+ messages in thread
From: SeongJae Park @ 2025-08-16 16:02 UTC (permalink / raw)
To: Sang-Heon Jeon; +Cc: SeongJae Park, honggyu.kim, damon, linux-mm, stablee
On Sat, 16 Aug 2025 10:18:13 +0900 Sang-Heon Jeon <ekffu200098@gmail.com> wrote:
> Hi SeongJae
>
> On Sat, Aug 16, 2025 at 2:25 AM SeongJae Park <sj@kernel.org> wrote:
> >
> > On Fri, 15 Aug 2025 18:40:59 +0900 Sang-Heon Jeon <ekffu200098@gmail.com> wrote:
> >
> > > Current damos_commit_filter() not persist allow value of filter. As a
> > > result, changing allow value of filter and commit doesn't change
> > > allow value.
> > >
> > > Add the missing allow value update, so commit filter now persist changing
> > > allow value well.
> >
> > Thank you for finding and fixing this!
> >
> > >
> > > Fixes: 9cb3d0b9dfce ("mm/damon/core: implement DAMON context commit function")
> >
> > At the time of the commit, damos_filter->allow didn't exist. I think below is
> > more correct.
> >
> > Fixes: fe6d7fdd6249 ("mm/damon/core: add damos_filter->allow field")
>
> I found a wrong commit, I'll fix them.
>
> > Also,
> >
> > Cc: stablee@vger.kernel.org # 6.14.x
>
> I'll also add them.
>
> > > Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
> > > ---
> > > While fixing kselftest, I found another bug and succeeded in
> > > reproducing. I think this patch is similar with previeous patch [1].
> > > Also instead of sending patch with test, should we check which is better:
> > > a seperate patch or patchset?
> >
> > Separate patches are better for me.
> >
> > I'm not sure how you will make the test, but I'd usggest making the test as a
> > kunit test.
> > Please refer to mm/damon/tets/core-kunit.h file.
>
> I made kselftest with drgn, but I think that kunit could be a solution as well.
Thank you :) I prefer kunit here, since the test should be for the specific
core function that can easily be tested using kunit. Writing it as a drgn
based selftest seems too much to me.
> Honestly, I haven't used kunit test before, so i need to look into of
> that. Please just wait a little bit.
No worry, take your time and fun :)
FYI, you can run DAMON kunit test as below:
$ ./tools/testing/kunit/kunit.py run --kunitconfig ./mm/damon/tests
And the document is available at
https://docs.kernel.org/dev-tools/kunit/index.html
Thanks,
SJ
[...]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-08-16 16:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-15 9:40 [PATCH] mm/damon/core: fix damos_commit_filter not changing allow Sang-Heon Jeon
2025-08-15 17:25 ` SeongJae Park
2025-08-15 17:51 ` SeongJae Park
2025-08-16 1:18 ` Sang-Heon Jeon
2025-08-16 16:02 ` SeongJae Park
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).