[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 08/14] hw/arm/virt: Support clusters on ARM virt machines
From: |
Yanan Wang |
Subject: |
[PATCH v5 08/14] hw/arm/virt: Support clusters on ARM virt machines |
Date: |
Tue, 28 Dec 2021 17:22:15 +0800 |
In implementations of ARM64 architecture, at most there could be
a CPU topology hierarchy like "sockets/dies/clusters/cores/threads"
defined. For example, some ARM64 server chip Kunpeng 920 totally
has 2 sockets, 2 NUMA nodes (also represent CPU dies range) in each
socket, 6 clusters in each NUMA node, 4 CPU cores in each cluster.
Clusters within the same NUMA share the L3 cache data and cores
within the same cluster share a L2 cache and a L3 cache tag.
Given that designing a vCPU topology with cluster level for the
guest can gain scheduling performance improvement, let's support
this new parameter on ARM virt machines.
After this, we can define a 4-level CPU topology hierarchy like:
cpus=*,maxcpus=*,sockets=*,clusters=*,cores=*,threads=*.
Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
---
hw/arm/virt.c | 1 +
qemu-options.hx | 10 ++++++++++
2 files changed, 11 insertions(+)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 6bce595aba..f413e146d9 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -2700,6 +2700,7 @@ static void virt_machine_class_init(ObjectClass *oc, void
*data)
hc->unplug_request = virt_machine_device_unplug_request_cb;
hc->unplug = virt_machine_device_unplug_cb;
mc->nvdimm_supported = true;
+ mc->smp_props.clusters_supported = true;
mc->auto_enable_numa_with_memhp = true;
mc->auto_enable_numa_with_memdev = true;
mc->default_ram_id = "mach-virt.ram";
diff --git a/qemu-options.hx b/qemu-options.hx
index fd1f8135fb..69ef1cdb85 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -277,6 +277,16 @@ SRST
-smp 16,sockets=2,dies=2,cores=2,threads=2,maxcpus=16
+ The following sub-option defines a CPU topology hierarchy (2 sockets
+ totally on the machine, 2 clusters per socket, 2 cores per cluster,
+ 2 threads per core) for ARM virt machines which support sockets/clusters
+ /cores/threads. Some members of the option can be omitted but their values
+ will be automatically computed:
+
+ ::
+
+ -smp 16,sockets=2,clusters=2,cores=2,threads=2,maxcpus=16
+
Historically preference was given to the coarsest topology parameters
when computing missing values (ie sockets preferred over cores, which
were preferred over threads), however, this behaviour is considered
--
2.27.0
- [PATCH v5 02/14] hw/core/machine: Introduce CPU cluster topology support, (continued)
[PATCH v5 06/14] tests/unit/test-smp-parse: Keep default MIN/MAX CPUs in machine_base_class_init, Yanan Wang, 2021/12/28
[PATCH v5 05/14] tests/unit/test-smp-parse: No need to explicitly zero MachineClass members, Yanan Wang, 2021/12/28
[PATCH v5 08/14] hw/arm/virt: Support clusters on ARM virt machines,
Yanan Wang <=
[PATCH v5 07/14] MAINTAINERS: Self-recommended as reviewer of "Machine core", Yanan Wang, 2021/12/28
[PATCH v5 09/14] hw/arm/virt: Support cluster level in DT cpu-map, Yanan Wang, 2021/12/28
[PATCH v5 11/14] hw/arm/virt-acpi-build: Make an ARM specific PPTT generator, Yanan Wang, 2021/12/28
[PATCH v5 12/14] tests/acpi/bios-tables-test: Allow changes to virt/PPTT file, Yanan Wang, 2021/12/28
[PATCH v5 10/14] hw/acpi/aml-build: Improve scalability of PPTT generation, Yanan Wang, 2021/12/28
[PATCH v5 13/14] hw/arm/virt-acpi-build: Support cluster level in PPTT generation, Yanan Wang, 2021/12/28
[PATCH v5 14/14] tests/acpi/bios-table-test: Update expected virt/PPTT file, Yanan Wang, 2021/12/28
Re: [PATCH v5 00/14] ARM virt: Introduce CPU clusters topology support, Philippe Mathieu-Daudé, 2021/12/31