mm-page_alloc-remove-unused-fpi_flags-in-free_pages_prepare.patch removed from -mm tree
The quilt patch titled
Subject: mm/page_alloc: remove unused fpi_flags in free_pages_prepare()
has been removed from the -mm tree. Its filename was
mm-page_alloc-remove-unused-fpi_flags-in-free_pages_prepare.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Zi Yan <[email protected]>
Subject: mm/page_alloc: remove unused fpi_flags in free_pages_prepare()
Date: Tue, 20 Feb 2024 13:32:17 -0500
Patch series "Enable >0 order folio memory compaction", v7.
This patchset enables >0 order folio memory compaction, which is one of the prerequisitions for large folio support[1].
I am aware of that split free pages is necessary for folio migration in compaction, since if >0 order free pages are never split and no order-0 free page is scanned, compaction will end prematurely due to migration returns -ENOMEM. Free page split becomes a must instead of an optimization.
lkp ncompare results (on a 8-CPU (Intel Xeon E5-2650 v4 @2.20GHz) 16G VM) for default LRU (-no-mglru) and CONFIG_LRU_GEN are shown at the bottom, copied from V3[4]. In sum, most of vm-scalability applications do not see performance change, and the others see ~4% to ~26% performance boost under default LRU and ~2% to ~6% performance boost under CONFIG_LRU_GEN.
Overview
===
To support >0 order folio compaction, the patchset changes how free pages used for migration are kept during compaction. Free pages used to be split into order-0 pages that are post allocation processed (i.e., PageBuddy flag cleared, page order stored in page->private is zeroed, and page reference is set to 1). Now all free pages are kept in a NR_PAGE_ORDER array of page lists based on their order without post allocation process. When migrate_pages() asks for a new page, one of the free pages, based on the requested page order, is then processed and given out. And THP <2MB would need this feature.
[1] https://lore.kernel.org/linux-mm/[email protected]/
[2] https://lore.kernel.org/linux-mm/[email protected]/
[3] https://lore.kernel.org/linux-mm/[email protected]/
[4] https://lore.kernel.org/linux-mm/[email protected]/
[5] https://lore.kernel.org/linux-mm/[email protected]/
[6] https://lore.kernel.org/linux-mm/[email protected]/
[7] https://lore.kernel.org/linux-mm/[email protected]/
This patch (of 4):
Commit 0a54864f8dfb ("kasan: remove PG_skip_kasan_poison flag") removes the use of fpi_flags in should_skip_kasan_poison() and fpi_flags is only passed to should_skip_kasan_poison() in free_pages_prepare(). Remove the unused parameter.
---
mm/page_alloc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
mm/page_alloc.c renamed from mm/page_alloc.c~mm-page_alloc-remove-unused-fpi_flags-in-free_pages_prepare +5 -5
@@ -1061,7 +1061,7 @@ out:* on-demand allocation and then freed again before the deferred pages * initialization is done, but this is not likely to happen. */ -static inline bool should_skip_kasan_poison (struct page *page,fpi_t fpi_flags) +static inline bool should_skip_kasan_poison (struct page *page) {if (IS_ENABLED (CONFIG_KASAN_GENERIC ))return deferred_pages_enabled ();
@@ -1081,10 +1081,10 @@ static void kernel_init_pages(struct pag } static __always_inline bool free_pages_prepare(struct page *page, -unsigned int order,fpi_t fpi_flags) +unsigned int order) {int bad =0 ; -bool skip_kasan_poison =should_skip_kasan_poison (page, fpi_flags); +bool skip_kasan_poison =should_skip_kasan_poison (page);bool init =want_init_on_free ();bool compound =PageCompound (page);
@@ -1266,7 +1266,7 @@ static void __free_pages_ok(struct pageunsigned long pfn =page_to_pfn (page);struct zone *zone =page_zone (page); -if (!free_pages_prepare (page, order, fpi_flags)) +if (!free_pages_prepare (page, order))return ;/*
@@ -2343,7 +2343,7 @@ static bool free_unref_page_prepare(stru {int migratetype; -if (!free_pages_prepare (page, order,FPI_NONE )) +if (!free_pages_prepare (page, order))return false; migratetype =get_pfnblock_migratetype (page, pfn);
_
Patches currently in -mm which might be from [email protected] are