v1
2026-10-20
hugetlb PMD页支持CMA · v1
扩展hugetlb_cma支持PMD大小页池(如1G@2M),用CMA预留并防止迁移中递归CMA分配。
原始补丁链接
子 Patch(5)
1/5
mm: hugetlb: add explicit page size to hugetlb_cma
From: Qi Zheng zhengqi.arch@bytedance.com Accept an optional @ suffix for hugetlb_cma. Initially accept only the architecture’s existing CMA page size. Preserve the behavior of unsuffixe
2/5
mm: hugetlb: group CMA pool and reservation state
From: Qi Zheng zhengqi.arch@bytedance.com The HugeTLB CMA areas, total size, per-node sizes and percentages are stored in separate singleton variables. Group the runtime areas and size into a pool,
3/5
mm: hugetlb: track CMA reservations by page order
From: Qi Zheng zhengqi.arch@bytedance.com Prepare for a separate CMA pool for PMD-sized HugeTLB pages by organizing CMA areas and reservation parameters into pools identified by page order. Select
4/5
mm: hugetlb: avoid recursive CMA allocation during migration
From: Qi Zheng zhengqi.arch@bytedance.com Contiguous allocation can migrate allocated HugeTLB folios or replace free HugeTLB folios while holding a CMA allocation mutex. Allocating a replacement th
5/5
mm: hugetlb: enable CMA allocation for PMD-sized pages
From: Qi Zheng zhengqi.arch@bytedance.com Allow hugetlb_cma=@ to select the architecture’s PMD size in addition to its existing CMA size. PMD pages are 2M on x86-64 and 2M, 32M