mm/damon/core.c | 3 +++ 1 file changed, 3 insertions(+)
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@kernel.org>
Link: https://lore.kernel.org/linux-mm/20260514144102.120203-1-sj@kernel.org/
Signed-off-by: niecheng <niecheng1@uniontech.com>
---
mm/damon/core.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/mm/damon/core.c b/mm/damon/core.c
index 3dbbbfdeff71..a21ae41ca695 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -797,6 +797,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.51.0
Hello nicheng, On Fri, 15 May 2026 00:37:51 +0800 niecheng <niecheng1@uniontech.com> wrote: > 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. Thank you for making the code easier to read! > > Suggested-by: SeongJae Park <sj@kernel.org> > Link: https://lore.kernel.org/linux-mm/20260514144102.120203-1-sj@kernel.org/ So this is a second version of the patch on the above link, right? From the next time, please add the version on the subject prefix, e.g., [PATCH v2]. Also, from the next time,please post a new version of patches as new thread, rather than a reply to the previous version, with the revision changelog with the link to the previous version [1] on the commentary area. > Signed-off-by: niecheng <niecheng1@uniontech.com> Reviewed-by: SeongJae Park <sj@kernel.org> [1] https://docs.kernel.org/process/submitting-patches.html#commentary Thanks, SJ [...]
© 2016 - 2026 Red Hat, Inc.