The patch titled Subject: mm-compaction-skip-memory-hole-rapidly-when-isolating-migratable-pages-v4 has been added to the -mm mm-unstable branch. Its filename is mm-compaction-skip-memory-hole-rapidly-when-isolating-migratable-pages-v4.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-compaction-skip-memory-hole-rapidly-when-isolating-migratable-pages-v4.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: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx> Subject: mm-compaction-skip-memory-hole-rapidly-when-isolating-migratable-pages-v4 Date: Mon, 19 Jun 2023 10:22:24 +0800 limit next_ptn to not exceed cc->free_pfn Link: https://lkml.kernel.org/r/a1d859c28af0c7e85e91795e7473f553eb180a9d.1686813379.git.baolin.wang@xxxxxxxxxxxxxxxxx Signed-off-by: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx> Cc: David Hildenbrand <david@xxxxxxxxxx> Cc: David Hildenbrand <david@xxxxxxxxxx> Cc: "Huang, Ying" <ying.huang@xxxxxxxxx> Cc: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx> Cc: Vlastimil Babka <vbabka@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/compaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/compaction.c~mm-compaction-skip-memory-hole-rapidly-when-isolating-migratable-pages-v4 +++ a/mm/compaction.c @@ -1987,7 +1987,7 @@ static isolate_migrate_t isolate_migrate next_pfn = skip_offline_sections(block_start_pfn); if (next_pfn) - block_end_pfn = next_pfn; + block_end_pfn = min(next_pfn, cc->free_pfn); continue; } _ Patches currently in -mm which might be from baolin.wang@xxxxxxxxxxxxxxxxx are mm-compaction-skip-memory-hole-rapidly-when-isolating-migratable-pages.patch mm-compaction-skip-memory-hole-rapidly-when-isolating-migratable-pages-v4.patch