[PATCH RESEND 1/3] mm/damon/core: clarify next_intervals_tune_sis update path
From: SeongJae Park
Date: Tue May 19 2026 - 21:21:35 EST
From: niecheng <niecheng1@xxxxxxxxxxxxx>
damon_set_attrs() updates next_aggregation_sis and
next_ops_update_sis for online attrs updates, but it does not update
next_intervals_tune_sis there.
This can look like a missing update when reading damon_set_attrs()
alone, while next_intervals_tune_sis is actually updated in
kdamond_fn().
Add a short comment to make this explicit.
Suggested-by: SeongJae Park <sj@xxxxxxxxxx>
Signed-off-by: niecheng <niecheng1@xxxxxxxxxxxxx>
Reviewed-by: SeongJae Park <sj@xxxxxxxxxx>
Signed-off-by: SeongJae Park <sj@xxxxxxxxxx>
---
Changes from v2
- v2: https://lore.kernel.org/D3B0C1F5BB6ADCE4+20260514163751.3399513-1-niecheng1@xxxxxxxxxxxxx
- Collect Reviewed-by: tag.
- Rebase to latest mm-new.
Changes from v1
- v1: https://lore.kernel.org/7946CE4E0773AEF7+20260514074846.3258908-1-niecheng1@xxxxxxxxxxxxx
- Keep the behavior and clarify it instead.
mm/damon/core.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/mm/damon/core.c b/mm/damon/core.c
index 4e223857a0f99..68b3b4bbc8fc9 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -909,6 +909,9 @@ int damon_set_attrs(struct damon_ctx *ctx, struct damon_attrs *attrs)
attrs->aggr_interval / sample_interval;
ctx->next_ops_update_sis = ctx->passed_sample_intervals +
attrs->ops_update_interval / sample_interval;
+ /*
+ * next_intervals_tune_sis will be updated inside kdamond_fn().
+ */
damon_update_monitoring_results(ctx, attrs, aggregating);
ctx->attrs = *attrs;
--
2.47.3