Red Hat Bugzilla – Bug 851959
cpuset can be set in two places.
Last modified: 2013-02-21 02:22:02 EST
Description of problem:
1.There are two cpuset values in guest XML,<vcpu> and <cputune>.
<vcpu placement='static' cpuset='3'>1</vcpu>
<vcpupin vcpu='0' cpuset='2'/>
The cpuset in <cputune> will overwrite <vcpu> and the two values can be different,the command vcpupin will effect on the cpuset value in <vcputune>. So I think this should be document.
2.From the libvirt.org http://libvirt.org/formatdomain.html#elementsCPUAllocation ,it said:
"the optional attribute placement can be used to indicate the CPU placement mode for domain process, its value can be either "static" or "auto", defaults to placement of numatune, or "static" if cpuset is specified. "auto" indicates the domain process will be pinned to the advisory nodeset from querying numad, and the value of attribute cpuset will be ignored if it's specified."
The value of attribute cpuset will be ignored if the placement is specified to auto. But in my testing,the cpuset still works in <cputune> when set the placement to auto.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
For the second problem,steps:
1.#virsh dumpxml <guest>
<vcpupin vcpu='1' cpuset='1'/>
<vcpupin vcpu='0' cpuset='0'/>
2.#virsh start <guest>
3.# virsh vcpupin <guest>
VCPU: CPU Affinity
The cpuset should be ignored or documented.
It seems like everything is working as expected but the documentation is not very clear...
Documentation was fixed, moving to POST based on this commit:
Author: Martin Kletzander <firstname.lastname@example.org>
Date: Mon Aug 27 16:26:26 2012 +0200
docs: CPU allocation and pinning clarification
Verify it , the results is expected. so move its status to VERIFIED.
These settings are superseded by CPU tuning.
This setting supersedes previous VCPU placement specified in CPU Allocation using vcpu element.
Also verify it in /usr/share/doc/libvirt-devel-0.10.0/formatdomain.html . The result is expected.
In libvirt-0.10.2-11.el6 there is some changes for this doc.
(NB: The pinning policy of domain process and virtual CPUs can be specified separately by cputune. If attribute emulatorpin of cputune is specified, cpuset specified by vcpu here will be ingored; Similarly, For virtual CPUs which has vcpupin specified, cpuset specified by cpuset here will be ignored; For virtual CPUs which doesn't have vcpupin specified, it will be pinned to the physical CPUs specified by cpuset here)
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.