aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOsier Yang <jyang@redhat.com>2012-05-14 21:12:53 +0800
committerOsier Yang <jyang@redhat.com>2012-05-15 10:19:49 +0800
commit10d9038b744a69c8d4bd29c2e8c012a097481586 (patch)
tree8f58054a1bea7130c0d49f50c0720b9866a903fe /tests/nodeinfodata
parentqemu: Set memory policy using cgroup if placement is auto (diff)
downloadlibvirt-10d9038b744a69c8d4bd29c2e8c012a097481586.tar.gz
libvirt-10d9038b744a69c8d4bd29c2e8c012a097481586.tar.bz2
libvirt-10d9038b744a69c8d4bd29c2e8c012a097481586.zip
nodeinfo: Get the correct CPU number on AMD Magny Cours platform
"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 This patch is to fix the problem by parsing /proc/cpuinfo to get the value of field "cpu cores", and use it as nodeinfo->cores if it's greater than the cores number from sysfs.
Diffstat (limited to 'tests/nodeinfodata')
-rw-r--r--tests/nodeinfodata/linux-nodeinfo-sysfs-test-3-cpu-x86-output.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-3-cpu-x86-output.txt b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-3-cpu-x86-output.txt
index e3c046b1e..7db386451 100644
--- a/tests/nodeinfodata/linux-nodeinfo-sysfs-test-3-cpu-x86-output.txt
+++ b/tests/nodeinfodata/linux-nodeinfo-sysfs-test-3-cpu-x86-output.txt
@@ -1 +1 @@
-CPUs: 48, MHz: 2100, Nodes: 1, Cores: 6
+CPUs: 48, MHz: 2100, Nodes: 1, Cores: 12