summaryrefslogtreecommitdiff
path: root/virtinst
diff options
context:
space:
mode:
authorLin Ma <lma@suse.com>2022-07-29 19:16:05 +0800
committerCole Robinson <crobinso@redhat.com>2022-08-01 11:32:23 -0400
commit0d84bcfbfa2aa08396e836cb37fd0df167a6f6a4 (patch)
treee79512aed391415c60b894e18c9c9aa98bf9292f /virtinst
parent58ffe7fa7ad2582a41a59d1b919f514505005e6a (diff)
downloadvirt-manager-0d84bcfbfa2aa08396e836cb37fd0df167a6f6a4.tar.gz
cli: Add iothreadids attributes thread_pool_min and thread_pool_max
These two optional attributes allow setting lower and upper boundary for number of worker threads for given IOThread. For example: --iothreads iothreads=2,\ iothreadids.iothread0.id=1,\ iothreadids.iothread1.id=2,\ iothreadids.iothread1.thread_pool_min=8,\ iothreadids.iothread1.thread_pool_max=16 Signed-off-by: Lin Ma <lma@suse.com>
Diffstat (limited to 'virtinst')
-rw-r--r--virtinst/cli.py6
-rw-r--r--virtinst/guest.py4
2 files changed, 8 insertions, 2 deletions
diff --git a/virtinst/cli.py b/virtinst/cli.py
index 3c0252b1..b513c3c3 100644
--- a/virtinst/cli.py
+++ b/virtinst/cli.py
@@ -2614,7 +2614,11 @@ class ParserIOThreads(VirtCLIParser):
# Options for IOThreads config
cls.add_arg("iothreads", "iothreads")
cls.add_arg("iothreadids.iothread[0-9]*.id", "id",
- find_inst_cb=cls.iothreads_find_inst_cb)
+ find_inst_cb=cls.iothreads_find_inst_cb)
+ cls.add_arg("iothreadids.iothread[0-9]*.thread_pool_min",
+ "thread_pool_min", find_inst_cb=cls.iothreads_find_inst_cb)
+ cls.add_arg("iothreadids.iothread[0-9]*.thread_pool_max",
+ "thread_pool_max", find_inst_cb=cls.iothreads_find_inst_cb)
###################
diff --git a/virtinst/guest.py b/virtinst/guest.py
index 5092e916..4323394b 100644
--- a/virtinst/guest.py
+++ b/virtinst/guest.py
@@ -67,9 +67,11 @@ class _DomainDevices(XMLBuilder):
class _IOThreadID(XMLBuilder):
XML_NAME = "iothread"
- _XML_PROP_ORDER = ["id"]
+ _XML_PROP_ORDER = ["id", "thread_pool_min", "thread_pool_max"]
id = XMLProperty("./@id", is_int=True)
+ thread_pool_min = XMLProperty("./@thread_pool_min", is_int=True)
+ thread_pool_max = XMLProperty("./@thread_pool_max", is_int=True)
class Guest(XMLBuilder):