v2
2026-10-22
hugetlb PMD 级页支持 CMA · v2
扩展 hugetlb_cma,新增 @页大小 配置 PMD 大页独立 CMA 池,非 gigantic PMD 分配先试 buddy 后回退 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 pool
From: Qi Zheng zhengqi.arch@bytedance.com Introduce fixed default and PMD pool slots in preparation for PMD-sized HugeTLB CMA support. Continue accepting only the architecture’s existing CMA page s
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