From: Stefan Hajnoczi <stefanha@redhat.com>
To: Fiona Ebner <f.ebner@proxmox.com>
Cc: "open list:Network Block Dev..." <qemu-block@nongnu.org>,
QEMU Developers <qemu-devel@nongnu.org>,
Fam Zheng <fam@euphon.net>, Hanna Czenczek <hreitz@redhat.com>,
Kevin Wolf <kwolf@redhat.com>
Subject: Re: Excessive IO PSI for iothread when using io_uring since QEMU 10.2
Date: Mon, 27 Apr 2026 15:13:43 -0400 [thread overview]
Message-ID: <20260427191343.GD218226@fedora> (raw)
In-Reply-To: <017dc767-90e3-4983-8417-e541b3fb04f6@proxmox.com>
[-- Attachment #1: Type: text/plain, Size: 2124 bytes --]
On Fri, Apr 24, 2026 at 12:25:41PM +0200, Fiona Ebner wrote:
> Dear maintainers,
>
> since QEMU 10.2, if io_uring is enabled, it will be used for the event
> loop of iothreads and this causes an IO pressure stall value of nearly
> 100 when idle.
>
> The issue was also reported on the kernel mailing list [0]. The
> suggestion from Jens Axboe was to just turn off the iowait accounting
> completely. But since (for block/file-posix.c), there is actual IO
> submitted via the same ring, I wasn't sure if that is the right approach.
>
> So the idea was to keep track of whether the event loop is otherwise
> idle and only use the IORING_ENTER_NO_IOWAIT flag in that case [1].
>
> However, doing so would only help for block/file-posix.c, which submits
> IO via luring_co_submit() -> fdmon_io_uring_add_sqe(). For example, for
> block/rbd.c, only a poll SQE for the AioHandler node's fd is used. When
> submitting that poll SQE in the iothread, we would need to be able to
> know if IO for RBD is currently in-flight or not to be able to decide
> whether to use the IORING_ENTER_NO_IOWAIT flag or not. Is there a good
> way to do this (in a general way)?
>
> Or should the flag really always be used (if supported by the kernel)?
> Is there a way to tell io_uring/kernel that we are an event loop and our
> waiting should only be accounted for when there is actual IO in-flight?
>
> Happy to hear your opinions and suggestions!
>
> [0]:
> https://lore.kernel.org/io-uring/14bc6266-5bc9-4454-9518-d1016bfe417b@proxmox.com/T/
Hi Fiona,
Jens replied yesterday confirmed your suspicion that the number of
inflight requests is not being tracked correctly.
Is there still a problem after fixing the kernel's inflight counting? If
not, then no QEMU change is necessary and that seems like the cleanest
solution anyway. The kernel should know whether there is I/O in flight
and so it doesn't seem right that userspace needs to hint this.
Stefan
>
> [1]:
> https://lore.proxmox.com/pve-devel/525c4dad-6d04-41f0-8a21-9302b0c6baa4@proxmox.com/T/
>
> Best Regards,
> Fiona
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2026-04-27 19:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-24 10:25 Excessive IO PSI for iothread when using io_uring since QEMU 10.2 Fiona Ebner
2026-04-27 19:13 ` Stefan Hajnoczi [this message]
2026-04-28 12:10 ` Fiona Ebner
2026-04-28 13:31 ` Fiona Ebner
2026-04-28 16:19 ` Stefan Hajnoczi
2026-04-29 8:00 ` Fiona Ebner
2026-04-29 12:20 ` Stefan Hajnoczi
2026-06-01 17:20 ` Stefan Hajnoczi
2026-06-02 8:41 ` Fiona Ebner
2026-06-02 12:08 ` Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260427191343.GD218226@fedora \
--to=stefanha@redhat.com \
--cc=f.ebner@proxmox.com \
--cc=fam@euphon.net \
--cc=hreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.