Skip to content

Commit b9e4bc1

Browse files
sjp38akpm00
authored andcommitted
mm/damon/sysfs-schemes: fix wrong DAMOS tried regions update timeout setup
DAMON sysfs interface's update_schemes_tried_regions command has a timeout of two apply intervals of the DAMOS scheme. Having zero value DAMOS scheme apply interval means it will use the aggregation interval as the value. However, the timeout setup logic is mistakenly using the sampling interval insted of the aggregartion interval for the case. This could cause earlier-than-expected timeout of the command. Fix it. Link: https://lkml.kernel.org/r/20240202191956.88791-1-sj@kernel.org Fixes: 7d6fa31 ("mm/damon/sysfs-schemes: add timeout for update_schemes_tried_regions") Signed-off-by: SeongJae Park <sj@kernel.org> Cc: <stable@vger.kernel.org> # 6.7.x Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 38296af commit b9e4bc1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/damon/sysfs-schemes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2194,7 +2194,7 @@ static void damos_tried_regions_init_upd_status(
21942194
sysfs_regions->upd_timeout_jiffies = jiffies +
21952195
2 * usecs_to_jiffies(scheme->apply_interval_us ?
21962196
scheme->apply_interval_us :
2197-
ctx->attrs.sample_interval);
2197+
ctx->attrs.aggr_interval);
21982198
}
21992199
}
22002200

0 commit comments

Comments
 (0)