summaryrefslogtreecommitdiffstats
path: root/numa.c
diff options
context:
space:
mode:
authorIgor Mammedov2015-03-19 18:09:22 +0100
committerEduardo Habkost2015-03-19 20:12:09 +0100
commitfb43b73b9225ff2d19cf5350c68112aade7eec13 (patch)
treee2502261cf4e78955484a11eb6aea6e04bbbc2bc /numa.c
parentnuma: introduce machine callback for VCPU to node mapping (diff)
downloadqemu-fb43b73b9225ff2d19cf5350c68112aade7eec13.tar.gz
qemu-fb43b73b9225ff2d19cf5350c68112aade7eec13.tar.xz
qemu-fb43b73b9225ff2d19cf5350c68112aade7eec13.zip
pc: fix default VCPU to NUMA node mapping
Since commit dd0247e0 pc: acpi: mark all possible CPUs as enabled in SRAT Linux kernel actually tries to use CPU to Node mapping from QEMU provided SRAT table instead of discarding it, and that in some cases breaks build_sched_domains() which expects sane mapping where cores/threads belonging to the same socket are on the same NUMA node. With current default round-robin mapping of VCPUs to nodes guest ends-up with cores/threads belonging to the same socket being on different NUMA nodes. For example with following CLI: qemu-system-x86_64 -m 4G \ -cpu Opteron_G3,vendor=AuthenticAMD \ -smp 5,sockets=1,cores=4,threads=1,maxcpus=8 \ -numa node,nodeid=0 -numa node,nodeid=1 2.6.32 based kernels will hang on boot due to incorrectly built sched_group-s list in update_sd_lb_stats() Replacing default mapping with a manual, where VCPUs belonging to the same socket are on the same NUMA node, fixes the issue for guests which can't handle nonsense topology i.e. changing CLI to: -numa node,nodeid=0,cpus=0-3 -numa node,nodeid=1,cpus=4-7 So instead of simply scattering VCPUs around nodes, provide callback to map the same socket VCPUs to the same NUMA node, which is what guests would expect from a sane hardware/BIOS. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'numa.c')
0 files changed, 0 insertions, 0 deletions