DAMON development mailing list
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] mm/damon: treat DAMOS core filters as a primary target selection method
@ 2026-11-30 15:22 SJ Park
  2026-11-30 15:22 ` [RFC PATCH 1/3] Revert "mm/damon/tests/core-kunit: test the size charged for a filter-trimmed region" SJ Park
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: SJ Park @ 2026-11-30 15:22 UTC (permalink / raw)
  Cc: SJ Park, Andrew Morton, Brendan Higgins, David Gow,
	Jonathan Corbet, Randy Dunlap, Shuah Khan, damon, kunit-dev,
	linux-doc, linux-kselftest, linux-mm

DAMOS access pattern and core filters are treated as a primary and a
secondary target selection method, respectively.  DAMOS target regions
are initially selected with the access pattern, and later evaluated for
the core filters only when needed, in the middle of lower level
operations.  DAMOS quota goal type eligible_mem_bp is ignoring the core
filters.

There is no real reason to treat DAMOS core filters as a secondary
method, though.  DAMOS stats treat core filter rejections the same to
access pattern-based rejections.  The core filters are effectively
applied for every operation.  The duplicated handling of the filters in
each operation only makes it easy to mistake.

Promote DAMOS core filters to a primary target selection method.  Use it
in the central high level place that DAMOS access pattern is handled.
One consequence of this change is the behavioral change of
eligible_mem_bp DAMOS quota goal type.  It was ignoring core filters.
This change makes it aware of core filters.  It is difficult to imagine
real users that depend on the old behavior.  And the new behavior is
more intuitive in my opinion.

Remove unit tests that were too duplicated and will fail after the
change, via patch 1.  Make the promotion via patch 2.  Clarify the
changed eligible_mem_bp behavior on the design document, via patch 3.

SJ Park (3):
  Revert "mm/damon/tests/core-kunit: test the size charged for a
    filter-trimmed region"
  mm/damon/core: apply damos core filter in __damos_valid_target()
  Docs/mm/damon/design: update node_eligible_mem_bp for changed behavior

 Documentation/mm/damon/design.rst |   4 +-
 mm/damon/core.c                   |  26 +--
 mm/damon/tests/core-kunit.h       | 316 ------------------------------
 3 files changed, 17 insertions(+), 329 deletions(-)


base-commit: 0bbbdf85abf48b019cb8dd7a6e87f0a8995fdcd2
-- 
2.47.3

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [RFC PATCH 1/3] Revert "mm/damon/tests/core-kunit: test the size charged for a filter-trimmed region"
  2026-11-30 15:22 [RFC PATCH 0/3] mm/damon: treat DAMOS core filters as a primary target selection method SJ Park
@ 2026-11-30 15:22 ` SJ Park
  2026-11-30 15:32   ` sashiko-bot
  2026-11-30 15:22 ` [RFC PATCH 2/3] mm/damon/core: apply damos core filter in __damos_valid_target() SJ Park
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: SJ Park @ 2026-11-30 15:22 UTC (permalink / raw)
  Cc: SJ Park, Andrew Morton, Brendan Higgins, David Gow, damon,
	kunit-dev, linux-kselftest, linux-mm

This reverts commit 1c335228206392b96d327c6b49cea68cbb806d8a.

Two kunit tests that were introduced by commit 1c3352282063
("mm/damon/tests/core-kunit: test the size charged for a filter-trimmed
region") are arguably doing duplicated tests.  Those are testing core
filter functionality in damos_apply_scheme(), only because the filters
are applied in damos_apply_scheme().  But the core filter functionality
is already tested by damos_test_filter_out().  Remove the duplicated
tests by reverting the introduction commit.

Signed-off-by: SJ Park <sj@kernel.org>
---
 mm/damon/tests/core-kunit.h | 316 ------------------------------------
 1 file changed, 316 deletions(-)

diff --git a/mm/damon/tests/core-kunit.h b/mm/damon/tests/core-kunit.h
index 73c3bd6a9612..5244ac0ffc28 100644
--- a/mm/damon/tests/core-kunit.h
+++ b/mm/damon/tests/core-kunit.h
@@ -2000,319 +2000,6 @@ static void damos_test_filter_out(struct kunit *test)
 	damos_free_filter(f);
 }
 
