Re: [RFC PATCH v3 22/37] mm/damon/sysfs: implement cpumask file under sample filter dir
From: Zenghui Yu
Date: Fri Aug 28 2026 - 00:00:16 EST
On 12/8/25 2:29 PM, SeongJae Park wrote:
> The DAON sample filter directory has files for only common properties.
DAMON
> Add a file to further specify the CPUs to filter in or out.
>
> Signed-off-by: SeongJae Park <sj@xxxxxxxxxx>
> ---
> mm/damon/sysfs.c | 41 +++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 41 insertions(+)
>
> diff --git a/mm/damon/sysfs.c b/mm/damon/sysfs.c
> index 74594e6e461c..d6b0b6513fd1 100644
> --- a/mm/damon/sysfs.c
> +++ b/mm/damon/sysfs.c
> @@ -758,6 +758,7 @@ struct damon_sysfs_sample_filter {
> enum damon_sample_filter_type type;
> bool matching;
> bool allow;
> + cpumask_t cpumask;
> };
>
> static struct damon_sysfs_sample_filter *damon_sysfs_sample_filter_alloc(void)
> @@ -765,6 +766,19 @@ static struct damon_sysfs_sample_filter *damon_sysfs_sample_filter_alloc(void)
> return kzalloc(sizeof(struct damon_sysfs_sample_filter), GFP_KERNEL);
> }
>
> +struct damon_sysfs_sample_filter_type_name {
> + enum damon_sample_filter_type type;
> + char *name;
> +};
> +
> +static const struct damon_sysfs_sample_filter_type_name
> +damon_sysfs_sample_filter_type_names[] = {
Looks like this should be defined in patch #21.
Thanks,
Zenghui