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 725269 - generated qemu -smp string is ambiguous, gives unexpected results
Summary: generated qemu -smp string is ambiguous, gives unexpected results
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Martin Kletzander
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 725271 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-24 22:37 UTC by Cole Robinson
Modified: 2012-06-20 06:29 UTC (History)
6 users (show)

Fixed In Version: libvirt-0.9.10-1.el6
Doc Type: Bug Fix
Doc Text:
No Documentation needed
Clone Of:
Environment:
Last Closed: 2012-06-20 06:29:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0748 0 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2012-06-19 19:31:38 UTC

Description Cole Robinson 2011-07-24 22:37:14 UTC
qemu -smp 1,sockets=1,cores=2,threads=1 doesn't give the expected 2 logical cpu, dual core socket result. see https://bugzilla.redhat.com/show_bug.cgi?id=725268 for more info.

libvirt tickles this qemu weirdness by _always_ specifying the oldstyle
-smp X value, even if topology is specified. What libvirt should be doing here
is specifying _only_ topology info, provided qemu is new enough, otherwise use
the oldstyle option, so it doesn't need to depend on how qemu interprets back
compat options.

Some background: https://bugzilla.redhat.com/show_bug.cgi?id=708892#c2

Comment 3 Dave Allan 2011-11-23 20:25:26 UTC
*** Bug 725271 has been marked as a duplicate of this bug. ***

Comment 4 Martin Kletzander 2012-01-13 13:23:46 UTC
According to the documentation, the number is not ambiguous. It specifies the current number of connected (enabled) vcpus, whether not specifying the number gives the maximum amount. QEmu's weirdness is, however, that specifying more than the maximum amount connectable to the specified topology doesn't generate any error nor warning.

commit 5a89aaa9385248eceefcc982d73f063ba8232d9f
Author: Martin Kletzander <mkletzan>
Date:   Thu Jan 12 10:45:35 2012 +0100

    Added check for maximum number of vcpus exceeding topology limit
    
    Earlier, when the number of vcpus was greater than the topology allowed,
    libvirt didn't raise an error and continued, resulting in running qemu
    with parameters making no sense. Even though qemu did not report any
    error itself, the number of vcpus was set to maximum allowed by the
    topology.

Comment 8 Min Zhan 2012-02-15 06:55:36 UTC
Reproduce this bug with libvirt-0.9.9-2.el6

# virsh edit guest
...
  <vcpus>9</vcpus>
  <cpu>
    <topology sockets='2' cores='2' threads='2'/>
  </cpu>
...
# ps -ef |grep kvm
qemu     16700     1 29 05:34 ?        00:00:33 /usr/libexec/qemu-kvm -S -M rhel6.2.0 -enable-kvm -m 1024 -smp 9,sockets=2,cores=2,threads=2 -name rhel62 ......




Verified this bug with libvirt-0.9.10-1.el6
Steps:
1. virsh edit guest
...
  <vcpus>3</vcpus>
  <cpu>
    <topology sockets='2' cores='2' threads='2'/>
  </cpu>
...
# ps -ef|grep kvm
qemu     18014     1 10 05:47 ?        00:00:00 /usr/libexec/qemu-kvm -S -M rhel6.2.0 -enable-kvm -m 1024 -smp 3,sockets=2,cores=2,threads=2 -name rhel62
...

In which 3 < 2*2*2, guest can run successfully.

2. vcpu exceed the max allowed by topology, such as
# virsh edit guest
...
  <vcpus>9</vcpus>
  <cpu>
    <topology sockets='2' cores='2' threads='2'/>
  </cpu>

In which 9 > 2*2*2, when want to save the changes for the guest and quit, an error display for this cmd:

# virsh edit rhel62
error: Maximum CPUs greater than topology limit

Comment 9 Martin Kletzander 2012-05-03 13:12:56 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No Documentation needed

Comment 11 errata-xmlrpc 2012-06-20 06:29:24 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-2012-0748.html


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