RFC mm/vmscan: adaptive multi-threaded kswapd for NUMA-aware reclaim
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 RFC Latest5 patches 8 repliesIn review
- v1 RFC3 patches 2 repliesSuperseded
Changes in v2 from the cover letter
- Add a diagnostic kswapd scan path at MIN_NR_GENS.
- Scale the hopeless-node retry threshold by the active worker count.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | vmscan: Support multiple kswapd threads per nodeinclude/ mm/ mm/ +2 more | +128 | 1 reply | |
| 2/5 | mm/vmscan: silence spurious max_seq race warningmm/ | +1 | 0 replies | |
| 3/5 | mm/vmscan: make kswapd wakeups NUMA load-awareinclude/ mm/ mm/ +1 more | +369 | 0 replies | |
| 4/5 | mm/vmscan: let kswapd scan minimum-generation lruvecsmm/ | +1 | 0 replies | |
| 5/5 | mm/vmscan: scale hopeless threshold for kswapd workersmm/ | +2 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [RFC PATCH v2 0/5] mm/vmscan: adaptive multi-threaded kswapd for NUMA-aware reclaim
This is a follow-up to the RFC for adaptive multi-threaded kswapd on NUMA. It handles concurrent MGLRU aging, adjusts wakeups to node CPU load, and scales the hopeless threshold for multiple workers.
Under memory pressure, an lruvec can end up with only two MGLRU generations. That leaves an older and a younger cohort, a bit like inactive and active LRU lists, though MGLRU tracks age differently.
Regarding the concerns raised in review:
- In the updated Cassandra comparison, four kswapd threads reduced p99 latency from 6.5 ms to 3.35 ms (about 49%) and increased throughput by 10.3%. We believe the latency gain comes from the reclaim design, not from changes to LRU locking.
- This newer result compares four kswapd threads with one. The earlier 7.3% throughput result was measured with eight threads.
We also saw periods with zero file scans. The MIN_NR_GENS guard may
contribute: when only two generations remain, it makes scan_folios() return without scanning the oldest one. This patch tests whether letting kswapd scan that generation helps reclaim progress. The current traces do not tie the zero-scan events to the same lruvec, so this remains a hypothesis; more per-lruvec tracing is needed to compare it with lock contention.
Changes since v1:
- Add a diagnostic kswapd scan path at MIN_NR_GENS.
- Scale the hopeless-node retry threshold by the active worker count.
Testing:
- Cassandra workload with one and four kswapd threads.
Buddy Lumpkin (1):
vmscan: Support multiple kswapd threads per node
Ehab Ababneh (4):
mm/vmscan: silence spurious max_seq race warning mm/vmscan: make kswapd wakeups NUMA load-aware mm/vmscan: let kswapd scan minimum-generation lruvecs mm/vmscan: scale hopeless threshold for kswapd workers
include/linux/mmzone.h | 5 +- include/trace/events/vmscan.h | 32 +++ mm/compaction.c | 8 +- mm/internal.h | 3 + mm/page_alloc.c | 26 +++ mm/vmscan.c | 426 ++++++++++++++++++++++++++++++++-- 6 files changed, 473 insertions(+), 27 deletions(-)
Signature · 1 line
2.43.0