Zhang Chen <[email protected]> writes:
> 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 <[email protected]>
> ---
> 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.
You're documenting something that does not exist:
$ qemu-system-aarch64 -object iothread,id=iot0,attached=off
upstream-qemu: -object iothread,id=iot0,attached=off: Invalid parameter
'attached'
The properties of iothread objects are defined in type
IothreadProperties in qapi/qom.json.