The patch titled Subject: mm: consider CMA pages in watermark check for NUMA balancing target node has been added to the -mm mm-unstable branch. Its filename is mm-consider-cma-pages-in-watermark-check-for-numa-balancing-target-node.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-consider-cma-pages-in-watermark-check-for-numa-balancing-target-node.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Kaiyang Zhao <kaiyang2@xxxxxxxxxx> Subject: mm: consider CMA pages in watermark check for NUMA balancing target node Date: Thu, 1 Aug 2024 18:04:56 +0000 Currently in migrate_balanced_pgdat(), ALLOC_CMA flag is not passed when checking watermark on the migration target node. This does not match the gfp in alloc_misplaced_dst_folio() which allows allocation from CMA. This causes promotion failures when there are a lot of available CMA memory in the system. Therefore, we change the alloc_flags passed to zone_watermark_ok() in migrate_balanced_pgdat(). Link: https://lkml.kernel.org/r/20240801180456.25927-1-kaiyang2@xxxxxxxxxx Signed-off-by: Kaiyang Zhao <kaiyang2@xxxxxxxxxx> Cc: Johannes Weiner <hannes@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/migrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/migrate.c~mm-consider-cma-pages-in-watermark-check-for-numa-balancing-target-node +++ a/mm/migrate.c @@ -2526,7 +2526,7 @@ static bool migrate_balanced_pgdat(struc if (!zone_watermark_ok(zone, 0, high_wmark_pages(zone) + nr_migrate_pages, - ZONE_MOVABLE, 0)) + ZONE_MOVABLE, ALLOC_CMA)) continue; return true; } _ Patches currently in -mm which might be from kaiyang2@xxxxxxxxxx are mm-consider-cma-pages-in-watermark-check-for-numa-balancing-target-node.patch