v3
2026-09-27
hugetlb 预留计数修复 · v3
v3 修复 HugeTLB subpool 仅在有 max_hpages 时跟踪 used_hpages,保证 min_hpages 预留并修补泄漏。
原始补丁链接
子 Patch(4)
1/4
mm: hugetlb: Track used_hpages when getting/putting pages from subpool
From: Ackerley Tng ackerleytng@google.com HugeTLB subpools currently only track used pages (used_hpages) when a maximum size limit (max_hpages) is configured. This breaks minimum size (min_hpages)
2/4
mm: hugetlb: Fix out_put_pages subpool reserve calculation
From: Ackerley Tng ackerleytng@google.com When reserving pages for a mapping fails during global accounting, the error path rolls back the adjustments made to the subpool. Currently, this rollback
3/4
mm: hugetlb: Fix subpool usage leak on allocation failure
From: Ackerley Tng ackerleytng@google.com When folio allocation fails early (e.g. buddy allocation failure or cgroup charging failure) and a reservation was not used (meaning an unreserved global p
4/4
mm: hugetlb: Avoid re-allocating global reservations on region add failure
From: Ackerley Tng ackerleytng@google.com When reserving huge pages for a shared mapping, reservations are first requested from the subpool, and any remainder is accounted in global reservations. W