io_uring_prep_timeout() leading to an IO pressure close to 100

From: Fiona Ebner

Date: Wed Apr 01 2026 - 11:11:09 EST


Dear maintainers,

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).

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.

Best Regards,
Fiona

[0]:

#include <errno.h>
#include <stdio.h>
#include <liburing.h>

int main(void) {
int ret;
struct io_uring ring;
struct __kernel_timespec ts;
struct io_uring_sqe *sqe;

ret = io_uring_queue_init(128, &ring, 0);
if (ret != 0) {
printf("Failed to initialize io_uring\n");
return ret;
}

ts = (struct __kernel_timespec){
.tv_sec = 60,
};

sqe = io_uring_get_sqe(&ring);
if (!sqe) {
printf("Full sq\n");
return -1;
}

io_uring_prep_timeout(sqe, &ts, 1, 0);
io_uring_sqe_set_data(sqe, NULL);

do {
ret = io_uring_submit_and_wait(&ring, 1);
printf("got ret %d\n", ret);
} while (ret == -EINTR);

io_uring_queue_exit(&ring);

return 0;
}