From: "Gregory Price (Meta)" The NUMA balancing scanner installs PROT_NONE only on folios that balancing may migrate. folio_can_map_prot_numa() already skips ZONE_DEVICE folios. Skip folios outside the common memory pool (N_MEMORY_COMMON) as well. Do not inject hint faults on those folios or migrate them. Convert the zone_device check to a common memory check (which includes the zone device check explicitly). Signed-off-by: Gregory Price (Meta) --- mm/mempolicy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 806577e1d48b..07d577aca78c 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -863,7 +863,7 @@ bool folio_can_map_prot_numa(struct folio *folio, struct vm_area_struct *vma, { int nid; - if (!folio || folio_is_zone_device(folio) || folio_test_ksm(folio)) + if (!folio || !folio_is_common_memory(folio) || folio_test_ksm(folio)) return false; /* Also skip shared copy-on-write folios */ -- 2.56.1