v6
2026-08-14
swap不可用时避免大folio分裂 · v6
无交换时避免拆分大 folio:新增 page_counter_margin()、区分大 folio 交换分配失败,shmem 仅对 -E2BIG 拆分。
原始补丁链接
子 Patch(4)
1/4
mm: add page_counter_margin()
[mm: add page_counter_margin()] From: Johannes Weiner hannes@cmpxchg.org mem_cgroup_get_nr_swap_pages() open-codes the remaining capacity across the memcg swap counter hierarchy. Add page_counter_
2/4
mm: distinguish large folio swap allocation failures
[mm: distinguish large folio swap allocation failures] folio_alloc_swap() reports most failures with generic negative error codes. Reclaim callers consequently cannot tell whether splitting a large fo
3/4
mm/vmscan: avoid pointless large folio splits without swap
[mm/vmscan: avoid pointless large folio splits without swap] From: “Barry Song (Xiaomi)” baohua@kernel.org When swap is disabled, exhausted, or unavailable due to memcg swap limits, splitting a lar
4/4
mm/shmem: split large folios only on -E2BIG
[mm/shmem: split large folios only on -E2BIG] shmem_writeout() currently splits a large folio on every folio_alloc_swap() failure. With the refined return-value contract, only -E2BIG indicates that sp