]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu_monitor_json: Implement logic for setting iothread.thread-pool-{min,max}
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 30 Jun 2022 11:44:58 +0000 (13:44 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 7 Jul 2022 15:39:19 +0000 (17:39 +0200)
commit3547875f3a8cf286a03b62f5e7bdb8e4b0eeee29
tree79ac41638de8392d554cd547e9964b90d4db5987
parent49a32cd8cbe2c3767ebc0192359adc07abd17c8f
qemu_monitor_json: Implement logic for setting iothread.thread-pool-{min,max}

When virDomainSetIOThreadParams() API is called, well its QEMU
impl: qemuDomainSetIOThreadParams() then typed params are parsed
by qemuDomainIOThreadParseParams() into this
qemuMonitorIOThreadInfo struct. In the struct we have a <int,
bool> pair for every IOThread attribute we can tune through
monitor. The struct is then passed to
qemuMonitorJSONSetIOThread() which looks at the bool and if set
then the corresponding attribute is set to given value. Each
attribute is thus changed in a separate call. While this works
for attributes independent of each other ("poll-max-ns",
"poll-grow", "poll-shrink"), it does not always work for the
other attributes ("thread-pool-min" and "thread-pool-max").

The limitation here is that the lower boundary (minimum) has to
be lower (or equal to) the upper boundary (maximum) at all times.

This means, that in some cases we might need to set attributes in
reversed order to meet the constraint.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/339
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
src/qemu/qemu_monitor_json.c