mm/damon/sysfs-schemes: fix wrong DAMOS tried regions update timeout setup
authorSeongJae Park <sj@kernel.org>
Fri, 2 Feb 2024 19:19:56 +0000 (11:19 -0800)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 8 Feb 2024 05:20:36 +0000 (21:20 -0800)
commitb9e4bc1046d20e0623a80660ef8627448056f817
treef25eac90227f7f22cac67d25d98ad8717ff5d27d
parent38296afe3c6ee07319e01bb249aa4bb47c07b534
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: 7d6fa31a2fd7 ("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>
mm/damon/sysfs-schemes.c