Red Hat Bugzilla – Bug 828729
CPU topology parsing bug on special NUMA platform
Last modified: 2013-02-21 02:16:29 EST
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:
The problem is already resolved by upstream commit 10d9038b7, but it should be included in z-stream for 6.3.
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.
(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.
# 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.
# 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
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