Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mm/damon/stat: deduplicate intervals_goal setup in damon_stat_build_ctx()

The damon_stat_build_ctx() function sets the values of intervals_goal
structure members. These values are applied to damon_ctx in
damon_set_attrs(). However, It is resetting the values that were already
applied previously to the same values. I suggest removing this code as it
constitutes duplicate execution.

Link: https://patch.msgid.link/20251206011716.7185-1-rgbi3307@gmail.com
Link: https://lkml.kernel.org/r/20251216073440.40891-1-sj@kernel.org
Signed-off-by: JaeJoon Jung <rgbi3307@gmail.com>
Reviewed-by: Enze Li <lienze@kylinos.cn>
Reviewed-by: SeongJae Park <sj@kernel.org>
Signed-off-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

JaeJoon Jung and committed by
Andrew Morton
9082f24b 804c26b9

-8
-8
mm/damon/stat.c
··· 173 173 if (damon_set_attrs(ctx, &attrs)) 174 174 goto free_out; 175 175 176 - /* 177 - * auto-tune sampling and aggregation interval aiming 4% DAMON-observed 178 - * accesses ratio, keeping sampling interval in [5ms, 10s] range. 179 - */ 180 - ctx->attrs.intervals_goal = (struct damon_intervals_goal) { 181 - .access_bp = 400, .aggrs = 3, 182 - .min_sample_us = 5000, .max_sample_us = 10000000, 183 - }; 184 176 if (damon_select_ops(ctx, DAMON_OPS_PADDR)) 185 177 goto free_out; 186 178