Re: io_uring_prep_timeout() leading to an IO pressure close to 100
From: Fiona Ebner
Date: Thu Apr 02 2026 - 05:27:04 EST
Am 01.04.26 um 5:02 PM schrieb Jens Axboe:
> On 4/1/26 8:59 AM, Fiona Ebner wrote:
>> I'm currently investigating an issue with QEMU causing an IO pressure
>> value of nearly 100 when io_uring is used for the event loop of a QEMU
>> iothread (which is the case since QEMU 10.2 if io_uring is enabled
>> during configuration and available).
>
> It's not "IO pressure", it's the useless iowait metric...
But it is reported as IO pressure by the kernel, i.e. /proc/pressure/io
(and for a cgroup, /sys/fs/cgroup/foo.slice/bar.scope/io.pressure).
>> The cause seems to be the io_uring_prep_timeout() call that is used for
>> blocking wait. I attached a minimal reproducer below, which exposes the
>> issue [0].
>>
>> This was observed on a kernel based on 7.0-rc6 as well as 6.17.13. I
>> haven't investigated what happens inside the kernel yet, so I don't know
>> if it is an accounting issue or within io_uring.
>>
>> Let me know if you need more information or if I should test something
>> specific.
>
> If you won't want it, just turn it off with io_uring_set_iowait().
QEMU does submit actual IO request on the same ring and I suppose iowait
should still be used for those?
Maybe setting the IORING_ENTER_NO_IOWAIT flag if only the timeout
request is being submitted and no actual IO requests is an option? But
even then, if a request is submitted later via another thread, iowait
for that new request won't be accounted for, right?
Is there a way to say "I don't want IO wait for timeout submissions"?
Wouldn't that even make sense by default?
Best Regards,
Fiona