mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
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>
This commit is contained in:
parent
e63813b893
commit
270b82dc6f
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user