Re: [PATCHv5 10/17] mm/hugetlb: Refactor code around vmemmap_walk

From: Muchun Song

Date: Wed Jan 28 2026 - 21:52:56 EST




> On Jan 28, 2026, at 21:54, Kiryl Shutsemau <kas@xxxxxxxxxx> wrote:
>
> To prepare for removing fake head pages, the vmemmap_walk code is being
> reworked.
>
> The reuse_page and reuse_addr variables are being eliminated. There will
> no longer be an expectation regarding the reuse address in relation to
> the operated range. Instead, the caller will provide head and tail
> vmemmap pages.
>
> Currently, vmemmap_head and vmemmap_tail are set to the same page, but
> this will change in the future.
>
> The only functional change is that __hugetlb_vmemmap_optimize_folio()
> will abandon optimization if memory allocation fails.
>
> Signed-off-by: Kiryl Shutsemau <kas@xxxxxxxxxx>

Reviewed-by: Muchun Song <muchun.song@xxxxxxxxx>

Thanks.