In a recent development, Jens Axboe, known for creating io_uring and I/O schedulers CFQ, Deadline, and Noop, has proposed a patch for inclusion in the emulator codebase QEMU that aims to reduce delays in the “aio=io_uring” mode by 50-80 times for fdmon (file descriptor monitoring) when the system is idle.
The issue arose due to the translation of the ppoll() in sleep state with a 499 ms timeout despite I/O presence. To address this problem, a patch has been suggested to add a call to the aio_notify() function in the SQE (Submission Queue Entry) entry creation function, which helps bring ppoll() out of sleep mode and resume the main event processing loop execution.
The problem was discovered during regression testing of io_uring in virtual machines with various block devices. Jens noticed random timeouts when using AHCI/SATA devices in the “aio=io_uring” mode, while configurations with virtio-blk or nvme devices consistently completed tests successfully in about a second. Although delays affect all block devices, they are most noticeable for AHCI/SATA devices due to MMIO usage.
Jens also shared his experience of debugging the issue using the AI assistant Claude. By identifying a script that replicated the timeout conditions, Jens provided Claude with debugging data and access to a virtual machine to investigate the root cause of the problem.
Claude conducted tests with the virtio-blk device and confirmed that the issue was not related to it. Further experiments led to the realization that synthetic I/O tests were not capturing the slowdown, which became more apparent when simulated data processing was introduced.
Before the fix, the execution time for the test on a system in an idle state was 25.76 seconds. Following the patch implementation, the same test on an idle system yielded improved results.