Linux 5.11 To Land Optimization That Helps IO_uring Performance
The change to task_work to use TIF_NOTIFY_SIGNAL when available is queued as part of the tip.git core/entry code ahead of the Linux 5.11 merge window opening in December. Currently TIF_NOTIFY_SIGNAL is wired up for x86/x86_64 while Jens is working on adding this support to other CPU architectures as well. We'll see how many architectures get supported in time for Linux 5.11 as once completing that work he'll be able to move on with a set of clean-ups.
That change by Facebook's Jens Axboe notes in his tests that with this improvement the IO_uring performance in his test jumped from 1.38M requests/second up to 1.67M requests/s. Besides achieving 22% higher throughput, the CPU usage was also lower thanks to less locking.
The generic and x86 bits of my new fake signal, which allows speeding up task_work that io_uring relies so heavily on, is now queued up for 5.11. This will be a nice improvement, particularly for threaded workloads.https://t.co/2WqooZkMgE
— Jens Axboe (@axboe) October 29, 2020
Axboe shared that this optimization is particularly of help for threaded workloads. He's also looking at ultimately getting the code into the Linux 5.10 LTS kernel as a back-port after the 5.11 cycle gets underway.