Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 851959

Summary: cpuset can be set in two places.
Product: Red Hat Enterprise Linux 6 Reporter: yuping zhang <yupzhang>
Component: libvirtAssignee: Martin Kletzander <mkletzan>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.4CC: acathrow, dyasny, dyuan, honzhang, jdenemar, mzhan, rwu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-0.10.0-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 07:22:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description yuping zhang 2012-08-27 06:59:38 UTC
Description of problem:
1.There are two cpuset values in guest XML,<vcpu> and <cputune>.
<vcpu placement='static' cpuset='3'>1</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='2'/>
  </cputune>

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:
always

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

...
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 11:26:47 UTC
It seems like everything is working as expected but the documentation is not very clear...

Comment 2 Martin Kletzander 2012-08-28 12:50:09 UTC
Documentation was fixed, moving to POST based on this commit:

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

    docs: CPU allocation and pinning clarification

Comment 4 hongming 2012-08-30 06:05:46 UTC
Verify it , the results is expected. so move its status to VERIFIED.

http://libvirt.org/formatdomain.html#elementsCPUTuning

vcpu

...snip...

These settings are superseded by CPU tuning. 


vcpupin

...snip...

This setting supersedes previous VCPU placement specified in CPU Allocation using vcpu element.

Comment 5 hongming 2012-08-31 05:47:00 UTC
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 07:53:52 UTC
In libvirt-0.10.2-11.el6 there is some changes for this doc.

vcpu
...snip...    
 (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 07:22:02 UTC
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.

http://rhn.redhat.com/errata/RHSA-2013-0276.html