Re: [PATCH v2 3/4] mm: hugetlb: fix GFP mask propagation to CMA

From: Oscar Salvador (SUSE)

Date: Fri Nov 06 2026 - 00:51:21 EST


On Fri, Nov 06, 2026 at 10:43:53AM +0800, Qi Zheng wrote:
> I'd still prefer to keep __GFP_COMP so that
> cma_alloc_frozen_compound() itself guarantees compound allocation,
> without requiring callers to supply the flag.

Well, but aren't all callers hugetlb? And we already do supply __GFP_COMP there
for evident reasons.
And should that not be the case, and you want to catch someone who went rogue,
I would just place a WARN_ON_ONCE to catch it here, so we know who is not following
the rules.

Makes sense?


--
Oscar Salvador
SUSE Labs