mm/damon/core: fix damos_commit_filter not changing allow
Subsystems (2)
PATCH 1/1 mm/damon/core: fix damos_commit_filter not changing allow
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.
---
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/[email protected]/
--- mm/damon/core.c | 1 + 1 file changed, 1 insertion(+)
mm/damon/core.c +1 -0
@@ -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); }
Signature · 1 line
2.43.0
SeongJae Park
maintainerQuoted 6 lines · On Fri, 15 Aug 2025 18:40:59 +0900 Sang-Heon Jeon <[email protected]> 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!
Quoted 2 lines
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.
Also,
Quoted 6 lines
Signed-off-by Sang-Heon Jeon <[email protected]>---
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
[...]
SeongJae Park
maintainerQuoted 14 lines · On Fri, 15 Aug 2025 10:25:45 -0700 SeongJae Park <[email protected]> wrote:
Quoted 6 lines · On Fri, 15 Aug 2025 18:40:59 +0900 Sang-Heon Jeon <[email protected]> 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!
Quoted 2 lines
Fixes 9cb3d0b9dfce ("mm/damon/core: implement DAMON context commit function")
Quoted 8 lines
At the time of the commit,
damos_filter->allowdidn't exist. I think below is more correct.Fixes fe6d7fdd6249 ("mm/damon/core: add damos_filter->allow field")Also,
Cc [email protected] # 6.14.x
Sorry, s/stablee/stable/ please.
Thanks,
SJ
[...]
Hi SeongJae
Quoted 13 lines · SeongJae Park
Quoted 6 lines · On Fri, 15 Aug 2025 18:40:59 +0900 Sang-Heon Jeon <[email protected]> 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!
Quoted 1 line
Quoted 6 lines
Quoted 1 line
Fixes 9cb3d0b9dfce ("mm/damon/core: implement DAMON context commit function")At the time of the commit,
damos_filter->allowdidn'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.
Quoted 3 lines
Also,
Cc [email protected] # 6.14.x
I'll also add them.
Quoted 7 lines
Quoted 6 lines
Signed-off-by Sang-Heon Jeon <[email protected]>---
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?
Quoted 5 lines
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 tomm/damon/tets/core-kunit.hfile.
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.
Quoted 5 lines
Thanks,
SJ[...]
Best Regards
Sang-Heon Jeon
SeongJae Park
maintainerQuoted 38 lines · On Sat, 16 Aug 2025 10:18:13 +0900 Sang-Heon Jeon <[email protected]> wrote:
Hi SeongJae
Quoted 13 lines · SeongJae Park
Quoted 6 lines · On Fri, 15 Aug 2025 18:40:59 +0900 Sang-Heon Jeon <[email protected]> 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!
Quoted 1 line
Quoted 6 lines
Quoted 1 line
Fixes 9cb3d0b9dfce ("mm/damon/core: implement DAMON context commit function")At the time of the commit,
damos_filter->allowdidn'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.
Quoted 3 lines
Also,
Cc [email protected] # 6.14.xI'll also add them.
Quoted 7 lines
Quoted 6 lines
Signed-off-by Sang-Heon Jeon <[email protected]>---
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?
Quoted 7 lines
Quoted 5 lines
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 tomm/damon/tets/core-kunit.hfile.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.
Quoted 2 lines
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
[...]