Motivation
Currently, IOThread references are opaque. This series introduces
"holder" tracking via QOM paths to improve observability,
especially for persistent thread pools.
In hotplug scenarios, users often pre-allocate multiple
IOThreads to serve as a pool. When devices are hot-unplugged,
IOThreads are released but remain available for subsequent reuse.
This series allows users to monitor exactly which devices are
currently attached to which IOThread in the pool.
Changes
Core API: Replaced raw object_ref/unref with iothread_get/put_aio_context(...,
holder).
Subsystems: Migrated Virtio (blk, vq-mapping, balloon), Block (export, xen),
Net (COLO), and VFIO to the new API.
Observability: Added holders (a array of QOM paths) to query-iothreads
and info iothreads.
Thanks
Chen
Zhang Chen (13):
qapi/misc: Fix missed query-iothreads items
iothread: introduce iothread_ref/unref to track attached devices
iothread: tracking iothread users with holder name
blockdev: Update tracking iothread users with holder name
virtio-vq-mapping: track iothread-vq-mapping references using device
path
virtio: use iothread_get/put_aio_context for thread pinning
net/colo: track IOThread references using path-based holder
block/export: Update tracking iothread users with holder name
monitor: Update tracking iothread users with holder name
virtio-balloon: Update tracking iothread users with holder name
vfio-user/proxy: Update tracking iothread users with holder name
xen-block: Update tracking iothread users with holder name
qapi: examine IOThread attachment status via query-iothreads
block/export/export.c | 7 ++-
blockdev.c | 9 +++-
hw/block/dataplane/xen-block.c | 11 ++--
hw/block/virtio-blk.c | 15 +++---
hw/scsi/virtio-scsi-dataplane.c | 17 +++---
hw/vfio-user/proxy.c | 9 +++-
hw/virtio/iothread-vq-mapping.c | 11 ++--
hw/virtio/virtio-balloon.c | 17 ++++--
include/hw/virtio/iothread-vq-mapping.h | 6 ++-
include/system/iothread.h | 4 +-
iothread.c | 70 ++++++++++++++++++++++++-
monitor/hmp-cmds.c | 13 +++++
monitor/monitor.c | 4 +-
monitor/qmp.c | 3 +-
net/colo-compare.c | 23 +++++---
qapi/misc.json | 25 ++++++++-
16 files changed, 198 insertions(+), 46 deletions(-)
--
2.49.0