Re: [PATCH v3] mm/hugetlb: Fix null nodemask in alloc_fresh_hugetlb_folio

From: Muchun Song

Date: Mon Jul 20 2026 - 22:30:51 EST




> On Jul 21, 2026, at 08:37, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Sun, 5 Jul 2026 23:55:31 -0700 Sourav Panda <souravpanda@xxxxxxxxxx> wrote:
>
>>> - Option 1: Fix it directly within alloc_gigantic_frozen_folio().
>>> This would centrally cover both of its underlying allocation paths:
>>> hugetlb_cma_alloc_frozen_folio() and alloc_contig_frozen_pages().
>>>
>>> - Option 2: Fix hugetlb_cma_alloc_frozen_folio() and alloc_contig_frozen_pages()
>>> separately. The rationale here is that since the buddy allocator
>>> already handles this case internally, and alloc_contig_frozen_pages()
>>> is also a low-level allocator, it would be better to keep their behaviors
>>> consistent.
>>>
>>> Both approaches are viable from my perspective. I'm CCing more MM maintainers
>>> and reviewers to gather your insights and decide on the best path forward.
>>>
>>> Muchun,
>>> Thanks.
>>
>> Gotcha! Thanks Andrew and Muchun!
>>
>> I shall wait for the decision and then send the subsequent version :)
>
> 15 days: no decision shall be forthcoming.
>
> Please code up whatever you consider best then send it out. This will
> trigger a great outpouring of decisions ;)

Hi Sourav,

Please select Option 2 first, as I'd prefer not to make HugeTLB a special case
again.

Thanks.