Re: [PATCH v2 2/4] mm: gup: allow long-term pins of CMA-allocated HugeTLB folios

From: Oscar Salvador (SUSE)

Date: Thu Nov 05 2026 - 04:33:53 EST


On Thu, Nov 05, 2026 at 12:07:44PM +0800, Qi Zheng wrote:
> From: Qi Zheng <zhengqi.arch@xxxxxxxxxxxxx>
>
> Long-term pinning treats explicitly CMA-allocated HugeTLB folios as
> unpinnable, causing unnecessary migration or pinning failures.
>
> These folios already own their CMA bitmap ranges, and memory blocks
> overlapping CMA areas cannot be offlined. Allow HugeTLB folios with
> HPG_cma to be pinned directly, including in ZONE_MOVABLE.
>
> Fixes: cf11e85fc08c ("mm: hugetlb: optionally allocate gigantic hugepages using cma")
> Cc: stable@xxxxxxxxxxxxxxx
> Suggested-by: Muchun Song <muchun.song@xxxxxxxxx>
> Signed-off-by: Qi Zheng <zhengqi.arch@xxxxxxxxxxxxx>

With the rewording suggested by Munchun:

Reviewed-by: Oscar Salvador <osalvador@xxxxxxx>



--
Oscar Salvador
SUSE Labs