[PATCH 09/60] mm/damon: reject migration destinations outside common memory
From: Gregory Price via B4 Relay
Date: Fri Nov 20 2026 - 13:11:43 EST
From: "Gregory Price (Meta)" <gourry@xxxxxxxxxx>
DAMOS migration actions move folios to a node the user picks. As with
move_pages(2), the destination should be general purpose memory.
Reject a destination outside N_MEMORY_COMMON, exactly the same as a
node without memory is rejected today.
Signed-off-by: Gregory Price (Meta) <gourry@xxxxxxxxxx>
---
mm/damon/ops-common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/damon/ops-common.c b/mm/damon/ops-common.c
index 2216a0023154..15cabc79613b 100644
--- a/mm/damon/ops-common.c
+++ b/mm/damon/ops-common.c
@@ -498,7 +498,7 @@ unsigned long damon_migrate_pages(struct list_head *folio_list, int target_nid)
return nr_migrated;
if (target_nid < 0 || target_nid >= MAX_NUMNODES ||
- !node_state(target_nid, N_MEMORY)) {
+ !node_state(target_nid, N_MEMORY_COMMON)) {
damon_putback_folio_list(folio_list);
return nr_migrated;
}
--
2.56.1