v1
2026-10-07
THP可移动页块隔离 · v1
gigablock 分配重构第一步:修正 pageblock claiming/stealing 策略,减少不可移动页混入 movable 块以提升 THP 成功率。
原始补丁链接
子 Patch(5)
1/5
mm/page_alloc: count guard pages as free again when their buddy merges
With debug_guardpage_minorder set, expand() turns the unused halves of a split into guard pages, which page_del_and_expand() leaves out of the free counts. Freeing the allocated half credits only that
2/5
mm/page_alloc: count a merged buddy's pages under the merged type
__free_one_page() merges a freed page with a free buddy of another mergeable type at pageblock order and above, and retypes the buddy to match. The buddy’s pages stay counted under the old type: nothi
3/5
mm/page_alloc: convert any movable pageblock on a non-movable allocation
try_to_claim_block() converts a movable pageblock for a non-movable allocation only when half its pages are free or compatible. Otherwise the steal path takes pages without converting, and non-movable
4/5
mm/page_alloc: skip movable blocks during non-movable steals
__rmqueue_steal() hands a non-movable allocation pages from a movable pageblock and leaves the block’s type alone. Those pages can never migrate, so the block reads movable to compaction while holding
5/5
mm/page_alloc: claim blocks captured for non-movable use
compaction_capture() hands any merged block to the compacting task with no type change, except it refuses a movable block to a non-movable request below pageblock order. A non-movable request capturin