Do nothing fast: How to scale idle cpus?
summary
A global raw spinlock in the idle path and a small delay loop during do_idle unexpectedly speeds a scheduler-heavy hackbench on a 192-core AMD EPYC, taking the benchmark from 49s to 29s (≈40% faster). Reproduced with perf stats on a 32-group, pipe-based hackbench, the investigation builds a per-task predictor (per-core 8-bit saturating counters) to bias runqueue selection toward previous CPUs and pack communicating tasks by topology; migration rates drop and hackbench improves, but client–server workloads regress and power effects remain unmeasured.
AI-written summary · about
chapters (11)
- 0:00Introduction to scheduler scaling
- 1:50Benchmark workload improvements
- 3:59Run queue metrics and contention
- 6:27Predictor for task placement
- 9:42Runnable vs utilization metrics
- 11:27Predictor implementation details
- 13:15Alternative approaches to heuristics
- 14:44Load balancing and wake-up strategies
- 15:49Power efficiency considerations
- 16:30Backtracking and capacity analysis
- 17:36Performance improvement factors
related talks
44mRestartable Sequences: Scheduler-Aware Scaling of Memory Use on Many-Core Systems
35mOpening the Box: Diagnosing Operating-System Task-Scheduler...
40mLatency hints for CFS task
24mLimit the idle CPU search depth and use CPU filter during task wake up
52mEffectively Measure and Reduce Kernel Latencies for Real-time Constraints
46mOS Scheduling with Nest: Keeping Tasks Close Together on Warm Cores
31mScaling & Optimizing Performance on AMD EPYC Systems
32mImprove CPU Utilization by Designing a New Schedule Algorithm
