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

Muchun Song muchun.song at linux.dev
Wed Jan 28 18:51:48 PST 2026



> On Jan 28, 2026, at 21:54, Kiryl Shutsemau <kas at kernel.org> 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 at kernel.org>

Reviewed-by: Muchun Song <muchun.song at linux.dev>

Thanks.




More information about the linux-riscv mailing list