Re: [PATCH 04/12] mm: hugetlb_vmemmap: generalize vmemmap page allocation

From: Lance Yang

Date: Thu Oct 22 2026 - 09:55:46 EST



On Tue, Oct 20, 2026 at 07:58:16PM +0800, Muchun Song wrote:
>Vmemmap page allocation is currently tied to restoring a virtual range
>and assumes an empty destination list. These constraints prevent it from
>being reused when pages are requested independently of a vmemmap range or
>appended to an existing list.

Yeah, the local list makes sense to me :)

>Generalize the allocator and give it an all-or-nothing list contract so
>the restore and optimization paths can share the same allocation policy.
>This also allows HVO head-page allocation to fail gracefully under memory
>pressure without triggering the OOM killer.

And __GFP_RETRY_MAYFAIL for the head page seems reasonable too. Just skip
the optimization if we can't allocate it.

>Signed-off-by: Muchun Song <songmuchun@xxxxxxxxxxxxx>
>---

Reviewed-by: Lance Yang <lance.yang@xxxxxxxxx>