diff options
author | John Ferlan <jferlan@redhat.com> | 2015-02-18 20:27:07 -0500 |
---|---|---|
committer | John Ferlan <jferlan@redhat.com> | 2015-03-11 15:03:31 -0400 |
commit | b5c3aa95f3f97d5e71a1b5cdcbd337bebed08b88 (patch) | |
tree | d449a904f9deb1c21ca0f21954b1d1cfc20bb0f7 /libvirt-override-api.xml | |
parent | d9b519c21a6ea02c78813a4d6c98d4f42571a71b (diff) | |
download | libvirt-python-b5c3aa95f3f97d5e71a1b5cdcbd337bebed08b88.tar.gz |
Support virDomainPinIOThread
Support the libvirt_virDomainSetIOThreads method using code that mimics
the existing libvirt_virDomainPinVcpuFlags method
The following is a sample session assuming guest 'iothr-gst' has IOThreads
configured (it's currently running, too)
>>> import libvirt
>>> con=libvirt.open("qemu:///system")
>>> dom=con.lookupByName('iothr-gst')
>>> dom.ioThreadsInfo()
[(1, [False, False, True, False]), (2, [False, False, False, True]), (3, [True, True, True, True])]
>>> cpumap=(True,True,True,False)
>>> dom.pinIOThread(3,cpumap)
0
>>> print dom.ioThreadsInfo()
[(1, [False, False, True, False]), (2, [False, False, False, True]), (3, [True, True, True, False])]
>>>
merge
Diffstat (limited to 'libvirt-override-api.xml')
-rw-r--r-- | libvirt-override-api.xml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libvirt-override-api.xml b/libvirt-override-api.xml index bb61a46..4660c9f 100644 --- a/libvirt-override-api.xml +++ b/libvirt-override-api.xml @@ -284,6 +284,14 @@ <arg name='flags' type='int' info='an OR'ed set of virDomainModificationImpact'/> <return type='char *' info="list of IOThreads information including the iothread_id, the cpumap, and the cpumap length for each iothread_id."/> </function> + <function name='virDomainPinIOThread' file='python'> + <info>Dynamically change the real CPUs which can be allocated to an IOThread. This function requires privileged access to the hypervisor.</info> + <return type='int' info='0 in case of success, -1 in case of failure.'/> + <arg name='domain' type='virDomainPtr' info='pointer to domain object'/> + <arg name='iothread_val' type='unsigned int' info='iothread_id number'/> + <arg name='cpumap' type='unsigned char *' info='pointer to a bit map of real CPUs (in 8-bit bytes) (IN) Each bit set to 1 means that corresponding CPU is usable. Bytes are stored in little-endian order: CPU0-7, 8-15... In each byte, lowest CPU number is least significant bit.'/> + <arg name='flags' type='int' info='an OR'ed set of virDomainModificationImpact'/> + </function> <function name='virDomainSetSchedulerParameters' file='python'> <info>Change the scheduler parameters</info> <return type='int' info='-1 in case of error, 0 in case of success.'/> |