Commit 7f8ed76f authored by SeongJae Park's avatar SeongJae Park Committed by Lee Jones
Browse files

UPSTREAM: mm/damon/sysfs-schemes: add timeout for update_schemes_tried_regions

If a scheme is set to not applied to any monitoring target region for any
reasons including the target access pattern, quota, filters, or
watermarks, writing 'update_schemes_tried_regions' to 'state' DAMON sysfs
file can indefinitely hang.  Fix the case by implementing a timeout for
the operation.  The time limit is two apply intervals of each scheme.

Bug: 254441685
Link: https://lkml.kernel.org/r/20231124213840.39157-1-sj@kernel.org


Fixes: 4d4e41b6 ("mm/damon/sysfs-schemes: do not update tried regions more than one DAMON snapshot")
Signed-off-by: default avatarSeongJae Park <sj@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 7d6fa31a)
Signed-off-by: default avatarLee Jones <joneslee@google.com>
Change-Id: Ibcb7d345d52a114af6f4a5beb5e8e4976e2644ac
parent ba95736c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment