[PATCH 0/4] mm: hugetlb: fix some CMA-related issues
From: Qi Zheng
Date: Tue Nov 03 2026 - 03:07:30 EST
From: Qi Zheng <zhengqi.arch@xxxxxxxxxxxxx>
Hi all,
This series fixes four CMA-related issues in HugeTLB reservation and
allocation:
- Avoid ineffective CMA reservations on 32-bit x86 kernels running on
CPUs that advertise 1 GiB page support.
- Honor PF_MEMALLOC_PIN to avoid allocating CMA-backed folios during
long-term pinning.
- Skip CMA allocation when the caller disallows direct reclaim.
- Enforce cpuset restrictions on surplus allocations, preserving memory
policy semantics and handling concurrent cpuset changes without
discarding folios that remain eligible.
Thanks,
Qi
Qi Zheng (4):
x86: hugetlb: disable default CMA reservations on 32-bit kernel
mm: hugetlb: skip CMA allocations under PF_MEMALLOC_PIN
mm: hugetlb: skip CMA when direct reclaim is disallowed
mm: hugetlb: respect cpuset restrictions for surplus allocations
arch/x86/mm/hugetlbpage.c | 2 +-
mm/hugetlb.c | 38 +++++++++++++++++++++++++++++++-------
mm/hugetlb_cma.c | 5 ++++-
3 files changed, 36 insertions(+), 9 deletions(-)
base-commit: 2637bdec0535a2044cd830eba9a79363651d9043
--
2.54.0