mm-sparse-vmemmap-move-vmemmap-optimization-helpers-to-a-public-header.patch removed from -mm tree
The quilt patch titled
Subject: mm/sparse-vmemmap: move vmemmap optimization helpers to a public header
has been removed from the -mm tree. Its filename was
mm-sparse-vmemmap-move-vmemmap-optimization-helpers-to-a-public-header.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: Muchun Song <[email protected]>
Subject: mm/sparse-vmemmap: move vmemmap optimization helpers to a public header
Date: Wed, 30 Sep 2026 22:06:23 +0800
The vmemmap optimization helpers currently live in mm/sparse.h, which is an internal MM header. That works for MM code, but prevents powerpc from using the same interfaces without including a private header.
Move the declarations and inline helpers to vmemmap-optimization.h. This is a preparatory change for powerpc, which has its own vmemmap optimization implementation and needs to use the common vmemmap optimization interfaces from architecture code.
---
MAINTAINERS | 1 arch/loongarch/include/asm/pgtable.h | 1 arch/riscv/mm/init.c | 1 include/linux/mmzone.h | 17 --- include/linux/vmemmap-optimization.h | 109 +++++++++++++++++++++++++ mm/hugetlb.c | 2 mm/hugetlb_vmemmap.c | 2 mm/sparse.h | 78 ----------------- 8 files changed, 115 insertions(+), 96 deletions(-)
arch/loongarch/include/asm/pgtable.h renamed from arch/loongarch/include/asm/pgtable.h~mm-sparse-vmemmap-move-vmemmap-optimization-helpers-to-a-public-header +1 -0
@@ -72,6 +72,7 @@#include <linux/mm_types.h> #include <linux/mmzone.h> +#include <linux/vmemmap-optimization.h> #include <asm/fixmap.h> #include <asm/sparsemem.h>
arch/riscv/mm/init.c renamed from arch/riscv/mm/init.c~mm-sparse-vmemmap-move-vmemmap-optimization-helpers-to-a-public-header +1 -0
@@ -22,6 +22,7 @@#include <linux/hugetlb.h> #include <linux/kfence.h> #include <linux/execmem.h> +#include <linux/vmemmap-optimization.h> #include <asm/alternative.h> #include <asm/fixmap.h>
include/linux/mmzone.h renamed from include/linux/mmzone.h~mm-sparse-vmemmap-move-vmemmap-optimization-helpers-to-a-public-header +0 -17
@@ -96,23 +96,6 @@#define MAX_FOLIO_NR_PAGES (1UL << MAX_FOLIO_ORDER) -/* -* HugeTLB Vmemmap Optimization (HVO) requires struct pages of the head page to -* be naturally aligned with regard to the folio size. -* -* HVO which is only active if the size of struct page is a power of 2. -*/ -#define MAX_FOLIO_VMEMMAP_ALIGN \ - (IS_ENABLED(CONFIG_VMEMMAP_OPTIMIZATION) && \ - is_power_of_2(sizeof(struct page)) ? \ - MAX_FOLIO_NR_PAGES * sizeof(struct page) : 0) - -/* The number of retained vmemmap pages with HVO enabled. */ -#define VMEMMAP_OPTIMIZATION_PAGES 1 -#define VMEMMAP_OPTIMIZATION_NR_STRUCT_PAGES \ - (VMEMMAP_OPTIMIZATION_PAGES * PAGE_SIZE / sizeof(struct page)) -#define VMEMMAP_OPTIMIZATION_MIN_ORDER (ilog2(VMEMMAP_OPTIMIZATION_NR_STRUCT_PAGES) + 1) -enum migratetype {MIGRATE_UNMOVABLE ,MIGRATE_MOVABLE ,
include/linux/vmemmap-optimization.h new file +109 -0
109 lines not on this page · raw message
MAINTAINERS renamed from MAINTAINERS~mm-sparse-vmemmap-move-vmemmap-optimization-helpers-to-a-public-header +1 -0
@@ -12098,6 +12098,7 @@ F: Documentation/mm/hugetlbfs_reserv.rst F: Documentation/mm/vmemmap_dedup.rst F: fs/hugetlbfs/ F: include/linux/hugetlb.h +F: include/linux/vmemmap-optimization.h F: include/trace/events/hugetlbfs.h F: mm/hugetlb.c F: mm/hugetlb_cgroup.c
mm/hugetlb.c renamed from mm/hugetlb.c~mm-sparse-vmemmap-move-vmemmap-optimization-helpers-to-a-public-header +1 -1
@@ -38,6 +38,7 @@#include <linux/mm_inline.h> #include <linux/padata.h> #include <linux/pgalloc.h> +#include <linux/vmemmap-optimization.h> #include <asm/page.h> #include <asm/tlb.h>
@@ -52,7 +53,6 @@#include "hugetlb_cma.h" #include "hugetlb_internal.h" #include "mm_init.h" -#include "sparse.h" #include <linux/page-isolation.h> #define HUGE_BOOTMEM_ZONES_VALID BIT(0)
mm/hugetlb_vmemmap.c renamed from mm/hugetlb_vmemmap.c~mm-sparse-vmemmap-move-vmemmap-optimization-helpers-to-a-public-header +1 -1
@@ -15,10 +15,10 @@#include <linux/mmdebug.h> #include <linux/pagewalk.h> #include <linux/pgalloc.h> +#include <linux/vmemmap-optimization.h> #include <asm/tlbflush.h> #include "hugetlb_vmemmap.h" -#include "sparse.h" /** * struct vmemmap_remap_walk - walk vmemmap page table
mm/sparse.h renamed from mm/sparse.h~mm-sparse-vmemmap-move-vmemmap-optimization-helpers-to-a-public-header +1 -77
90 lines not on this page · raw message
_
Patches currently in -mm which might be from [email protected] are
mm-sparse-vmemmap-drop-vmemmap_populate_dax.patch mm-sparse-vmemmap-support-device-dax-in-common-vmemmap-path.patch mm-sparse-vmemmap-drop-device-dax-specific-population-path.patch mm-sparse-vmemmap-remove-the-unused-ptpfn-argument.patch mm-sparse-vmemmap-open-code-vmemmap_populate_address.patch mm-mm_init-add-zone-mismatch-warning-during-page-init.patch