On Wed, Nov 18, 2026 at 08:58:11AM -0700, Jens Axboe wrote:
> On 11/15/26 4:05 PM, John Maguire wrote:
> > On Tue, Jun 02, 2026, Stefan Hajnoczi wrote:
> >> Pinging Jens: io_uring accounts POLL_ADD SQEs as blocking I/O activity
> >> whereas select(2)/poll(2)/epoll_wait(2) do not. Would it make sense to
> >> follow the same accounting as the syscalls for this operation since that
> >> is probably expected?
> > 
> > Hello,
> > 
> > I run Incus on two hosts and see misleading iowait and IO pressure on
> > both since Incus 7.6, which puts virtio disks on a dedicated iothread by
> > default. Incus users now hit this without opting into iothreads.
> > 
> > Host 1: Arch Linux, stock QEMU 11.1.3, kernel 6.18.62, 16 CPUs, five
> > VMs. /proc/pressure/io shows about 80% "some" and 75% "full", with
> > 20-30% iowait. The disks are lightly loaded (under 15% util), there are
> > no D-state tasks, the pressure is confined to the cgroup holding the
> > QEMU processes, and each QEMU process has one thread in io_cqring_wait.
> > It started the day I upgraded from Incus 7.5.1 to 7.6; QEMU 11.1.x had
> > been in use on this host since late September without it.
> > 
> > Host 2: Debian 13, kernel 6.12.116, 56 CPUs, four VMs, Zabbly's Incus
> > packages. These bundle QEMU 11.1.3 with the pve-qemu patch
> > "fdmon-io_uring: avoid idle event loop being accounted as IO wait".
> > Pressure is about 68% "some" and 65% "full" with disks under 1% util,
> > and again one thread per QEMU process in io_cqring_wait. This kernel
> > does not advertise IORING_FEAT_NO_IOWAIT (added in 6.15), so the patch
> > has no effect there.
> > 
> > So the downstream patch only helps on 6.15+ kernels, and distros
> > shipping unpatched QEMU get these numbers by default.
> > 
> > Is there a preferred way forward? Fiona offered to submit the Proxmox
> > workaround to qemu-devel, and Stefan asked whether io_uring should
> > instead account POLL_ADD the way poll(2) does. Either would fix this
> > for users on distro packages.
> 
> We can just queue up the patches for stable so they bubble back to
> older versions, I think that's the cleanest approach and gets us
> a unified interface across supported kernel versions.

Fiona: On the QEMU side, please submit the QEMU IORING_FEAT_NO_IOWAIT
patch upstream and let's merge it on qemu.git/master and
qemu.git/stable. Given that the kernel feature is available, QEMU might
as well use it.

Jens: I still think io_uring operations should perform accounting inside
the kernel the same way as the equivalent syscalls do (e.g. poll(2) does
not count as iowait).

Pushing the responsibility of deciding what counts as iowait to
userspace via IORING_FEAT_NO_IOWAIT means the decision is duplicated in
every application that uses io_uring. That only makes sense to me if
accounting should work differently on a per-application basis and
applications therefore need full control. I'm not aware of applications
actually wanting to do that? Or is iowait fundamentally incompatible
with io_uring so that applications are the only ones who can decide?

Stefan


Reply via email to