Linux 7.4 workqueue flush optimization yields 10-100x speedup on large servers
A workqueue optimization by Tejun Heo in Linux 7.4 makes idle flushes 10 to 100 times faster on large CPU-count systems by only visiting queues used since the last flush.
Summary
Linux 7.4 includes a workqueue optimization that dramatically reduces flush overhead on high core-count servers. The change, authored by longtime developer Tejun Heo, targets a bottleneck reported by Huawei engineer Yao Kai where XFS log force operations spent up to 64 microseconds per flush on a 128-CPU machine. By tracking which queues have been used since the last flush rather than scanning all possible CPUs, the kernel avoids unnecessary workqueue walks.
Benchmark numbers from the commit
- Idle per-cpu workqueue: 40K → 4.2M flushes/second on a 192-CPU 2-node machine
- Idle unbound workqueue: 450K → 4.3M flushes/second on same hardware
- 16-thread contended load: per-cpu 30K → 110K flushes/sec; unbound 60K → 180K flushes/sec
- Dense flushes with all pwqs active: unchanged for per-cpu, 15-20% slower for unbound
- Queue submission path: no change in latency
- Original pain point: XFS CIL workqueue flushed on every log force, up to 64µs per flush on 128-CPU system
Why it matters
The improvement directly benefits large-scale server workloads using XFS and other subsystems that frequently flush workqueues. Enterprise Linux deployments on high core-count Intel Xeon and AMD EPYC hardware should see reduced latency in I/O-bound operations.
Original reference: www.phoronix.com →