summaryrefslogtreecommitdiff
path: root/mm/damon/sysfs-common.h
diff options
context:
space:
mode:
authorSeongJae Park <sj@kernel.org>2023-08-02 21:32:18 +0000
committerAndrew Morton <akpm@linux-foundation.org>2023-08-21 13:37:34 -0700
commit6ad243b83b5094026fdb3171711ddb25246b3d8a (patch)
tree92fac83fbbb5c6a3b4f47ba8b5d89462c3d18222 /mm/damon/sysfs-common.h
parentb69f92a741405336fb17a8a3d67fc144192fe8e2 (diff)
mm/damon/sysfs: implement a command for updating only schemes tried total bytes
Using tried_regions/total_bytes file, users can efficiently retrieve the total size of memory regions having specific access pattern. However, DAMON sysfs interface in kernel still populates all the infomration on the tried_regions subdirectories. That means the kernel part overhead for the construction of tried regions directories still exists. To remove the overhead, implement yet another command input for 'state' DAMON sysfs file. Writing the input to the file makes DAMON sysfs interface to update only the total_bytes file. Link: https://lkml.kernel.org/r/20230802213222.109841-3-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Shuah Khan <shuah@kernel.org> 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, 1 insertions, 1 deletions
diff --git a/mm/damon/sysfs-common.h b/mm/damon/sysfs-common.h
index db677eba78fd..fd482a0639b4 100644
--- a/mm/damon/sysfs-common.h
+++ b/mm/damon/sysfs-common.h
@@ -47,7 +47,7 @@ void damon_sysfs_schemes_update_stats(
int damon_sysfs_schemes_update_regions_start(
struct damon_sysfs_schemes *sysfs_schemes,
- struct damon_ctx *ctx);
+ struct damon_ctx *ctx, bool total_bytes_only);
int damon_sysfs_schemes_update_regions_stop(struct damon_ctx *ctx);