Re: [RFC PATCH v2.1 02/17] mm/damon/paddr: support PGIDLE_UNSET probe filter type
SJ Park <[email protected]> Mon, 27 Jul 2026 07:59:27 -0700
| Newsgroups | dev.linux.lists.damon |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 27 Jul 2026 14:52:42 +0000 [email protected] wrote: > Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: > - [Medium] The newly added DAMON probe filter type DAMON_FILTER_TYPE_PGIDLE_UNSET is not exposed in the sysfs interface. > -- > > --- Patch [2]: [RFC PATCH v2.1 02/17] mm/damon/paddr: support PGIDLE_UNSET probe filter type --- > commit 67629d6971ecadd1e1c345f911e353e76f34b34f > Author: SJ Park <[email protected]> > > mm/damon/paddr: support PGIDLE_UNSET probe filter type > > This commit implements support for the DAMON_FILTER_TYPE_PGIDLE_UNSET probe > filter type in the physical address space DAMON operations set. > > > diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c > > index 5a6a78054784a..199de1463fa06 100644 > > --- a/mm/damon/paddr.c > > +++ b/mm/damon/paddr.c > > @@ -132,6 +132,12 @@ static bool damon_pa_filter_match(struct damon_filter *filter, > > matched = filter->memcg_id == mem_cgroup_id(memcg); > > rcu_read_unlock(); > > break; > > + case DAMON_FILTER_TYPE_PGIDLE_UNSET: > > + if (!folio) > > + matched = false; > > + else > > + matched = damon_folio_young(folio); > > + break; > > [Severity: Medium] > Should this new filter type also be exposed in the sysfs interface? > > Looking at damon_sysfs_filter_type_names in mm/damon/sysfs.c, it maps sysfs > string inputs to DAMON probe filter types, but it doesn't seem to include > an entry for DAMON_FILTER_TYPE_PGIDLE_UNSET: > > mm/damon/sysfs.c:damon_sysfs_filter_type_names[] = { > { > .type = DAMON_FILTER_TYPE_ANON, > .name = "anon", > }, > { > .type = DAMON_FILTER_TYPE_MEMCG, > .name = "memcg", > }, > }; > > Without this mapping, does this prevent userspace from accessing the newly > added feature, since any attempt to configure it through sysfs would be > rejected? A later patch of this series does that. > > > default: > > break; > > } > > -- > Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=2 Thanks, SJ