summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSJ Park <sj@kernel.org>2026-09-15 07:33:54 -0700
committerAndrew Morton <akpm@linux-foundation.org>2026-09-29 23:13:29 -0700
commit707ae91fb36d33dfd6d87dc7884aedb6df3a0ac2 (patch)
tree0ccbf1e6a45bfc3e18b619eaf7997ec2a1874959
parenteef5349965a17f94ef39ac6366ee3e71c9d14b15 (diff)
downloadlinux-next-707ae91fb36d33dfd6d87dc7884aedb6df3a0ac2.tar.gz
linux-next-707ae91fb36d33dfd6d87dc7884aedb6df3a0ac2.zip
mm/damon/sysfs: support hugepage_size probe filter
Extend DAMON sysfs interface to support hugepage_size probe filter. Allows hugepage_size user string input to the filter type file. Pass the size range argument that users set via min/max files under the probe filter directory to the DAMON core. Link: https://lore.kernel.org/20260915143359.91472-6-sj@kernel.org Signed-off-by: SJ Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: David Hildenbrand <david@kernel.org> Cc: Liam R. Howlett <liam@infradead.org> Cc: Lorenzo Stoakes <ljs@kernel.org> Cc: Michal Hocko <mhocko@suse.com> Cc: Mike Rapoport <rppt@kernel.org> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Vlastimil Babka <vbabka@kernel.org>
-rw-r--r--mm/damon/sysfs.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/damon/sysfs.c b/mm/damon/sysfs.c
index 8e8d89b8ed98..43519afb9eb7 100644
--- a/mm/damon/sysfs.c
+++ b/mm/damon/sysfs.c
@@ -1007,6 +1007,10 @@ damon_sysfs_filter_type_names[] = {
.type = DAMON_FILTER_TYPE_PGIDLE_SET,
.name = "pgidle_set",
},
+ {
+ .type = DAMON_FILTER_TYPE_HUGEPAGE_SIZE,
+ .name = "hugepage_size",
+ },
};
static ssize_t type_show(struct kobject *kobj,
@@ -2273,6 +2277,9 @@ static int damon_sysfs_set_filters(struct damon_probe *probe,
damon_destroy_filter(filter);
return err;
}
+ } else if (filter->type == DAMON_FILTER_TYPE_HUGEPAGE_SIZE) {
+ filter->range_min = sys_filter->range_min;
+ filter->range_max = sys_filter->range_max;
}
damon_add_filter(probe, filter);
}