Re: [PATCH 10/12] mm: hugetlb_vmemmap: make vmemmap restoration folio-oriented

From: Qi Zheng

Date: Sun Nov 01 2026 - 02:14:48 EST




On 10/20/26 7:58 PM, Muchun Song wrote:
Like optimization, vmemmap restoration operates on one folio at a time,
but the current interface exposes a raw address range and requires the
HugeTLB caller to prepare part of the operation. This splits the common
mechanism across layers and obscures its natural unit of work.

Make the folio the unit of vmemmap restoration and move the common
mechanics behind a folio-oriented interface. This keeps HugeTLB-specific
eligibility and state in the caller and gives both directions of HVO
consistent folio-level interfaces.

No functional change intended.

Signed-off-by: Muchun Song <songmuchun@xxxxxxxxxxxxx>
---
mm/hugetlb_vmemmap.c | 37 +++++++++++++------------------------
1 file changed, 13 insertions(+), 24 deletions(-)

Nice cleanup.

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

Thanks,
Qi