Re: [RFC PATCH v3 22/37] mm/damon/sysfs: implement cpumask file under sample filter dir

From: SJ Park

Date: Fri Aug 28 2026 - 14:32:43 EST


On Fri, 28 Aug 2026 11:59:47 +0800 Zenghui Yu <zenghui.yu@xxxxxxxxx> wrote:

> 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.

Thank you for your review, Zenghui. I will nearly entirely rewrite this series
using probe itnerface, following the DAMON extension roadmap [1]. I will keep
your review in my mind when writing it.

[1] https://lore.kernel.org/all/20260525225208.1179-1-sj@xxxxxxxxxx/


Thanks,
SJ

[...]