]> Git Repo - linux.git/commit
mm/damon/sysfs-schemes: add timeout for update_schemes_tried_regions
authorSeongJae Park <[email protected]>
Fri, 24 Nov 2023 21:38:40 +0000 (21:38 +0000)
committerAndrew Morton <[email protected]>
Thu, 7 Dec 2023 00:12:48 +0000 (16:12 -0800)
commit7d6fa31a2fd7072376b3c8be66bf8527b2c8208c
treea9f2cdfe69df6c7ab9cb791f422c80169227a517
parent854f2764b5771e450b44e6a5fddb6872deb5bb56
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.

Link: https://lkml.kernel.org/r/[email protected]
Fixes: 4d4e41b68299 ("mm/damon/sysfs-schemes: do not update tried regions more than one DAMON snapshot")
Signed-off-by: SeongJae Park <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
mm/damon/sysfs-schemes.c
This page took 0.052348 seconds and 4 git commands to generate.