ARM virt: Support CPU cluster topology
Status from this message: Applied to target-arm.next, thanks.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v7 Latest2 of 6 patches 1 replyApplied
- v42 of 10 patches 0 repliesSuperseded
Changes in v7 from the cover letter
- dropped the introduced ARM specific build_pptt() and extend the generic one
- added A-bs/R-bs from Andrew and Ani, thanks.
- v6: https://patchew.org/QEMU/[email protected]/
2 of 6 patches are in this archive. The cover letter announces 6.
Patches in v7 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 2/6 | hw/arm/virt: Support cluster level in DT cpu-maphw/ | +8 | 0 replies | |
| 5/6 | hw/acpi/aml-build: Support cluster level in PPTT generationhw/ | +18 | 0 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Andrew Jones | Ani Sinha |
|---|---|---|
| Series | R-b R-b | A-b R-b |
| 2/6 | R-b | |
| 5/6 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v7 0/6] ARM virt: Support CPU cluster topology
This v7 series enables the support for CPU cluster topology on ARM virt machines. The generic infrastructure for CPU cluster parameter has been in upstream.
Background and descriptions:
The new Cluster-Aware Scheduling support has landed in Linux 5.16, which has been proved to benefit the scheduling performance (e.g. load balance and wake_affine strategy) for both x86_64 and AArch64. We can see the PR [1] or the actual patch series [2] for reference.
So since Linux 5.16 we have four-level arch-neutral CPU topology definition like below and a new scheduler level for clusters.
struct cpu_topology {
int thread_id;
int core_id;
int cluster_id;
int package_id;
int llc_id;
cpumask_t thread_sibling;
cpumask_t core_sibling;
cpumask_t cluster_sibling;
cpumask_t llc_sibling;
}A cluster generally means a group of CPU cores which share L2 cache or other mid-level resources, and it is the shared resources that is used to improve scheduler's behavior. From the point of view of the size range, it's between CPU die and CPU core. For example, on some ARM64 Kunpeng servers, we have 6 clusters in each NUMA node, and 4 CPU cores in each cluster. The 4 CPU cores share a separate L2 cache and a L3 cache tag, which brings cache affinity advantage.
[1] https://lore.kernel.org/lkml/163572864855.3357115.17938524897008353101.tglx@xen13/
[2] https://lkml.org/lkml/2021/9/24/178
In virtualization, on the Hosts which have physical clusters, if we can design a vCPU topology with cluster level for guest kernel and have a dedicated vCPU pinning. A Cluster-Aware Guest kernel can also make use of the cache affinity of CPU clusters to gain similar scheduling performance. This series only enables clusters support in the vCPU topology on ARM virt machines. We can also enable it for other machine types in the future if needed.
The patches in this series do:
- Enable CPU cluster support on ARM virt machines, so that users can specify a 4-level CPU hierarchy sockets/clusters/cores/threads. And the 4-level topology will be described to guest kernel through ACPI PPTT and DT cpu-map.
Changelog:v6->v7:
- dropped the introduced ARM specific build_pptt() and extend the generic one
- added A-bs/R-bs from Andrew and Ani, thanks.
- v6: https://patchew.org/QEMU/[email protected]/
v5->v6:
- dropped the generic part which is in upstream now
- rebased on latest master
- v5: https://patchew.org/QEMU/[email protected]/
Yanan Wang (6):
hw/arm/virt: Support CPU cluster on ARM virt machine hw/arm/virt: Support cluster level in DT cpu-map hw/acpi/aml-build: Improve scalability of PPTT generation tests/acpi/bios-tables-test: Allow changes to virt/PPTT file hw/acpi/aml-build: Support cluster level in PPTT generation tests/acpi/bios-table-test: Update expected virt/PPTT file
hw/acpi/aml-build.c | 68 ++++++++++++++++++++++++++++---------- hw/arm/virt.c | 16 +++++---- qemu-options.hx | 10 ++++++ tests/data/acpi/virt/PPTT | Bin 76 -> 96 bytes 4 files changed, 69 insertions(+), 25 deletions(-)
Signature · 1 line
2.27.0