Bug 851959 - cpuset can be set in two places.
cpuset can be set in two places.
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
Unspecified Linux
medium Severity medium
: rc
: ---
Assigned To: Martin Kletzander
Virtualization Bugs
Depends On:
  Show dependency treegraph
Reported: 2012-08-27 02:59 EDT by yuping zhang
Modified: 2013-02-21 02:22 EST (History)
7 users (show)

See Also:
Fixed In Version: libvirt-0.10.0-1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-02-21 02:22:02 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0276 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2013-02-20 16:18:26 EST

  None (edit)
Description yuping zhang 2012-08-27 02:59:38 EDT
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):

How reproducible:

Steps to Reproduce:
For the second problem,steps:
1.#virsh dumpxml <guest>
  <vcpu placement='auto'>2</vcpu>
    <vcpupin vcpu='1' cpuset='1'/>
    <vcpupin vcpu='0' cpuset='0'/>

2.#virsh start <guest>
3.# virsh vcpupin <guest>
VCPU: CPU Affinity
   0: 0
   1: 1
Actual results:
As above

Expected results:
The cpuset should be ignored or documented.

Additional info:
Comment 1 Jiri Denemark 2012-08-27 07:26:47 EDT
It seems like everything is working as expected but the documentation is not very clear...
Comment 2 Martin Kletzander 2012-08-28 08:50:09 EDT
Documentation was fixed, moving to POST based on this commit:

commit 3de747c9a28b0f4b8e7e06e550286de766759441
Author: Martin Kletzander <mkletzan@redhat.com>
Date:   Mon Aug 27 16:26:26 2012 +0200

    docs: CPU allocation and pinning clarification
Comment 4 hongming 2012-08-30 02:05:46 EDT
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.
Comment 5 hongming 2012-08-31 01:47:00 EDT
Also verify it in /usr/share/doc/libvirt-devel-0.10.0/formatdomain.html . The result is expected.
Comment 6 min zhan 2012-12-12 02:53:52 EST
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)
Comment 7 errata-xmlrpc 2013-02-21 02:22:02 EST
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.


Note You need to log in before you can comment on or make changes to this bug.