mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35:17 +00:00
qemu: Generate command line for <defaultiothread/> pool size
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2059511 Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
94b71589f1
commit
425d3b12a4
@ -7436,9 +7436,6 @@ qemuBuildIOThreadCommandLine(virCommand *cmd,
|
||||
{
|
||||
size_t i;
|
||||
|
||||
if (def->niothreadids == 0)
|
||||
return 0;
|
||||
|
||||
for (i = 0; i < def->niothreadids; i++) {
|
||||
g_autoptr(virJSONValue) props = NULL;
|
||||
const virDomainIOThreadIDDef *iothread = def->iothreadids[i];
|
||||
@ -7456,6 +7453,19 @@ qemuBuildIOThreadCommandLine(virCommand *cmd,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (def->defaultIOThread) {
|
||||
g_autoptr(virJSONValue) props = NULL;
|
||||
|
||||
if (qemuMonitorCreateObjectProps(&props, "main-loop", "main-loop",
|
||||
"k:thread-pool-min", def->defaultIOThread->thread_pool_min,
|
||||
"k:thread-pool-max", def->defaultIOThread->thread_pool_max,
|
||||
NULL) < 0)
|
||||
return -1;
|
||||
|
||||
if (qemuBuildObjectCommandlineFromJSON(cmd, props, qemuCaps) < 0)
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -22,6 +22,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
|
||||
-object '{"qom-type":"iothread","id":"iothread1"}' \
|
||||
-object '{"qom-type":"iothread","id":"iothread3"}' \
|
||||
-object '{"qom-type":"iothread","id":"iothread5"}' \
|
||||
-object '{"qom-type":"main-loop","id":"main-loop","thread-pool-min":8,"thread-pool-max":16}' \
|
||||
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||
-display none \
|
||||
-no-user-config \
|
||||
|
Loading…
x
Reference in New Issue
Block a user