-static unsigned long damos_test_apply_scheme_stub(struct damon_ctx *c,
-		struct damon_target *t, struct damon_region *r,
-		struct damos *s, unsigned long *sz_filter_passed)
-{
-	return 0;
-}
-
-static void damos_test_apply_scheme_filtered_sz(struct kunit *test)
-{
-	struct damos_access_pattern pattern = {
-		.min_sz_region = 0,
-		.max_sz_region = ULONG_MAX,
-		.min_nr_accesses = 0,
-		.max_nr_accesses = UINT_MAX,
-		.min_age_region = 0,
-		.max_age_region = UINT_MAX,
-	};
-	unsigned long min_sz = DAMON_MIN_REGION_SZ;
-	struct damos_watermarks wmarks = {};
-	struct damos_quota quota = {};
-	struct damon_ctx *c;
-	struct damon_target *t;
-	struct damon_region *r;
-	struct damos_filter *f;
-	struct damos *s;
-
-	c = damon_new_ctx();
-	if (!c)
-		kunit_skip(test, "ctx alloc fail");
-	c->ops.apply_scheme = damos_test_apply_scheme_stub;
-
-	s = damon_new_scheme(&pattern, DAMOS_STAT, 0, &quota, &wmarks,
-			NUMA_NO_NODE);
-	if (!s) {
-		damon_destroy_ctx(c);
-		kunit_skip(test, "scheme alloc fail");
-	}
-	damon_add_scheme(c, s);
-
-	t = damon_new_target();
-	if (!t) {
-		damon_destroy_ctx(c);
-		kunit_skip(test, "target alloc fail");
-	}
-	damon_add_target(c, t);
-
-	f = damos_new_filter(DAMOS_FILTER_TYPE_ADDR, true, false);
-	if (!f) {
-		damon_destroy_ctx(c);
-		kunit_skip(test, "filter alloc fail");
-	}
-	f->addr_range = (struct damon_addr_range){
-		.start = 2 * min_sz,
-		.end = 8 * min_sz
-	};
-	damos_add_filter(s, f);
-	damos_set_filters_default_reject(s);
-
-	/* reject filter, region starting before the range */
-	r = damon_new_region(0, 4 * min_sz);
-	if (!r) {
-		damon_destroy_ctx(c);
-		kunit_skip(test, "region alloc fail");
-	}
-	damon_add_region(r, t);
-
-	damos_apply_scheme(c, t, r, s);
-	KUNIT_EXPECT_EQ(test, damon_nr_regions(t), 2);
-	KUNIT_EXPECT_EQ(test, r->ar.end, 2 * min_sz);
-	KUNIT_EXPECT_EQ(test, s->stat.sz_tried, 2 * min_sz);
-
-	if (damon_nr_regions(t) != 2)
-		goto out;
-	damon_destroy_region(damon_next_region(r), t);
-	damon_destroy_region(r, t);
-	s->stat = (struct damos_stat){};
-
-	/* allow filter, region starting inside the range */
-	f->allow = true;
-	damos_set_filters_default_reject(s);
-	r = damon_new_region(2 * min_sz, 10 * min_sz);
-	if (!r) {
-		damon_destroy_ctx(c);
-		kunit_skip(test, "region alloc fail");
-	}
-	damon_add_region(r, t);
-
-	damos_apply_scheme(c, t, r, s);
-	KUNIT_EXPECT_EQ(test, damon_nr_regions(t), 2);
-	KUNIT_EXPECT_EQ(test, r->ar.end, 8 * min_sz);
-	KUNIT_EXPECT_EQ(test, s->stat.sz_tried, 6 * min_sz);
-
-out:
-	damon_destroy_ctx(c);
-}
-
-static void damos_test_apply_scheme_filter_sz_unchanged(struct kunit *test)
-{
-	struct damos_access_pattern pattern = {
-		.min_sz_region = 0,
-		.max_sz_region = ULONG_MAX,
-		.min_nr_accesses = 0,
-		.max_nr_accesses = UINT_MAX,
-		.min_age_region = 0,
-		.max_age_region = UINT_MAX,
-	};
-	unsigned long min_sz = DAMON_MIN_REGION_SZ;
-	struct damos_watermarks wmarks = {};
-	struct damos_quota quota = {};
-	struct damos_filter *f, *f2;
-	struct damon_ctx *c;
-	struct damon_target *t;
-	struct damon_region *r;
-	struct damos *s;
-
-	c = damon_new_ctx();
-	if (!c)
-		kunit_skip(test, "ctx alloc fail");
-	c->ops.apply_scheme = damos_test_apply_scheme_stub;
-
-	s = damon_new_scheme(&pattern, DAMOS_STAT, 0, &quota, &wmarks,
-			NUMA_NO_NODE);
-	if (!s) {
-		damon_destroy_ctx(c);
-		kunit_skip(test, "scheme alloc fail");
-	}
-	damon_add_scheme(c, s);
-
-	t = damon_new_target();
-	if (!t) {
-		damon_destroy_ctx(c);
-		kunit_skip(test, "target alloc fail");
-	}
-	damon_add_target(c, t);
-
-	f = damos_new_filter(DAMOS_FILTER_TYPE_ADDR, true, false);
-	if (!f) {
-		damon_destroy_ctx(c);
-		kunit_skip(test, "filter alloc fail");
-	}
-	f->addr_range = (struct damon_addr_range){
-		.start = 2 * min_sz, .end = 8 * min_sz};
-	damos_add_filter(s, f);
-	damos_set_filters_default_reject(s);
-
-	/* wholly inside a reject range: not counted at all */
-	r = damon_new_region(4 * min_sz, 6 * min_sz);
-	if (!r) {
-		damon_destroy_ctx(c);
-		kunit_skip(test, "region alloc fail");
-	}
-	damon_add_region(r, t);
-
-	damos_apply_scheme(c, t, r, s);
-	KUNIT_EXPECT_EQ(test, s->stat.nr_tried, 0);
-	KUNIT_EXPECT_EQ(test, s->stat.sz_tried, 0);
-	KUNIT_EXPECT_EQ(test, damon_nr_regions(t), 1);
-
-	/* wholly inside an allow range: counted whole, not split */
-	f->allow = true;
-	damos_set_filters_default_reject(s);
-
-	damos_apply_scheme(c, t, r, s);
-	KUNIT_EXPECT_EQ(test, s->stat.sz_tried, 2 * min_sz);
-	KUNIT_EXPECT_EQ(test, damon_nr_regions(t), 1);
-
-	/* two filters, each trimming: the size left after both is counted */
-	damon_destroy_region(r, t);
-	s->stat = (struct damos_stat){};
-	f->allow = false;
-	f->addr_range = (struct damon_addr_range){
-		.start = 4 * min_sz, .end = 12 * min_sz};
-	f2 = damos_new_filter(DAMOS_FILTER_TYPE_ADDR, true, false);
-	if (!f2) {
-		damon_destroy_ctx(c);
-		kunit_skip(test, "filter alloc fail");
-	}
-	f2->addr_range = (struct damon_addr_range){
-		.start = 2 * min_sz, .end = 3 * min_sz};
-	damos_add_filter(s, f2);
-	damos_set_filters_default_reject(s);
-
-	r = damon_new_region(0, 8 * min_sz);
-	if (!r) {
-		damon_destroy_ctx(c);
-		kunit_skip(test, "region alloc fail");
-	}
-	damon_add_region(r, t);
-
-	damos_apply_scheme(c, t, r, s);
-	KUNIT_EXPECT_EQ(test, damon_nr_regions(t), 3);
-	KUNIT_EXPECT_EQ(test, r->ar.end, 2 * min_sz);
-	KUNIT_EXPECT_EQ(test, s->stat.sz_tried, 2 * min_sz);
-
-	/* a core filter that never splits: counted whole */
-	damos_destroy_filter(f2);
-	damos_destroy_filter(f);
-	f = damos_new_filter(DAMOS_FILTER_TYPE_TARGET, true, true);
-	if (!f) {
-		damon_destroy_ctx(c);
-		kunit_skip(test, "filter alloc fail");
-	}
-	f->target_idx = 0;
-	damos_add_filter(s, f);
-	damos_set_filters_default_reject(s);
-	s->stat = (struct damos_stat){};
-
-	damos_apply_scheme(c, t, r, s);
-	KUNIT_EXPECT_EQ(test, damon_nr_regions(t), 3);
-	KUNIT_EXPECT_EQ(test, r->ar.end, 2 * min_sz);
-	KUNIT_EXPECT_EQ(test, s->stat.sz_tried, 2 * min_sz);
-
-	damon_destroy_ctx(c);
-}
-
-static void damos_test_apply_scheme_quota_sz(struct kunit *test)
-{
-	struct damos_access_pattern pattern = {
-		.min_sz_region = 0,
-		.max_sz_region = ULONG_MAX,
-		.min_nr_accesses = 0,
-		.max_nr_accesses = UINT_MAX,
-		.min_age_region = 0,
-		.max_age_region = UINT_MAX,
-	};
-	unsigned long min_sz = DAMON_MIN_REGION_SZ;
-	struct damos_watermarks wmarks = {};
-	struct damos_quota quota = {};
-	struct damon_region *r, *next;
-	struct damon_ctx *c;
-	struct damon_target *t;
-	struct damos *s;
-
-	c = damon_new_ctx();
-	if (!c)
-		kunit_skip(test, "ctx alloc fail");
-
-	s = damon_new_scheme(&pattern, DAMOS_STAT, 0, &quota, &wmarks,
-			NUMA_NO_NODE);
-	if (!s) {
-		damon_destroy_ctx(c);
-		kunit_skip(test, "scheme alloc fail");
-	}
-	damon_add_scheme(c, s);
-	damos_set_filters_default_reject(s);
-
-	t = damon_new_target();
-	if (!t) {
-		damon_destroy_ctx(c);
-		kunit_skip(test, "target alloc fail");
-	}
-	damon_add_target(c, t);
-
-	/* no apply_scheme operation: the whole region is counted */
-	r = damon_new_region(0, 4 * min_sz);
-	if (!r) {
-		damon_destroy_ctx(c);
-		kunit_skip(test, "region alloc fail");
-	}
-	damon_add_region(r, t);
-
-	damos_apply_scheme(c, t, r, s);
-	KUNIT_EXPECT_EQ(test, s->stat.sz_tried, 4 * min_sz);
-	KUNIT_EXPECT_EQ(test, damon_nr_regions(t), 1);
-
-	/* no filter and no quota: the whole region is counted */
-	c->ops.apply_scheme = damos_test_apply_scheme_stub;
-	s->stat = (struct damos_stat){};
-
-	damos_apply_scheme(c, t, r, s);
-	KUNIT_EXPECT_EQ(test, s->stat.sz_tried, 4 * min_sz);
-	KUNIT_EXPECT_EQ(test, damon_nr_regions(t), 1);
-
-	/* the quota trims the region: the trimmed size is counted */
-	damon_for_each_region_safe(r, next, t)
-		damon_destroy_region(r, t);
-	s->stat = (struct damos_stat){};
-	s->quota.esz = 2 * min_sz;
-	s->quota.charged_sz = 0;
-
-	r = damon_new_region(0, 8 * min_sz);
-	if (!r) {
-		damon_destroy_ctx(c);
-		kunit_skip(test, "region alloc fail");
-	}
-	damon_add_region(r, t);
-
-	damos_apply_scheme(c, t, r, s);
-	KUNIT_EXPECT_EQ(test, r->ar.end, 2 * min_sz);
-	KUNIT_EXPECT_EQ(test, s->stat.sz_tried, 2 * min_sz);
-
-	/* quota remainder below one region: tried, but nothing counted */
-	damon_for_each_region_safe(r, next, t)
-		damon_destroy_region(r, t);
-	s->stat = (struct damos_stat){};
-	s->quota.esz = 1;
-	s->quota.charged_sz = 0;
-
-	r = damon_new_region(0, 4 * min_sz);
-	if (!r) {
-		damon_destroy_ctx(c);
-		kunit_skip(test, "region alloc fail");
-	}
-	damon_add_region(r, t);
-
-	damos_apply_scheme(c, t, r, s);
-	KUNIT_EXPECT_EQ(test, s->stat.nr_tried, 1);
-	KUNIT_EXPECT_EQ(test, s->stat.sz_tried, 0);
-	KUNIT_EXPECT_EQ(test, r->ar.end, 4 * min_sz);
-
-	damon_destroy_ctx(c);
-}
-
 static void damon_test_feed_loop_next_input(struct kunit *test)
 {
 	unsigned long last_input = 900000, current_score = 200;
@@ -2780,9 +2467,6 @@ static struct kunit_case damon_test_cases[] = {
 	KUNIT_CASE(damos_test_age_ms_filter_is_core),
 	KUNIT_CASE(damos_test_age_ms_filter_interval_changes),
 	KUNIT_CASE(damos_test_filter_out),
-	KUNIT_CASE(damos_test_apply_scheme_filtered_sz),
-	KUNIT_CASE(damos_test_apply_scheme_filter_sz_unchanged),
-	KUNIT_CASE(damos_test_apply_scheme_quota_sz),
 	KUNIT_CASE(damon_test_feed_loop_next_input),
 	KUNIT_CASE(damon_test_set_filters_default_reject),
 	KUNIT_CASE(damon_test_apply_min_nr_regions),
-- 
2.47.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [RFC PATCH 2/3] mm/damon/core: apply damos core filter in __damos_valid_target()
  2026-11-30 15:22 [RFC PATCH 0/3] mm/damon: treat DAMOS core filters as a primary target selection method SJ Park
  2026-11-30 15:22 ` [RFC PATCH 1/3] Revert "mm/damon/tests/core-kunit: test the size charged for a filter-trimmed region" SJ Park
@ 2026-11-30 15:22 ` SJ Park
  2026-11-30 15:22 ` [RFC PATCH 3/3] Docs/mm/damon/design: update node_eligible_mem_bp for changed behavior SJ Park
  2026-11-30 15:33 ` [RFC PATCH 0/3] mm/damon: treat DAMOS core filters as a primary target selection method sashiko-bot
  3 siblings, 0 replies; 7+ messages in thread
From: SJ Park @ 2026-11-30 15:22 UTC (permalink / raw)
  Cc: SJ Park, Andrew Morton, damon, linux-mm

DAMOS access pattern is the primary target region selection method.  It
uses DAMOS core filters as only secondary filters.  Hence DAMOS core
filters are applied in damos_apply_scheme() and damos_adjust_quota().

There is no real reason to keep filters as secondary class.  The
multiple places for core filters application only make it duplicated and
easy to make mistakes.  Also, users can distinguish target regions based
on probe_hits using only core filters.  In the attributes only
monitoring mode, core filters become the primary target region selection
method for this reason.

Treat DAMOS core filter as the primary method.  Handle it in a single
place, __damos_valid_target(), which is handling the DAMOS access
pattern.  Update __damos_valid_target() to receive damon_ctx, to allow
it access to core filters.

One consequence of this change is that DAMOS_QUOTA_NODE_ELIGIBLE_MEM_BP
will be aware of the core filters.  It is a sort of behavioral change.
But it is hard to imagine users who really depend on the old behavior.
The new behavior is rather more intuitive in my opinion.

Signed-off-by: SJ Park <sj@kernel.org>
---
 mm/damon/core.c | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/mm/damon/core.c b/mm/damon/core.c
index 2766ebec0150..6345cbc60bfb 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -2535,12 +2535,20 @@ static noinline_for_stack void kdamond_tune_intervals(struct damon_ctx *c)
 	damon_set_attrs(c, &new_attrs);
 }
 
+static bool damos_core_filter_out(struct damon_ctx *ctx,
+		struct damon_target *t, struct damon_region *r,
+		struct damos *s);
+
 static bool __damos_valid_target(struct damon_region *r, struct damos *s,
-		struct damon_ctx *c)
+		struct damon_ctx *c, struct damon_target *t)
 {
 	unsigned long sz;
-	unsigned int nr_accesses = damon_nr_accesses_mvsum(r, c);
+	unsigned int nr_accesses;
+
+	if (damos_core_filter_out(c, t, r, s))
+		return false;
 
+	nr_accesses = damon_nr_accesses_mvsum(r, c);
 	sz = damon_sz_region(r);
 	return s->pattern.min_sz_region <= sz &&
 		sz <= s->pattern.max_sz_region &&
@@ -2563,9 +2571,9 @@ static bool damos_quota_is_set(struct damos_quota *quota)
 }
 
 static bool damos_valid_target(struct damon_ctx *c, struct damon_region *r,
-		struct damos *s)
+		struct damos *s, struct damon_target *t)
 {
-	bool ret = __damos_valid_target(r, s, c);
+	bool ret = __damos_valid_target(r, s, c, t);
 
 	if (!ret || !damos_quota_is_set(&s->quota) || !c->ops.get_scheme_score)
 		return ret;
@@ -2896,8 +2904,6 @@ static void damos_apply_scheme(struct damon_ctx *c, struct damon_target *t,
 	}
 
 	if (c->ops.apply_scheme) {
-		if (damos_core_filter_out(c, t, r, s))
-			return;
 		sz = damon_sz_region(r);
 		if (damos_quota_is_set(quota) &&
 				quota->charged_sz + sz > quota->esz) {
@@ -2957,7 +2963,7 @@ static void damon_do_apply_schemes(struct damon_ctx *c,
 				s->max_nr_snapshots <= s->stat.nr_snapshots)
 			continue;
 
-		if (damos_valid_target(c, r, s))
+		if (damos_valid_target(c, r, s, t))
 			damos_apply_scheme(c, t, r, s);
 
 		if (damon_is_last_region(r, t))
@@ -3218,7 +3224,7 @@ static phys_addr_t damos_calc_eligible_bytes(struct damon_ctx *c,
 		damon_for_each_region(r, t) {
 			phys_addr_t addr, end_addr;
 
-			if (!__damos_valid_target(r, s, c))
+			if (!__damos_valid_target(r, s, c, t))
 				continue;
 
 			/* Convert from core address units to physical bytes */
@@ -3565,9 +3571,7 @@ static void damos_adjust_quota(struct damon_ctx *c, struct damos *s)
 			(DAMOS_MAX_SCORE + 1));
 	damon_for_each_target(t, c) {
 		damon_for_each_region(r, t) {
-			if (!__damos_valid_target(r, s, c))
-				continue;
-			if (damos_core_filter_out(c, t, r, s))
+			if (!__damos_valid_target(r, s, c, t))
 				continue;
 			score = c->ops.get_scheme_score(c, r, s);
 			c->regions_score_histogram[score] +=
-- 
2.47.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [RFC PATCH 3/3] Docs/mm/damon/design: update node_eligible_mem_bp for changed behavior
  2026-11-30 15:22 [RFC PATCH 0/3] mm/damon: treat DAMOS core filters as a primary target selection method SJ Park
  2026-11-30 15:22 ` [RFC PATCH 1/3] Revert "mm/damon/tests/core-kunit: test the size charged for a filter-trimmed region" SJ Park
  2026-11-30 15:22 ` [RFC PATCH 2/3] mm/damon/core: apply damos core filter in __damos_valid_target() SJ Park
@ 2026-11-30 15:22 ` SJ Park
  2026-11-30 15:33 ` [RFC PATCH 0/3] mm/damon: treat DAMOS core filters as a primary target selection method sashiko-bot
  3 siblings, 0 replies; 7+ messages in thread
From: SJ Park @ 2026-11-30 15:22 UTC (permalink / raw)
  Cc: SJ Park, Jonathan Corbet, Randy Dunlap, Shuah Khan, damon,
	linux-doc, linux-mm

DAMOS quota goal type node_eligible_mem_bp quota was accounting for
regions that were eligible by only the DAMOS access pattern.  The
behavior is now changed to also account for DAMOS core filters.  Update
the document to cover the new behavior.

Signed-off-by: SJ Park <sj@kernel.org>
---
 Documentation/mm/damon/design.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst
index 70baeef7ec91..5d383fb7ba4c 100644
--- a/Documentation/mm/damon/design.rst
+++ b/Documentation/mm/damon/design.rst
@@ -774,8 +774,8 @@ auto-tuning mechanism tries to make ``current_value`` of ``complement``-ed
   (1/10,000).
 - ``inactive_mem_bp``: Inactive to active + inactive (LRU) memory size ratio in
   bp (1/10,000).
-- ``node_eligible_mem_bp``: Scheme target access pattern-eligible memory ratio
-  of a node in bp (1/10,000).
+- ``node_eligible_mem_bp``: Scheme action eligible memory ratio of a node in bp
+  (1/10,000).
 - ``hugepage_mem_bp``: Total huge page to total used memory ratio in bp
   (1/10,000).
 
-- 
2.47.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [RFC PATCH 1/3] Revert "mm/damon/tests/core-kunit: test the size charged for a filter-trimmed region"
  2026-11-30 15:22 ` [RFC PATCH 1/3] Revert "mm/damon/tests/core-kunit: test the size charged for a filter-trimmed region" SJ Park
@ 2026-11-30 15:32   ` sashiko-bot
  2026-11-30 15:57     ` SJ Park
  0 siblings, 1 reply; 7+ messages in thread
From: sashiko-bot @ 2026-11-30 15:32 UTC (permalink / raw)
  To: SJ Park
  Cc: Andrew Morton, Brendan Higgins, David Gow, damon, kunit-dev,
	linux-mm

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] mm/damon: revert removes quota KUnit test
  damos_test_apply_scheme_quota_sz()
--

commit 4862262ff70f1be1e1a5ee23327f2295ebc0c57d
Author: SJ Park <sj@kernel.org>

Revert "mm/damon/tests/core-kunit: test the size charged for a filter-trimmed region"

This commit reverts 1c3352282063 ("mm/damon/tests/core-kunit: test the size
charged for a filter-trimmed region"), removing its KUnit test cases from
mm/damon/tests/core-kunit.h.

> diff --git a/mm/damon/tests/core-kunit.h b/mm/damon/tests/core-kunit.h
> index 73c3bd6a96125..5244ac0ffc285 100644
> --- a/mm/damon/tests/core-kunit.h
> +++ b/mm/damon/tests/core-kunit.h

[ ... ]

> @@ -2780,9 +2467,6 @@ static struct kunit_case damon_test_cases[] = {
>  	KUNIT_CASE(damos_test_age_ms_filter_is_core),
>  	KUNIT_CASE(damos_test_age_ms_filter_interval_changes),
>  	KUNIT_CASE(damos_test_filter_out),
> -	KUNIT_CASE(damos_test_apply_scheme_filtered_sz),
> -	KUNIT_CASE(damos_test_apply_scheme_filter_sz_unchanged),
> -	KUNIT_CASE(damos_test_apply_scheme_quota_sz),

[Severity: Low]
Does reverting 1c3352282063 ("mm/damon/tests/core-kunit: test the size
charged for a filter-trimmed region") in full also drop
damos_test_apply_scheme_quota_sz(), which does not test core filters?

The commit message says 1c3352282063 ("mm/damon/tests/core-kunit: test
the size charged for a filter-trimmed region") added two tests that
duplicate damos_test_filter_out(), but it added three.  The third test,
damos_test_apply_scheme_quota_sz(), uses no filters and instead tests
damos_apply_scheme() when c->ops.apply_scheme is NULL, when quota.esz
splits a region, and when the remaining quota is smaller than a region,
none of which damos_test_filter_out() covers.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261130152242.90137-1-sj@kernel.org?part=1

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFC PATCH 0/3] mm/damon: treat DAMOS core filters as a primary target selection method
  2026-11-30 15:22 [RFC PATCH 0/3] mm/damon: treat DAMOS core filters as a primary target selection method SJ Park
                   ` (2 preceding siblings ...)
  2026-11-30 15:22 ` [RFC PATCH 3/3] Docs/mm/damon/design: update node_eligible_mem_bp for changed behavior SJ Park
@ 2026-11-30 15:33 ` sashiko-bot
  3 siblings, 0 replies; 7+ messages in thread
From: sashiko-bot @ 2026-11-30 15:33 UTC (permalink / raw)
  To: SJ Park; +Cc: damon

Sashiko has finished reviewing this 3-patch series:

- Patches 2 and 3: no issues found.
- Patch 1 ("Revert "mm/damon/tests/core-kunit: test the size cha..."): 1
  potential issue (1 Low)

A detailed review has been sent as a separate reply to patch 1.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261130152242.90137-1-sj@kernel.org

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [RFC PATCH 1/3] Revert "mm/damon/tests/core-kunit: test the size charged for a filter-trimmed region"
  2026-11-30 15:32   ` sashiko-bot
@ 2026-11-30 15:57     ` SJ Park
  0 siblings, 0 replies; 7+ messages in thread
From: SJ Park @ 2026-11-30 15:57 UTC (permalink / raw)
  To: sashiko-bot
  Cc: SJ Park, Andrew Morton, Brendan Higgins, David Gow, damon,
	kunit-dev, linux-mm

On Mon, 30 Nov 2026 15:32:49 +0000 sashiko-bot@kernel.org wrote:

> Thank you for your contribution! Sashiko AI review found 1 potential
> issue to consider:
> - [Low] mm/damon: revert removes quota KUnit test
>   damos_test_apply_scheme_quota_sz()
> --
> 
> commit 4862262ff70f1be1e1a5ee23327f2295ebc0c57d
> Author: SJ Park <sj@kernel.org>
> 
> Revert "mm/damon/tests/core-kunit: test the size charged for a filter-trimmed region"
> 
> This commit reverts 1c3352282063 ("mm/damon/tests/core-kunit: test the size
> charged for a filter-trimmed region"), removing its KUnit test cases from
> mm/damon/tests/core-kunit.h.
> 
> > diff --git a/mm/damon/tests/core-kunit.h b/mm/damon/tests/core-kunit.h
> > index 73c3bd6a96125..5244ac0ffc285 100644
> > --- a/mm/damon/tests/core-kunit.h
> > +++ b/mm/damon/tests/core-kunit.h
> 
> [ ... ]
> 
> > @@ -2780,9 +2467,6 @@ static struct kunit_case damon_test_cases[] = {
> >  	KUNIT_CASE(damos_test_age_ms_filter_is_core),
> >  	KUNIT_CASE(damos_test_age_ms_filter_interval_changes),
> >  	KUNIT_CASE(damos_test_filter_out),
> > -	KUNIT_CASE(damos_test_apply_scheme_filtered_sz),
> > -	KUNIT_CASE(damos_test_apply_scheme_filter_sz_unchanged),
> > -	KUNIT_CASE(damos_test_apply_scheme_quota_sz),
> 
> [Severity: Low]
> Does reverting 1c3352282063 ("mm/damon/tests/core-kunit: test the size
> charged for a filter-trimmed region") in full also drop
> damos_test_apply_scheme_quota_sz(), which does not test core filters?

Makes sense.  I will drop only the first two tests.

> 
> The commit message says 1c3352282063 ("mm/damon/tests/core-kunit: test
> the size charged for a filter-trimmed region") added two tests that
> duplicate damos_test_filter_out(), but it added three.  The third test,
> damos_test_apply_scheme_quota_sz(), uses no filters and instead tests
> damos_apply_scheme() when c->ops.apply_scheme is NULL, when quota.esz
> splits a region, and when the remaining quota is smaller than a region,
> none of which damos_test_filter_out() covers.
> 
> -- 
> Sashiko AI review · https://sashiko.dev/#/patchset/20261130152242.90137-1-sj@kernel.org?part=1
> 


Thanks,
SJ

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-11-30 15:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30 15:22 [RFC PATCH 0/3] mm/damon: treat DAMOS core filters as a primary target selection method SJ Park
2026-11-30 15:22 ` [RFC PATCH 1/3] Revert "mm/damon/tests/core-kunit: test the size charged for a filter-trimmed region" SJ Park
2026-11-30 15:32   ` sashiko-bot
2026-11-30 15:57     ` SJ Park
2026-11-30 15:22 ` [RFC PATCH 2/3] mm/damon/core: apply damos core filter in __damos_valid_target() SJ Park
2026-11-30 15:22 ` [RFC PATCH 3/3] Docs/mm/damon/design: update node_eligible_mem_bp for changed behavior SJ Park
2026-11-30 15:33 ` [RFC PATCH 0/3] mm/damon: treat DAMOS core filters as a primary target selection method sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox