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 828729 - CPU topology parsing bug on special NUMA platform
Summary: CPU topology parsing bug on special NUMA platform
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.4
Hardware: All
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Osier Yang
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 836919
TreeView+ depends on / blocked
 
Reported: 2012-06-05 09:26 UTC by Osier Yang
Modified: 2013-02-21 07:16 UTC (History)
8 users (show)

Fixed In Version: libvirt-0.9.13-2.el6
Doc Type: Bug Fix
Doc Text:
Cause: Libvirt has problem of parsing the CPU topology on special platform (E.g. AMD Magny Cours). Consequence: The wrong CPU topology parsing could cause various problems: 1) Performance lost Domain process and domain vCPU threads can only be pinned to part of the physical CPUs. 2) Domain might be not able to start If a domain uses vcpu "auto" placement, and the advisory nodeset returned from numad contains node which exceeds the range of wrong total CPU number. The domain will fail to start. 3) Wrong CPU number affects lots of stuffs. E.g. For command "virsh vcpuinfo", "virsh vcpupin", etc. It will always output with the truncated CPU list. Fix: Parse the "cpu cores" in /proc/cpuinfo to get the correct CPU number. Result: All stuffs related with the CPU topology work again on the special platform.
Clone Of:
Environment:
Last Closed: 2013-02-21 07:16:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0276 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2013-02-20 21:18:26 UTC

Description Osier Yang 2012-06-05 09:26:32 UTC
Description of problem:

On some special NUMA platform, the CPU topology is orgnized in an unusual
way, and we don't consider it in when parsing it in libvirt, such as for
AMD Magny Cours, 

  "Instead of developing one CPU with 12 cores, the Magny Cours is
actually two 6 core “Bulldozer” CPUs combined in to one package"
    
I.e, each package has two NUMA nodes, and the two numa nodes share
the same core ID set (0-6), which means parsing the cores number
from sysfs doesn't work in this case.
    
And the wrong CPU number could cause three problems for libvirt:
    
  1) performance lost
    
    A domain without "cpuset" or "placement='auto'" (to drive numad)
  specified will be only pinned to part of the CPUs.
    
  2) domain can be started
    
    If a domain uses numad, and the advisory nodeset returned from
  numad contains node which exceeds the range of wrong total CPU
  number. The domain will fail to start, as the bitmask passed to
  sched_setaffinity could be fully filled with zero.
    
  3) wrong CPU number affects lots of stuffs.
    
    E.g. for command "virsh vcpuinfo", "virsh vcpupin", it will always
  output with the truncated CPU list.

  For more details:
    
  https://www.redhat.com/archives/libvir-list/2012-May/msg00607.html

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Osier Yang 2012-06-05 09:30:30 UTC
The problem is already resolved by upstream commit 10d9038b7, but it should be included in z-stream for 6.3.

Comment 4 Wayne Sun 2012-06-27 06:14:37 UTC
pkgs:
# rpm -q libvirt
libvirt-0.9.10-21.el6.x86_64

# cat /proc/cpuinfo |grep "model name"|tail -1
model name	: AMD Opteron(tm) Processor 6172

steps:
# virsh nodeinfo
Please enter your authentication name: vdsm@rhevh
Please enter your password: 
CPU model:           x86_64
CPU(s):              48
CPU frequency:       2100 MHz
CPU socket(s):       4
Core(s) per socket:  6
Thread(s) per core:  1
NUMA cell(s):        1
Memory size:         529297552 kB

# cat /proc/cpuinfo |grep processor |wc -l
48

# cat /proc/cpuinfo |grep "cpu cores"|tail -1
cpu cores	: 12

The cpu cores from cpuinfo is 12, the nodeifo output is 6.

Comment 5 Osier Yang 2012-06-27 14:17:15 UTC
(In reply to comment #4)
> pkgs:
> # rpm -q libvirt
> libvirt-0.9.10-21.el6.x86_64
> 
> # cat /proc/cpuinfo |grep "model name"|tail -1
> model name	: AMD Opteron(tm) Processor 6172
> 
> steps:
> # virsh nodeinfo
> Please enter your authentication name: vdsm@rhevh
> Please enter your password: 
> CPU model:           x86_64
> CPU(s):              48
> CPU frequency:       2100 MHz
> CPU socket(s):       4
> Core(s) per socket:  6
> Thread(s) per core:  1
> NUMA cell(s):        1
> Memory size:         529297552 kB
> 
> # cat /proc/cpuinfo |grep processor |wc -l
> 48
> 
> # cat /proc/cpuinfo |grep "cpu cores"|tail -1
> cpu cores	: 12
> 
> The cpu cores from cpuinfo is 12, the nodeifo output is 6.

The fix is not in 6.3 yet. Will come with the 6.3.z soon, perhaps next week.

Comment 8 Wayne Sun 2012-07-05 04:39:31 UTC
# rpm -q libvirt
libvirt-0.9.13-2.el6.x86_64

# cat /proc/cpuinfo |grep "model name"|tail -1
model name	: AMD Opteron(tm) Processor 6172

steps:
# virsh nodeinfo
CPU model:           x86_64
CPU(s):              48
CPU frequency:       2100 MHz
CPU socket(s):       4
Core(s) per socket:  12
Thread(s) per core:  1
NUMA cell(s):        1
Memory size:         529263760 KiB

# cat /proc/cpuinfo |grep processor |wc -l
48

# cat /proc/cpuinfo |grep "cpu cores"|tail -1
cpu cores	: 12

The cpu cores from cpuinfo is 12, the nodeifo output is also 12.

Comment 9 zhenfeng wang 2012-08-31 07:20:22 UTC
# rpm -q libvirt
libvirt-0.10.0-1.el6.x86_64

# cat /proc/cpuinfo |grep "model name"|tail -1
model name	: AMD Opteron(tm) Processor 6172

# virsh nodeinfo
CPU model:           x86_64
CPU(s):              48
CPU frequency:       2100 MHz
CPU socket(s):       1
Core(s) per socket:  6
Thread(s) per core:  1
NUMA cell(s):        8
Memory size:         529263712 KiB

# cat /proc/cpuinfo |grep processor |wc -l
48

# cat /proc/cpuinfo |grep "cpu cores"|tail -1
cpu cores	: 12

The cpu cores from cpuinfo is 12, the nodeifo output is 6 ,the NUMA cells is 8

Comment 10 errata-xmlrpc 2013-02-21 07:16:29 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


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