]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
mm/damon/core: clarify next_intervals_tune_sis update path
authorniecheng <niecheng1@uniontech.com>
Wed, 20 May 2026 01:20:59 +0000 (18:20 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 2 Jun 2026 22:22:34 +0000 (15:22 -0700)
Patch series "mm/damon: documentation and comment fixes".

This patch (of 3):

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.

Link: https://lore.kernel.org/20260520012104.93602-1-sj@kernel.org
Link: https://lore.kernel.org/20260520012104.93602-2-sj@kernel.org
Suggested-by: SeongJae Park <sj@kernel.org>
Signed-off-by: niecheng <niecheng1@uniontech.com>
Signed-off-by: SeongJae Park <sj@kernel.org>
Reviewed-by: SeongJae Park <sj@kernel.org>
Cc: David Hildenbrand <david@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@kernel.org>
Cc: Sakurai Shun <ssh1326@icloud.com>
Cc: Zenghui Yu <zenghui.yu@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/core.c

index 4e223857a0f99234f6e952ea9af16969a126aedd..68b3b4bbc8fc9ea41e5d653eaceb05333d230966 100644 (file)
@@ -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;