[Devel] [PATCH hci-8.2] Revert "drivers/vhost: add ioctl to increase the number of workers"
Konstantin Khorenko
khorenko at virtuozzo.com
Mon Nov 30 18:41:21 MSK 2026
Hi Alexander,
One more thing on this change: the new QEMU on a node that still runs
the hci-8.1 kernel.
During an hci-8.1 -> hci-8.2 update the node gets
qemu-kvm >= 10.1.0-20.vz10.33 with 3b0b744f6c4 ("vhost-blk: create
kernel threads with the mainstream worker ioctls"), but keeps running
its 24.x kernel until the reboot. 6afc2f6416c3 ("drivers/vhost/blk: add
support for worker ioctls") is in 26.x only, from 26.1 on; on 24.x
vhost_blk_ioctl() never reaches vhost_worker_ioctl(), so
VHOST_NEW_WORKER fails there.
What happens to a VM started in that window:
+----------------------------+---------------------------------------+
| VM | new QEMU on a 24.x kernel |
+----------------------------+---------------------------------------+
| no vhost-blk disks | not affected |
| vhost-blk, num-threads = 1 | starts: VHOST_SET_FORK_FROM_OWNER |
| (the QEMU default) | exists on 24.x, the worker becomes a |
| | vhost_task as on the new kernel |
| vhost-blk, num-threads > 1 | fails: VHOST_NEW_WORKER fails and |
| | there is no fallback, so start, |
| | restart and incoming migration fail |
| already running | not affected, old QEMU process |
+----------------------------+---------------------------------------+
So the window is the time between the package update and the reboot.
If the node stays in maintenance with all VMs moved away for the whole
update, nothing breaks in practice.
Questions:
1. Does our management stack (nova/libvirt with hw:use_vhostblk) ever
set num-threads > 1 for vhost-blk disks?
2. If it does, which way do we close the window: QEMU falls back to
VHOST_SET_NWORKERS when VHOST_NEW_WORKER fails, or the update
procedure guarantees that no VM starts on the node before the
reboot?
--
Konstantin Khorenko,
Virtuozzo Linux Kernel Team
More information about the Devel
mailing list