hw/arm/virt: Support CPU cluster on ARM virt machine
commitd55c316f910edcffbda6159053dfd59c7af02042
authorYanan Wang <wangyanan55@huawei.com>
Fri, 7 Jan 2022 08:32:27 +0000 (7 16:32 +0800)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 20 Jan 2022 11:47:52 +0000 (20 11:47 +0000)
tree312426f5c61b6d0a2e5e8e462d16dbf56fa89cae
parent6d81f4887f66995ca94fce5f896b26339a537bd9
hw/arm/virt: Support CPU cluster on ARM virt machine

ARM64 machines like Kunpeng Family Server Chips have a level
of hardware topology in which a group of CPU cores share L3
cache tag or L2 cache. For example, Kunpeng 920 typically
has 6 or 8 clusters in each NUMA node (also represent range
of CPU die), and each cluster has 4 CPU cores. All clusters
share L3 cache data, but CPU cores in each cluster share a
local L3 tag.

Running a guest kernel with Cluster-Aware Scheduling on the
Hosts which have physical clusters, if we can design a vCPU
topology with cluster level for guest kernel and then have
a dedicated vCPU pinning, the guest will gain scheduling
performance improvement from cache affinity of CPU cluster.

So let's enable the support for this new parameter on ARM
virt machines. After this patch, we can define a 4-level
CPU hierarchy like: cpus=*,maxcpus=*,sockets=*,clusters=*,
cores=*,threads=*.

Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Message-id: 20220107083232.16256-2-wangyanan55@huawei.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/virt.c
qemu-options.hx