diff options
author | SeongJae Park <sj@kernel.org> | 2024-02-02 11:19:56 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-02-23 09:51:55 +0100 |
commit | cd9ff8dd70226f511cd43cfc09680dcd70bccc35 (patch) | |
tree | 4a951bbe1951b35f3ef506fd7e2eaf163774fe96 /mm | |
parent | 065207a723e2570945d35ad5d9056d2c809aab92 (diff) | |
download | linux-stable-cd9ff8dd70226f511cd43cfc09680dcd70bccc35.tar.gz linux-stable-cd9ff8dd70226f511cd43cfc09680dcd70bccc35.tar.bz2 linux-stable-cd9ff8dd70226f511cd43cfc09680dcd70bccc35.zip |
mm/damon/sysfs-schemes: fix wrong DAMOS tried regions update timeout setup
commit b9e4bc1046d20e0623a80660ef8627448056f817 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/damon/sysfs-schemes.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/damon/sysfs-schemes.c b/mm/damon/sysfs-schemes.c index fe0fe2562000..786b06239ccf 100644 --- a/mm/damon/sysfs-schemes.c +++ b/mm/damon/sysfs-schemes.c @@ -1928,7 +1928,7 @@ static void damos_tried_regions_init_upd_status( sysfs_regions->upd_timeout_jiffies = jiffies + 2 * usecs_to_jiffies(scheme->apply_interval_us ? scheme->apply_interval_us : - ctx->attrs.sample_interval); + ctx->attrs.aggr_interval); } } |