The quilt patch titled Subject: mm/compaction: allow blockpfn outside of pageblock for high order buddy page has been removed from the -mm tree. Its filename was mm-compaction-allow-blockpfn-outside-of-pageblock-for-high-order-buddy-page.patch This patch was dropped because it was withdrawn ------------------------------------------------------ From: Kemeng Shi <shikemeng@xxxxxxxxxxxxxxx> Subject: mm/compaction: allow blockpfn outside of pageblock for high order buddy page Date: Sun, 30 Jul 2023 01:43:50 +0800 Patch series "Fixes and cleanups to compaction". This series contains random fixes and cleanups to free page isolation in compaction. This is based on another compact series[1]. More details can be found in respective patches. This patch (of 5): Commit 9fcd6d2e052ee ("mm, compaction: skip compound pages by order in free scanner") skiped compound pages to save iterations and limit blockpfn to reach outside of page block in case of bogus compound_order. While this also limit pfnblock outside page block in case a buddy page with order higher than page block is found. After this, isolate_freepages_range will fail unexpectedly as it will fail to isolate the page block which was isolated successfully by high order buddy page in previous page block and abort the free page isolation. Fix this by allow blockpfn outside of pageblock in case of high order buddy page. Link: https://lkml.kernel.org/r/20230729174354.2239980-1-shikemeng@xxxxxxxxxxxxxxx Link: https://lkml.kernel.org/r/20230729174354.2239980-2-shikemeng@xxxxxxxxxxxxxxx Fixes: 9fcd6d2e052ee ("mm, compaction: skip compound pages by order in free scanner") Signed-off-by: Kemeng Shi <shikemeng@xxxxxxxxxxxxxxx> Cc: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx> Cc: David Hildenbrand <david@xxxxxxxxxx> Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx> Cc: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx> Cc: Kemeng Shi <shikemeng@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/compaction.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) --- a/mm/compaction.c~mm-compaction-allow-blockpfn-outside-of-pageblock-for-high-order-buddy-page +++ a/mm/compaction.c @@ -678,8 +678,10 @@ isolate_fail: /* * There is a tiny chance that we have read bogus compound_order(), * so be careful to not go outside of the pageblock. + * Allow blockpfn outside pageblock in normal case that we isolate + * buddy page with order more than pageblock order. */ - if (unlikely(blockpfn > end_pfn)) + if (unlikely(blockpfn > end_pfn) && total_isolated <= pageblock_nr_pages) blockpfn = end_pfn; trace_mm_compaction_isolate_freepages(*start_pfn, blockpfn, @@ -1441,7 +1443,7 @@ fast_isolate_around(struct compact_contr isolate_freepages_block(cc, &start_pfn, end_pfn, &cc->freepages, 1, false); /* Skip this pageblock in the future as it's full or nearly full */ - if (start_pfn == end_pfn) + if (start_pfn >= end_pfn) set_pageblock_skip(page); return; @@ -1713,7 +1715,7 @@ static void isolate_freepages(struct com block_end_pfn, freelist, stride, false); /* Update the skip hint if the full pageblock was scanned */ - if (isolate_start_pfn == block_end_pfn) + if (isolate_start_pfn >= block_end_pfn) update_pageblock_skip(cc, page, block_start_pfn); /* Are enough freepages isolated? */ _ Patches currently in -mm which might be from shikemeng@xxxxxxxxxxxxxxx are mm-correct-stale-comment-of-function-check_pte.patch mm-page_table_check-remove-unused-parameters-in-page_table_check_clear.patch mm-page_table_check-remove-unused-parameters-in-page_table_check_set.patch mm-page_table_check-remove-unused-parameter-in-page_table_check_pte_clear.patch mm-page_table_check-remove-unused-parameter-in-page_table_check_pmd_clear.patch mm-page_table_check-remove-unused-parameter-in-page_table_check_pud_clear.patch mm-page_table_check-remove-unused-parameter-in-page_table_check_pte_set.patch mm-page_table_check-remove-unused-parameter-in-page_table_check_pmd_set.patch mm-page_table_check-remove-unused-parameter-in-page_table_check_pud_set.patch mm-page_ext-remove-unused-return-value-of-offline_page_ext.patch mm-page_ext-remove-rollback-for-untouched-mem_section-in-online_page_ext.patch mm-page_ext-move-functions-around-for-minor-cleanups-to-page_ext.patch mm-page_ext-add-common-function-to-get-client-data-from-page_ext.patch mm-page_ext-use-page_ext_data-helper-in-page_table_check.patch mm-page_ext-use-page_ext_data-helper-in-page_owner.patch mm-rmap-correct-stale-comment-of-rmap_walk_anon-and-rmap_walk_file.patch mm-page_poison-remove-unused-page_exth-from-page_poison.patch mm-vmstat-remove-unused-page_exth-from-vmstat.patch mm-page_ext-move-page_ext_operations-definition-under-config_page_extension.patch mm-compaction-set-compact_cached_free_pfn-correctly-in-update_pageblock_skip.patch mm-compaction-remove-unnecessary-cursor-page-in-isolate_freepages_block.patch mm-compaction-remove-unnecessary-else-continue-at-end-of-loop-in-isolate_freepages_block.patch