Re: [PATCH v3 06/11] mm/hugetlb: initialize all struct pages for bootmem hugepages

From: Qi Zheng

Date: Mon Nov 23 2026 - 02:27:25 EST




On 11/20/26 6:08 PM, Muchun Song wrote:
Boot-time gigantic hugepages currently leave the head struct page to
the generic memmap initialization path while the HugeTLB code
initializes the remaining struct pages itself.

Mark the full hugepage noinit and initialize the head struct page in
hugetlb_folio_init_vmemmap() as well, so the whole compound-page setup
is handled in one place.

This can also reduce memblock metadata overhead when many boot-time
HugeTLB pages are reserved, because physically contiguous hugepages
can be covered by fewer noinit regions.

Signed-off-by: Muchun Song <songmuchun@xxxxxxxxxxxxx>
---
v3:
- Defer the HugeTLB template-copy optimization to the common helper
switch after integrating the series (suggested by Mike Rapoport)
---
mm/hugetlb.c | 27 ++++++++++-----------------
1 file changed, 10 insertions(+), 17 deletions(-)


LGTM, so:

Reviewed-by: Qi Zheng <qi.zheng@xxxxxxxxx>

Thanks,
Qi