Re: [PATCH v2 2/4] mm: gup: allow long-term pins of CMA-allocated HugeTLB folios
From: David Hildenbrand (Arm)
Date: Tue Dec 01 2026 - 04:26:17 EST
On 12/1/26 10:12, Michal Hocko wrote:
> On Thu 05-11-26 12:07:44, 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.
>
> Sorry to chime in this late but I just learned about this change
> recently. I have to say I am quite surprised that long term pins
> failed on their own cmas. Is there any actual usecase to require those
> to work out there?
>
> I have no objections to the patch but I want to learn about why nobody
> cared until just now.
I previously had reports from people using hugetlb_cma for backing VMs and just
wanting to use vfio for device-passthrough.
--
Cheers,
David