[PATCH qemu-server 00/10] convert drivedevice to json format && implement multiple iothreads

Alexandre Derumier alexandre.derumier at groupe-cyllene.com
Wed Jul 2 16:48:50 CEST 2025


Hi,

This patch serie apply on top of last fiona patch series.
(not related to blockdev, so this can apply to any machine version)

patch 1-3: add Drivedevice module and move current code
patch 4-9: convert drive devices && iothreads to json format
patch 10: implement multiple iothreads

The json format is needed to be able to map a list of multiples iothreads
for each disk.

iothreads are defined globally in a static number at vm start.
(no hotplug|unplug of iothreads here)

iothreads are shared between all disks(where iothread is enabled), and could be pinned to specific
host cores. (not implemented yet, as it need something more powerfull than
current taskset,as ideally we want to pin iothreads on differents host cores
than vm cpus pinning)

Some redhat doc:
https://developers.redhat.com/articles/2024/09/05/scaling-virtio-blk-disk-io-iothread-virtqueue-mapping
https://vmsplice.net/~stefan/stefanha-kvm-forum-2024.pdf




Alexandre Derumier (10):
  introduce DriveDevice module
  add print_drivedevice_controller && print_drivedevice_iothread
  hotplug: drive controller : use print_drivedevice_iothread &&
    print_drivedevice_controller
  pci: add get_pci_addr
  qmphelpers: add qmp_deviceadd && qmp_devicedel
  convert drive device to json format
  convert iothread to json
  convert disk controller device to json format
  tests: cfg2cmd: convert drive devices to json format
  RFC: add multiple iothreads support

 src/PVE/QemuServer.pm                         | 266 +++-------------
 src/PVE/QemuServer/DriveDevice.pm             | 296 ++++++++++++++++++
 src/PVE/QemuServer/Makefile                   |   1 +
 src/PVE/QemuServer/PCI.pm                     |  22 +-
 src/PVE/QemuServer/QMPHelpers.pm              |  16 +
 src/test/cfg2cmd/aio.conf.cmd                 |  32 +-
 src/test/cfg2cmd/bootorder-empty.conf.cmd     |  14 +-
 src/test/cfg2cmd/bootorder-legacy.conf.cmd    |  14 +-
 src/test/cfg2cmd/bootorder.conf.cmd           |  14 +-
 ...putype-icelake-client-deprecation.conf.cmd |   6 +-
 src/test/cfg2cmd/ide.conf.cmd                 |  12 +-
 src/test/cfg2cmd/iothreads.conf               |   7 +
 src/test/cfg2cmd/iothreads.conf.cmd           |  45 +++
 .../cfg2cmd/pinned-version-pxe-pve.conf.cmd   |   6 +-
 src/test/cfg2cmd/pinned-version-pxe.conf.cmd  |   6 +-
 src/test/cfg2cmd/pinned-version.conf.cmd      |   6 +-
 src/test/cfg2cmd/q35-ide.conf.cmd             |  12 +-
 .../q35-linux-hostpci-template.conf.cmd       |   4 +-
 src/test/cfg2cmd/seabios_serial.conf.cmd      |   6 +-
 ...imple-balloon-free-page-reporting.conf.cmd |   6 +-
 src/test/cfg2cmd/simple-btrfs.conf.cmd        |  12 +-
 src/test/cfg2cmd/simple-cifs.conf.cmd         |  12 +-
 .../cfg2cmd/simple-disk-passthrough.conf.cmd  |   8 +-
 src/test/cfg2cmd/simple-lvm.conf.cmd          |  10 +-
 src/test/cfg2cmd/simple-lvmthin.conf.cmd      |  10 +-
 src/test/cfg2cmd/simple-rbd.conf.cmd          |  20 +-
 src/test/cfg2cmd/simple-virtio-blk.conf.cmd   |   6 +-
 .../cfg2cmd/simple-zfs-over-iscsi.conf.cmd    |  12 +-
 src/test/cfg2cmd/simple1-template.conf.cmd    |  10 +-
 src/test/cfg2cmd/simple1.conf.cmd             |   6 +-
 30 files changed, 546 insertions(+), 351 deletions(-)
 create mode 100644 src/PVE/QemuServer/DriveDevice.pm
 create mode 100644 src/test/cfg2cmd/iothreads.conf
 create mode 100644 src/test/cfg2cmd/iothreads.conf.cmd

-- 
2.39.5




More information about the pve-devel mailing list