mm/damon/stat: deduplicate intervals_goal setup in damon_stat_build_ctx()
Subsystems (2)
PATCH v3 1/1 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.
--- mm/damon/stat.c | 8 -------- 1 file changed, 8 deletions(-)
mm/damon/stat.c +0 -8
@@ -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;
Signature · 1 line
2.43.0
SeongJae Park
maintainerQuoted 8 lines · On Sat, 6 Dec 2025 10:17:13 +0900 JaeJoon Jung <[email protected]> wrote:
The
damon_stat_build_ctx()function sets the values ofintervals_goalstructure members. These values are applied todamon_ctxindamon_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 <[email protected]>Reviewed-by Enze Li <[email protected]>
I show Enze did suggest changes [1] to v2 of this patch. But I don't show Enze gave Reviewed-by: tag to the patch. Am I missing something?
[1] https://lore.kernel.org/875xal44lf.fsf@
Quoted 1 line
Reviewed-by SeongJae Park <[email protected]>
Thanks,
SJ
[...]
Quoted 9 lines · SeongJae Park
Quoted 6 lines · On Sat, 6 Dec 2025 10:17:13 +0900 JaeJoon Jung <[email protected]> wrote:
The
damon_stat_build_ctx()function sets the values ofintervals_goalstructure members. These values are applied todamon_ctxindamon_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.
Quoted 5 lines
Quoted 2 lines
Signed-off-by JaeJoon Jung <[email protected]>Reviewed-by Enze Li <[email protected]>I show Enze did suggest changes [1] to v2 of this patch. But I don't show Enze gave Reviewed-by: tag to the patch. Am I missing something?
I added "Reviewed-by: Enze".
It is just minor commit message format suggestion. Am I putting too much emphasis on this? Should I delete "Reviewed-by: Enze"?
Quoted 10 lines
[1] https://lore.kernel.org/875xal44lf.fsf@
Quoted 1 line
Reviewed-by SeongJae Park <[email protected]>Thanks,
SJ[...]
Enze Li
Reviewed-byQuoted 13 lines · JaeJoon Jung
Quoted 12 lines · SeongJae Park
Quoted 8 lines · On Sat, 6 Dec 2025 10:17:13 +0900 JaeJoon Jung <[email protected]> wrote:
The
damon_stat_build_ctx()function sets the values ofintervals_goalstructure members. These values are applied todamon_ctxindamon_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 <[email protected]>Reviewed-by Enze Li <[email protected]>
Quoted 7 lines
Quoted 2 lines
I show Enze did suggest changes [1] to v2 of this patch. But I don't show Enze gave Reviewed-by: tag to the patch. Am I missing something?
I added "Reviewed-by: Enze".
It is just minor commit message format suggestion. Am I putting too much emphasis on this? Should I delete "Reviewed-by: Enze"?
I have carefully reviewed both the commit message and the code changes in the patch, it looks good to me.
Feel free to add,
Thanks,
Enze
<...>
SeongJae Park
maintainerQuoted 14 lines · On Sat, 6 Dec 2025 15:58:45 +0800 Enze Li <[email protected]> wrote:
Quoted 13 lines · JaeJoon Jung
Quoted 12 lines · SeongJae Park
Quoted 8 lines · On Sat, 6 Dec 2025 10:17:13 +0900 JaeJoon Jung <[email protected]> wrote:
The
damon_stat_build_ctx()function sets the values ofintervals_goalstructure members. These values are applied todamon_ctxindamon_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 <[email protected]>Reviewed-by Enze Li <[email protected]>
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
I show Enze did suggest changes [1] to v2 of this patch. But I don't show Enze gave Reviewed-by: tag to the patch. Am I missing something?
I added "Reviewed-by: Enze".
It is just minor commit message format suggestion. Am I putting too much emphasis on this?
Reviewed-by: tags are kind of approval. Those should be offered by the reviewer. Please refert to the doc [1] for more details.
Quoted 1 line
Quoted 1 line
Should I delete "Reviewed-by: Enze"?
Because Enze offered the tag below, no change is needed.
Quoted 7 lines
I have carefully reviewed both the commit message and the code changes in the patch, it looks good to me.
Feel free to add,
Reviewed-by Enze Li <[email protected]>
Thank you for your review, Enze.
Thanks,
SJ
[...]