On Wed, Feb 4, 2026 at 8:58 PM Markus Armbruster <[email protected]> wrote:
>
> Zhang Chen <[email protected]> writes:
>
> > The attached flag depends on struct IOThreadInfo's
> > 'attached': 'bool'. It can show whether the iothread
> > is attached to an actual device. Show in the qmp/hmp
> > CMD with "attached": true/false.
> >
> > Signed-off-by: Zhang Chen <[email protected]>
>
> [...]
>
> > diff --git a/qapi/misc.json b/qapi/misc.json
> > index 1f5062df2a..cb865d6e48 100644
> > --- a/qapi/misc.json
> > +++ b/qapi/misc.json
> > @@ -76,6 +76,15 @@
> > #
> > # @thread-id: ID of the underlying host thread
> > #
> > +# @attached: The attached parameter is a flag indicating whether
> > +# the IOThread is currently associated with an active device
>
> "the iothread" for consistency with other doc text.
OK.
>
> > +# (e.g., virtio-blk). In hotplug scenarios, users can
>
> I'd drop the comma.
OK.
>
> > +# 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.
> > +# (since 12.0)
>
> (since 11.0)
OK.
>
> > +#
> > # @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',
> > + 'attached': 'bool',
> > 'poll-max-ns': 'int',
> > 'poll-grow': 'int',
> > 'poll-shrink': 'int',
> > @@ -118,6 +128,7 @@
> > # {
> > # "id":"iothread0",
> > # "thread-id":3134,
> > +# "attached":false,
> > # "poll-max-ns":32768,
> > # "poll-grow":0,
> > # "poll-shrink":0,
> > @@ -126,6 +137,7 @@
> > # {
> > # "id":"iothread1",
> > # "thread-id":3135,
> > +# "attached":true,
> > # "poll-max-ns":32768,
> > # "poll-grow":0,
> > # "poll-shrink":0,
>
> With that
> Acked-by: Markus Armbruster <[email protected]>
Thanks for review, could you please take a look at the 2/3 patch in this series?
[RESEND PATCH V3 2/3] iothread: Introduce a new flag to show iothreads
attached status
If have some issues, I can fix it in the next version.
Thanks
Chen
>