From: Zhang Chen <zhangckid@gmail.com>
To: qemu-devel <qemu-devel@nongnu.org>,
"Dr . David Alan Gilbert" <dave@treblig.org>,
Eric Blake <eblake@redhat.com>,
Markus Armbruster <armbru@redhat.com>
Cc: Zhang Chen <zhangckid@gmail.com>
Subject: [PATCH V2 4/4] qemu-options: Introduce new flag for iothread
Date: Wed, 21 Jan 2026 14:41:10 +0800 [thread overview]
Message-ID: <20260121064110.28760-4-zhangckid@gmail.com> (raw)
In-Reply-To: <20260121064110.28760-1-zhangckid@gmail.com>
This demand comes from Cloud Native ecosystem.
User want to manage resources more flexible like containers (Kata container).
The real workload maybe changed(runc) in the VM without VM reboot,
It may need hotplug/unplug different multi disks with multi iothreads to meet
high level scheduler's needs(like K8s).
Signed-off-by: Zhang Chen <zhangckid@gmail.com>
---
qemu-options.hx | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/qemu-options.hx b/qemu-options.hx
index ec92723f10..9afe9d4ebb 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -6352,7 +6352,7 @@ SRST
CN=laptop.example.com,O=Example Home,L=London,ST=London,C=GB
- ``-object iothread,id=id,poll-max-ns=poll-max-ns,poll-grow=poll-grow,poll-shrink=poll-shrink,aio-max-batch=aio-max-batch``
+ ``-object iothread,id=id,attached=attached,poll-max-ns=poll-max-ns,poll-grow=poll-grow,poll-shrink=poll-shrink,aio-max-batch=aio-max-batch``
Creates a dedicated event loop thread that devices can be
assigned to. This is known as an IOThread. By default device
emulation happens in vCPU threads or the main event loop thread.
@@ -6376,6 +6376,13 @@ SRST
for many cases but can be adjusted based on knowledge of the
workload and/or host device latency.
+ The ``attached`` parameter is a flag to show whether the iothread
+ is attached to an actual device(for example virtio-blk). In hotplug
+ scenario, user can add multiple "-object iothread" and multiple
+ devices (like virtio-blk). When user hotunplug the devices can keep
+ the iothreads as a thread pool, following the new hotplug devices can
+ attach to the released iothread.
+
The ``poll-max-ns`` parameter is the maximum number of
nanoseconds to busy wait for events. Polling can be disabled by
setting this value to 0.
--
2.49.0
next prev parent reply other threads:[~2026-01-21 6:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-21 6:41 [PATCH V2 1/4] qapi/misc: Fix missed query-iothreads items Zhang Chen
2026-01-21 6:41 ` [PATCH V2 2/4] iothread: Introduce a new flag to show iothreads attached status Zhang Chen
2026-01-21 6:41 ` [PATCH V2 3/4] qapi: Add attached flag for iothread Zhang Chen
2026-01-23 12:57 ` Markus Armbruster
2026-01-21 6:41 ` Zhang Chen [this message]
2026-01-23 13:04 ` [PATCH V2 4/4] qemu-options: Introduce new " Markus Armbruster
2026-01-23 12:51 ` [PATCH V2 1/4] qapi/misc: Fix missed query-iothreads items Markus Armbruster
2026-01-24 13:48 ` 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=20260121064110.28760-4-zhangckid@gmail.com \
--to=zhangckid@gmail.com \
--cc=armbru@redhat.com \
--cc=dave@treblig.org \
--cc=eblake@redhat.com \
--cc=qemu-devel@nongnu.org \
/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.