Re: [PATCH v2 12/69] mm/hugetlb_cma: Validate hugetlb CMA range by zone at reserve time
From: Oscar Salvador (SUSE)
Date: Mon May 25 2026 - 13:20:12 EST
On Wed, May 13, 2026 at 09:04:40PM +0800, Muchun Song wrote:
> Hugetlb CMA allocation currently has to cope with CMA areas that span
> multiple zones.
>
> Validate the reserved CMA range up front in hugetlb_cma_reserve() so
> later hugetlb CMA allocations can assume a zone-consistent area.
>
> Also drop the pfn_valid() check from cma_validate_zones(). mem_section
> is not fully initialized at this point, so the check can trigger false
> warnings. Keep the sanity check in cma_activate_area() instead.
>
> Acked-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
> Signed-off-by: Muchun Song <songmuchun@xxxxxxxxxxxxx>
Reviewed-by: Oscar Salvador (SUSE) <osalvador@xxxxxxx>
--
Oscar Salvador
SUSE Labs