Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm/damon/core: preserve deadlines when tuned intervals are unchanged
@ 2026-12-03 17:47 Aveline Noir
  2026-12-04  7:57 ` Enze Li
  2026-12-04 15:25 ` SJ Park
  0 siblings, 2 replies; 3+ messages in thread
From: Aveline Noir @ 2026-12-03 17:47 UTC (permalink / raw)
  To: SJ Park; +Cc: linux-kernel, Andrew Morton, damon, linux-mm

kdamond_tune_intervals() calls damon_set_attrs() even when clamping or
rounding leaves the sampling and aggregation intervals unchanged. This
restarts the ops update and DAMOS apply deadlines. Repeated same-value
tuning can keep deferring longer update and apply intervals.

Return early when both intervals are unchanged.

Fixes: f04b0fedbe71 ("mm/damon/core: implement intervals auto-tuning")
Signed-off-by: Aveline Noir <jm5905938@gmail.com>
---
 mm/damon/core.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/mm/damon/core.c b/mm/damon/core.c
index 946b28440dff..b3283292c289 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -2429,6 +2429,9 @@ static noinline_for_stack void kdamond_tune_intervals(struct damon_ctx *c)
 	new_attrs.aggr_interval = new_attrs.sample_interval *
 		c->attrs.aggr_samples;
 	trace_damon_monitor_intervals_tune(new_attrs.sample_interval);
+	if (new_attrs.sample_interval == c->attrs.sample_interval &&
+			new_attrs.aggr_interval == c->attrs.aggr_interval)
+		return;
 	damon_set_attrs(c, &new_attrs);
 }
 

---
base-commit: 067c5c24cef23d913b67eaaf71ae67e7169a6620
change-id: 20261204-damon-preserve-tuning-deadlines-70ed8f2c77ef



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

end of thread, other threads:[~2026-12-04 15:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 17:47 [PATCH] mm/damon/core: preserve deadlines when tuned intervals are unchanged Aveline Noir
2026-12-04  7:57 ` Enze Li
2026-12-04 15:25 ` SJ Park

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