v1
2026-09-09
多线程自适应 kswapd 回收 · v1
引入按节点负载自适应的多线程kswapd,回收压力大时可多worker并行,减少高核数系统直接回收延迟。
原始补丁链接
子 Patch(3)
1/3
vmscan: Support multiple kswapd threads per node
为每个 NUMA node 支持多个 kswapd 线程,避免高分配速率下单 kswapd 回收供不上,迫使分配任务在低水位进入 direct reclaim。
2/3
mm/vmscan: handle racing max_seq advancement
When kswapd support is expanded to multiple threads per node, concurrent aging becomes more likely and try_to_inc_max_seq() can lose a race to another aging pass that has already advanced max_seq. Tr
3/3
mm/vmscan: make kswapd wakeups NUMA load-aware
Track a per-node 10-second rolling average of idle CPU cores and use it in wakeup_kswapd() to decide how many kswapd threads to wake. A background worker samples the number of idle cores on each NUMA