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. Signed-off-by: JaeJoon Jung Reviewed-by: Enze Li Reviewed-by: SeongJae Park --- mm/damon/stat.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/mm/damon/stat.c b/mm/damon/stat.c index bf8626859902..51dd29685915 100644 --- a/mm/damon/stat.c +++ b/mm/damon/stat.c @@ -173,14 +173,6 @@ static struct damon_ctx *damon_stat_build_ctx(void) if (damon_set_attrs(ctx, &attrs)) goto free_out; - /* - * auto-tune sampling and aggregation interval aiming 4% DAMON-observed - * accesses ratio, keeping sampling interval in [5ms, 10s] range. - */ - ctx->attrs.intervals_goal = (struct damon_intervals_goal) { - .access_bp = 400, .aggrs = 3, - .min_sample_us = 5000, .max_sample_us = 10000000, - }; if (damon_select_ops(ctx, DAMON_OPS_PADDR)) goto free_out; -- 2.43.0