Re: [PATCH v5 14/36] mm/damon: skip private node memory in DAMON migration and pageout

From: SJ Park

Date: Tue Jul 21 2026 - 20:48:09 EST


On Mon, 20 Jul 2026 15:34:08 -0400 Gregory Price <gourry@xxxxxxxxxx> 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 <gourry@xxxxxxxxxx>
> ---
> 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?

Also, what happens if we just try paging out the private node memory? Will it
simply fail? Or, make some problems?

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

> if (!folio_isolate_lru(folio))
> goto put_folio;
> list_add(&folio->lru, &folio_list);
> --
> 2.53.0-Meta


Thanks,
SJ