Re: [PATCH v5 00/17] mm: Introduce section-based vmemmap optimization for HugeTLB

From: Andrew Morton

Date: Fri Aug 28 2026 - 00:21:23 EST


On Tue, 25 Aug 2026 16:45:51 +0800 Muchun Song <songmuchun@xxxxxxxxxxxxx> wrote:

> HugeTLB vmemmap optimization currently has its own early boot setup
> path. It pre-populates optimized vmemmap mappings before the normal
> sparse-vmemmap population code runs, and sparsemem carries
> SPARSEMEM_VMEMMAP_PREINIT only to support that special case.
>
> That makes the HugeTLB vmemmap optimization path harder to share with
> other users of sparse-vmemmap optimization and leaves a fair amount of
> HugeTLB-specific boot-time state in the generic memory initialization
> flow.
>
> This series introduces section-based vmemmap optimization support in
> the sparse-vmemmap code and switches HugeTLB bootmem pages over to it.
> Instead of having HugeTLB pre-populate optimized vmemmap mappings
> itself, HugeTLB now records the compound page order in the corresponding
> memory sections. The generic sparse-vmemmap population path can then
> allocate or reuse shared tail vmemmap pages based on section metadata.

Thanks, I've added this to mm.git's mm-new branch. After -rc1 I'll
move it into the mm-unstable branch, and thereby into linux-next.