* [PATCH 0/7] mm/damon: improve/fixup/update ratio calculation, test and documentation
@ 2026-03-07 19:53 SeongJae Park
2026-03-07 19:53 ` [PATCH 2/7] mm/damon/tests/core-kunit: add a test for damon_is_last_region() SeongJae Park
2026-03-09 2:27 ` [PATCH 0/7] mm/damon: improve/fixup/update ratio calculation, test and documentation wang lian
0 siblings, 2 replies; 4+ messages in thread
From: SeongJae Park @ 2026-03-07 19:53 UTC (permalink / raw)
To: Andrew Morton
Cc: SeongJae Park, Liam R. Howlett, Brendan Higgins, David Gow,
David Hildenbrand, Jonathan Corbet, Lorenzo Stoakes, Michal Hocko,
Mike Rapoport, Shuah Khan, Suren Baghdasaryan, Vlastimil Babka,
damon, kunit-dev, linux-doc, linux-kernel, linux-kselftest,
linux-mm, wang lian
Yet another batch of misc/minor improvements and fixups. Use
mult_frac() instead of the worse open-coding for rate calculations
(patch 1). Add a test for a previously found and fixed bug (patch 2).
Improve and update comments and documentations for easier code review
and up-to-date information (patches 3-6). Finally, fix an obvious typo
(patch 7).
SeongJae Park (7):
mm/damon/core: use mult_frac()
mm/damon/tests/core-kunit: add a test for damon_is_last_region()
mm/damon/core: clarify damon_set_attrs() usages
mm/damon: document non-zero length damon_region assumption
Docs/admin-guide/mm/damn/lru_sort: fix intervals autotune parameter
name
Docs/mm/damon/maintainer-profile: use flexible review cadence
Docs/mm/damon/index: fix typo: autoamted -> automated
.../admin-guide/mm/damon/lru_sort.rst | 4 +--
Documentation/mm/damon/index.rst | 2 +-
Documentation/mm/damon/maintainer-profile.rst | 8 ++---
include/linux/damon.h | 2 ++
mm/damon/core.c | 32 ++++++++++++-------
mm/damon/tests/core-kunit.h | 23 +++++++++++++
6 files changed, 52 insertions(+), 19 deletions(-)
base-commit: fa1e30b2dede645519bf6743439d3925922651bc
--
2.47.3
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 2/7] mm/damon/tests/core-kunit: add a test for damon_is_last_region()
2026-03-07 19:53 [PATCH 0/7] mm/damon: improve/fixup/update ratio calculation, test and documentation SeongJae Park
@ 2026-03-07 19:53 ` SeongJae Park
2026-03-09 2:34 ` wang lian
2026-03-09 2:27 ` [PATCH 0/7] mm/damon: improve/fixup/update ratio calculation, test and documentation wang lian
1 sibling, 1 reply; 4+ messages in thread
From: SeongJae Park @ 2026-03-07 19:53 UTC (permalink / raw)
To: Andrew Morton
Cc: SeongJae Park, Brendan Higgins, David Gow, damon, kunit-dev,
linux-kernel, linux-kselftest, linux-mm
There was a bug [1] in damon_is_last_region(). Add a kunit test to not
reintroduce the bug.
[1] https://lore.kernel.org/20260114152049.99727-1-sj@kernel.org/
Signed-off-by: SeongJae Park <sj@kernel.org>
---
mm/damon/tests/core-kunit.h | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/mm/damon/tests/core-kunit.h b/mm/damon/tests/core-kunit.h
index 2289f9e4610c0..e86d4f4fe261a 100644
--- a/mm/damon/tests/core-kunit.h
+++ b/mm/damon/tests/core-kunit.h
@@ -1311,6 +1311,28 @@ static void damon_test_apply_min_nr_regions(struct kunit *test)
damon_test_apply_min_nr_regions_for(test, 10, 2, 10, 2, 5);
}
+static void damon_test_is_last_region(struct kunit *test)
+{
+ struct damon_region *r;
+ struct damon_target *t;
+ int i;
+
+ t = damon_new_target();
+ if (!t)
+ kunit_skip(test, "target alloc fail\n");
+
+ for (i = 0; i < 4; i++) {
+ r = damon_new_region(i * 2, (i + 1) * 2);
+ if (!r) {
+ damon_free_target(t);
+ kunit_skip(test, "region alloc %d fail\n", i);
+ }
+ damon_add_region(r, t);
+ KUNIT_EXPECT_TRUE(test, damon_is_last_region(r, t));
+ }
+ damon_free_target(t);
+}
+
static struct kunit_case damon_test_cases[] = {
KUNIT_CASE(damon_test_target),
KUNIT_CASE(damon_test_regions),
@@ -1339,6 +1361,7 @@ static struct kunit_case damon_test_cases[] = {
KUNIT_CASE(damon_test_feed_loop_next_input),
KUNIT_CASE(damon_test_set_filters_default_reject),
KUNIT_CASE(damon_test_apply_min_nr_regions),
+ KUNIT_CASE(damon_test_is_last_region),
{},
};
--
2.47.3
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 2/7] mm/damon/tests/core-kunit: add a test for damon_is_last_region()
2026-03-07 19:53 ` [PATCH 2/7] mm/damon/tests/core-kunit: add a test for damon_is_last_region() SeongJae Park
@ 2026-03-09 2:34 ` wang lian
0 siblings, 0 replies; 4+ messages in thread
From: wang lian @ 2026-03-09 2:34 UTC (permalink / raw)
To: sj
Cc: akpm, brendan.higgins, damon, davidgow, kunit-dev, linux-kernel,
linux-kselftest, linux-mm, wang lian
> There was a bug [1] in damon_is_last_region(). Add a kunit test to not
> reintroduce the bug.
> [1] https://lore.kernel.org/20260114152049.99727-1-sj@kernel.org/
> Signed-off-by: SeongJae Park <sj@kernel.org>
Hi SeongJae,
I've been following the previous discussion regarding the bug in
damon_is_last_region() where the arguments of list_is_last() were
accidentally swapped.
I have verified this patch by running the KUnit tests on my arm64 native
environment. The damon_test_is_last_region test case passed as expected,
confirming that the fix is robust and the regression is effectively
prevented.
Tested-by: wang lian <lianux.mm@gmail.com>
Reviewed-by: wang lian <lianux.mm@gmail.com>
--
Best Regards,
wang lian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/7] mm/damon: improve/fixup/update ratio calculation, test and documentation
2026-03-07 19:53 [PATCH 0/7] mm/damon: improve/fixup/update ratio calculation, test and documentation SeongJae Park
2026-03-07 19:53 ` [PATCH 2/7] mm/damon/tests/core-kunit: add a test for damon_is_last_region() SeongJae Park
@ 2026-03-09 2:27 ` wang lian
1 sibling, 0 replies; 4+ messages in thread
From: wang lian @ 2026-03-09 2:27 UTC (permalink / raw)
To: sj
Cc: Liam.Howlett, akpm, brendan.higgins, corbet, damon, david,
davidgow, kunit-dev, lianux.mm, linux-doc, linux-kernel,
linux-kselftest, linux-mm, ljs, mhocko, rppt, skhan, surenb,
vbabka
> Yet another batch of misc/minor improvements and fixups. Use
> mult_frac() instead of the worse open-coding for rate calculations
> (patch 1). Add a test for a previously found and fixed bug (patch 2).
> Improve and update comments and documentations for easier code review
> and up-to-date information (patches 3-6). Finally, fix an obvious typo
> (patch 7).
Hi SeongJae,
Thanks for the patches and the CC!
I've reviewed the entire series and conducted functional testing on my arm64 environment (native VM).
All 28 KUnit tests passed successfully, including
the newly added damon_test_is_last_region.
Acked-by: wang lian <lianux.mm@gmail.com>
--
Best Regards,
wang lian
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-03-09 2:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-07 19:53 [PATCH 0/7] mm/damon: improve/fixup/update ratio calculation, test and documentation SeongJae Park
2026-03-07 19:53 ` [PATCH 2/7] mm/damon/tests/core-kunit: add a test for damon_is_last_region() SeongJae Park
2026-03-09 2:34 ` wang lian
2026-03-09 2:27 ` [PATCH 0/7] mm/damon: improve/fixup/update ratio calculation, test and documentation wang lian
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox