From: Markus Armbruster <armbru@redhat.com>
To: Zhang Chen <zhangckid@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
"Dr . David Alan Gilbert" <dave@treblig.org>,
Eric Blake <eblake@redhat.com>,
"Michael S . Tsirkin" <mst@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [PATCH V5 13/13] qapi: examine IOThread attachment status via query-iothreads
Date: Wed, 18 Mar 2026 07:09:25 +0100 [thread overview]
Message-ID: <87o6klfz3e.fsf@pond.sub.org> (raw)
In-Reply-To: <20260305142459.52559-14-zhangckid@gmail.com> (Zhang Chen's message of "Thu, 5 Mar 2026 22:24:59 +0800")
Zhang Chen <zhangckid@gmail.com> writes:
> Extend the 'IOThreadInfo' structure to include attachment metrics.
> This allows users to monitor the associated devices by identify them
> by their QOM paths.
>
> New fields added to IOThreadInfo:
> - @holders: A string containing of QOM paths for the attached devices.
>
> These fields are also exposed via the Human Monitor Interface (HMP)
> command 'info iothreads' to assist with manual debugging and
> performance tuning.
>
> Signed-off-by: Zhang Chen <zhangckid@gmail.com>
[...]
> diff --git a/qapi/misc.json b/qapi/misc.json
> index 1f5062df2a..a381074c04 100644
> --- a/qapi/misc.json
> +++ b/qapi/misc.json
> @@ -76,6 +76,15 @@
> #
> # @thread-id: ID of the underlying host thread
> #
> +# @holders: The parameter is an array of QOM paths indicating how many
> +# active devices are currently associated with this iothread
> +# (e.g. virtio-blk). In hotplug scenarios, users can
> +# pre-allocate multiple iothread objects to serve as a persistent
> +# thread pool. When a device is hot-unplugged, the corresponding
> +# IOThread is released but remains available, allowing subsequent
> +# hot-plugged devices to attach to and reuse the existing thread.
> +# Returns empty if no devices are attached. (since 11.0)
Let me try to polish this a bit:
# @holders: QOM paths of the devices currently associated with this
# iothread. Users can pre-allocate multiple iothread objects to
# serve as a persistent thread pool. When a device is
# hot-unplugged, it is detached from its iothread, but the
# iothread remains available, allowing future hot-plugged devices
# to attach to it.
> +#
> # @poll-max-ns: maximum polling time in ns, 0 means polling is
> # disabled (since 2.9)
> #
> @@ -93,6 +102,7 @@
> { 'struct': 'IOThreadInfo',
> 'data': {'id': 'str',
> 'thread-id': 'int',
> + 'holders': ['str'],
> 'poll-max-ns': 'int',
> 'poll-grow': 'int',
> 'poll-shrink': 'int',
> @@ -118,6 +128,8 @@
> # {
> # "id":"iothread0",
> # "thread-id":3134,
> +# "holders":["/machine/peripheral/blk1/virtio-backend",
> +# "/machine/peripheral/blk0/virtio-backend"],
> # "poll-max-ns":32768,
> # "poll-grow":0,
> # "poll-shrink":0,
> @@ -126,6 +138,7 @@
> # {
> # "id":"iothread1",
> # "thread-id":3135,
> +# "holders":["/machine/peripheral/blk2/virtio-backend"],
> # "poll-max-ns":32768,
> # "poll-grow":0,
> # "poll-shrink":0,
With a bit of doc polish:
Acked-by: Markus Armbruster <armbru@redhat.com>
next prev parent reply other threads:[~2026-03-18 6:10 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-05 14:24 [PATCH V5 00/13] iothread: Support tracking and querying IOThread holders Zhang Chen
2026-03-05 14:24 ` [PATCH V5 01/13] qapi/misc: Fix missed query-iothreads items Zhang Chen
2026-03-05 14:24 ` [PATCH V5 02/13] iothread: introduce iothread_ref/unref to track attached devices Zhang Chen
2026-03-09 7:49 ` Stefan Hajnoczi
2026-03-10 9:49 ` Zhang Chen
2026-03-05 14:24 ` [PATCH V5 03/13] iothread: tracking iothread users with holder name Zhang Chen
2026-03-09 8:02 ` Stefan Hajnoczi
2026-03-10 9:49 ` Zhang Chen
2026-03-09 8:33 ` Stefan Hajnoczi
2026-03-10 9:51 ` Zhang Chen
2026-03-05 14:24 ` [PATCH V5 04/13] blockdev: Update " Zhang Chen
2026-03-09 8:15 ` Stefan Hajnoczi
2026-03-10 10:02 ` Zhang Chen
2026-03-12 5:24 ` Stefan Hajnoczi
2026-03-12 7:05 ` Zhang Chen
2026-03-12 7:44 ` Stefan Hajnoczi
2026-03-12 9:16 ` Markus Armbruster
2026-03-17 13:25 ` Zhang Chen
2026-03-18 6:19 ` Markus Armbruster
2026-03-18 9:13 ` Stefan Hajnoczi
2026-03-30 3:13 ` Zhang Chen
2026-03-30 9:02 ` Markus Armbruster
2026-03-30 13:31 ` Stefan Hajnoczi
2026-03-30 17:43 ` Zhang Chen
2026-03-30 17:52 ` Stefan Hajnoczi
2026-03-30 18:58 ` Zhang Chen
2026-03-31 5:14 ` Markus Armbruster
2026-03-05 14:24 ` [PATCH V5 05/13] virtio-vq-mapping: track iothread-vq-mapping references using device path Zhang Chen
2026-03-09 8:21 ` Stefan Hajnoczi
2026-03-10 10:03 ` Zhang Chen
2026-03-05 14:24 ` [PATCH V5 06/13] virtio: use iothread_get/put_aio_context for thread pinning Zhang Chen
2026-03-09 8:27 ` Stefan Hajnoczi
2026-03-10 10:07 ` Zhang Chen
2026-03-05 14:24 ` [PATCH V5 07/13] net/colo: track IOThread references using path-based holder Zhang Chen
2026-03-09 8:44 ` Stefan Hajnoczi
2026-03-10 10:15 ` Zhang Chen
2026-03-12 5:36 ` Stefan Hajnoczi
2026-03-12 6:31 ` Zhang Chen
2026-03-12 7:36 ` Stefan Hajnoczi
2026-03-12 8:45 ` Zhang Chen
2026-03-05 14:24 ` [PATCH V5 08/13] block/export: Update tracking iothread users with holder name Zhang Chen
2026-03-09 8:52 ` Stefan Hajnoczi
2026-03-05 14:24 ` [PATCH V5 09/13] monitor: " Zhang Chen
2026-03-09 8:56 ` Stefan Hajnoczi
2026-03-10 10:24 ` Zhang Chen
2026-03-05 14:24 ` [PATCH V5 10/13] virtio-balloon: " Zhang Chen
2026-03-05 14:24 ` [PATCH V5 11/13] vfio-user/proxy: " Zhang Chen
2026-03-05 14:24 ` [PATCH V5 12/13] xen-block: " Zhang Chen
2026-03-05 14:24 ` [PATCH V5 13/13] qapi: examine IOThread attachment status via query-iothreads Zhang Chen
2026-03-18 6:09 ` Markus Armbruster [this message]
2026-03-18 13:25 ` Zhang Chen
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=87o6klfz3e.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=dave@treblig.org \
--cc=eblake@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=zhangckid@gmail.com \
/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.