summaryrefslogtreecommitdiff
path: root/mm/damon/sysfs-common.h
diff options
context:
space:
mode:
authorSeongJae Park <sj@kernel.org>2023-10-12 22:22:54 +0300
committerAndrew Morton <akpm@linux-foundation.org>2023-10-19 00:34:19 +0300
commit76126332c7606ba25a4ae5db37145fd526985b45 (patch)
treec684151ef0c3837a45faf3a4190c8537dc9baeb4 /mm/damon/sysfs-common.h
parent4d4e41b682990b1dc5bba2bc313800340bf5c2d4 (diff)
downloadlinux-76126332c7606ba25a4ae5db37145fd526985b45.tar.xz
mm/damon/sysfs: avoid empty scheme tried regions for large apply interval
DAMON_SYSFS assumes all schemes will be applied for at least one DAMON monitoring results snapshot within one aggregation interval, or makes no sense to wait for it while DAMON is deactivated by the watermarks. That for deactivated status still makes sense, but the aggregation interval based assumption is invalid now because each scheme can has its own apply interval. For schemes having larger than the aggregation or watermarks check interval, DAMOS tried regions update request can be finished without the update. Avoid the case by explicitly checking the status of the schemes tried regions update and watermarks based DAMON deactivation. Link: https://lkml.kernel.org/r/20231012192256.33556-3-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/damon/sysfs-common.h')
-rw-r--r--mm/damon/sysfs-common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/damon/sysfs-common.h b/mm/damon/sysfs-common.h
index fd482a0639b4..5ff081226e28 100644
--- a/mm/damon/sysfs-common.h
+++ b/mm/damon/sysfs-common.h
@@ -49,6 +49,8 @@ int damon_sysfs_schemes_update_regions_start(
struct damon_sysfs_schemes *sysfs_schemes,
struct damon_ctx *ctx, bool total_bytes_only);
+bool damos_sysfs_regions_upd_done(void);
+
int damon_sysfs_schemes_update_regions_stop(struct damon_ctx *ctx);
int damon_sysfs_schemes_clear_regions(