On Tue, Jul 21, 2026 at 04:46:43PM -0700, SJ Park wrote: > On Mon, 20 Jul 2026 15:34:08 -0400 Gregory Price <[email protected]> wrote: > > > DAMON operates on physical address ranges, which can cover private > > node memory. Skip private-node folios in both DAMON's migration > > and reclaim paths. > > > > Signed-off-by: Gregory Price <[email protected]> > > --- > > mm/damon/paddr.c | 9 +++++++++ > > 1 file changed, 9 insertions(+) > > > > diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c > > index e4f98d67461f5..c741a94319750 100644 > > --- a/mm/damon/paddr.c > > +++ b/mm/damon/paddr.c > > @@ -12,6 +12,7 @@ > > #include <linux/swap.h> > > #include <linux/memory-tiers.h> > > #include <linux/mm_inline.h> > > +#include <linux/node_private.h> > > > > #include "../internal.h" > > #include "ops-common.h" > > @@ -250,6 +251,10 @@ static unsigned long damon_pa_pageout(struct > > damon_region *r, > > continue; > > } > > > > + /* private node memory is not reclaimable by default */ > > + if (folio_is_private_node(folio)) > > + goto put_folio; > > + > > "by default". Does that mean it could be reclaimable in some situations? If > so, could we check if it is reclaimable? >
See the damon changes in: https://lore.kernel.org/linux-mm/al-pkvmgIxGu3LzM@gourry-fedora-PF4VCD3F/T/#mfb99303c85dd9d4c3f58832dc28fc55583a7217a > Also, what happens if we just try paging out the private node memory? Will it > simply fail? Or, make some problems? > user controls for MADV_ commands that affect private node folios would skip those folios - exactly same as ZONE_DEVICE folios. Which I'm not sure damon actually handles correctly presently (zone device). I remember looking around damon and thinking to myself "what if this is a zone device page?" and not being able to find a satisfying answer. > > if (damos_pa_filter_out(s, folio)) > > goto put_folio; > > else > > @@ -344,6 +349,10 @@ static unsigned long damon_pa_migrate(struct > > damon_region *r, > > else > > *sz_filter_passed += folio_size(folio) / addr_unit; > > > > + /* private nodes do not support migration by default */ > > + if (folio_is_private_node(folio)) > > + goto put_folio; > > + > > Same questions. > Technically there is nothing in migration core to prevent migration operations, it's done on a service basis - hotunplug, reclaim/demotion, user numa (mbind, migrate/move_pages) etc. Operations on private nodes/private node folioes are refused if the capability bit is not set. ~Gregory

