mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-03-01 04:58:27 +03:00
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>
This commit is contained in:
parent
58ffe7fa7a
commit
0d84bcfbfa
@ -12,7 +12,7 @@
|
||||
<iothreads>5</iothreads>
|
||||
<iothreadids>
|
||||
<iothread id="1"/>
|
||||
<iothread id="2"/>
|
||||
<iothread id="2" thread_pool_min="8" thread_pool_max="16"/>
|
||||
</iothreadids>
|
||||
<memory>65536</memory>
|
||||
<currentMemory>65536</currentMemory>
|
||||
|
@ -545,7 +545,7 @@ memorytune0.vcpus=0-3,memorytune0.node0.id=0,memorytune0.node0.bandwidth=60
|
||||
--memorybacking size=1,unit='G',nodeset=0,1,nosharepages=yes,locked=yes,discard=yes,allocation.mode=immediate,access_mode=shared,source_type=file,hugepages.page.size=12,hugepages.page1.size=1234,hugepages.page1.unit=MB,hugepages.page1.nodeset=2,allocation.threads=8
|
||||
|
||||
|
||||
--iothreads iothreads=5,iothreadids.iothread1.id=1,iothreadids.iothread2.id=2
|
||||
--iothreads iothreads=5,iothreadids.iothread0.id=1,iothreadids.iothread1.id=2,iothreadids.iothread1.thread_pool_min=8,iothreadids.iothread1.thread_pool_max=16
|
||||
|
||||
|
||||
--metadata title=my-title,description=my-description,uuid=00000000-1111-2222-3333-444444444444,genid=e9392370-2917-565e-692b-d057f46512d6,genid_enable=yes
|
||||
|
@ -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)
|
||||
|
||||
|
||||
###################
|
||||
|
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user