All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH v3 0/9] hw/arm/virt: Introduce cpu topology support
@ 2021-05-16 10:28 Yanan Wang
  2021-05-16 10:28 ` [RFC PATCH v3 1/9] hw/arm/virt: Disable cpu topology support on older machine types Yanan Wang
                   ` (8 more replies)
  0 siblings, 9 replies; 45+ messages in thread
From: Yanan Wang @ 2021-05-16 10:28 UTC (permalink / raw)
  To: Peter Maydell, Andrew Jones, Michael S . Tsirkin, Igor Mammedov,
	Shannon Zhao, Alistair Francis, David Gibson, qemu-devel,
	qemu-arm
  Cc: Barry Song, zhukeqian1, yangyicong, prime.zeng, wanghaibin.wang,
	yuzenghui, Paolo Bonzini, Philippe Mathieu-Daudé

Hi,

This is v3 of the series [1] that I posted to introduce support of
generating cpu topology descriptions to guest.

Description:
An accurate cpu topology may help improve the cpu scheduler's decision
making when dealing with multi-core system. So cpu topology description
is helpful to provide guest with the right view. Dario Faggioli's talk
in [2] also shows the virtual topology could have impact on scheduling
performace. Thus this patch series introduces cpu topology support for
ARM platform.

In this series, both cpu-map in DT and ACPI PPTT table are introduced
to present cpu topology to the guest. And a new helper virt_smp_parse
not like the default one is introduced, which has more strict parsing
rules for the -smp command line.

[1] https://patchwork.kernel.org/project/qemu-devel/cover/20210413080745.33004-1-wangyanan55@huawei.com/
[2] https://kvmforum2020.sched.com/event/eE1y/virtual-topology-for-virtual-machines-friend-or-foe-dario-faggioli-suse

Test results about exposure of topology:
After applying this patch series, launch a guest with virt-6.1.

Cmdline: -smp 96, sockets=2, cores=48, threads=1
Output:
linux-atxcNc:~ # lscpu
Architecture:        aarch64
Byte Order:          Little Endian
CPU(s):              96
On-line CPU(s) list: 0-95
Thread(s) per core:  1
Core(s) per socket:  48
Socket(s):           2
NUMA node(s):        1
Vendor ID:           0x48

Cmdline: -smp 96
linux-atxcNc:~ # lscpu
Architecture:        aarch64
Byte Order:          Little Endian
CPU(s):              96
On-line CPU(s) list: 0-95
Thread(s) per core:  1
Core(s) per socket:  96
Socket(s):           1
NUMA node(s):        1
Vendor ID:           0x48

THINGS TO DO SOON:
1) Run some benchmark to test the scheduling improvement of guest kernel
   introduced by virtual cpu topology.
2) Add some QEMU tests about ARM vcpu topology, ACPI PPTT table, and DT
   cpu nodes. Will post in a separate patchset later.

---

Changelogs:
v2->v3:
- address comments from David, Philippe, and Andrew. Thanks!
- split some change into separate commits for ease of review
- adjust parsing rules of virt_smp_parse to be more strict
  (after discussion with Andrew)
- adjust author credit for the patches
- v2: https://patchwork.kernel.org/project/qemu-devel/cover/20210413080745.33004-1-wangyanan55@huawei.com/

v1->v2:
- Address Andrew Jones's comments
- Address Michael S. Tsirkin's comments
- https://patchwork.kernel.org/project/qemu-devel/cover/20210225085627.2263-1-fangying1@huawei.com/

---

Andrew Jones (3):
  device_tree: Add qemu_fdt_add_path
  hw/arm/virt: Add cpu-map to device tree
  hw/arm/virt-acpi-build: Generate PPTT table

Yanan Wang (6):
  hw/arm/virt: Disable cpu topology support on older machine types
  hw/arm/virt: Initialize the present cpu members
  hw/arm/virt-acpi-build: Use possible cpus in generation of DSDT
  hw/arm/virt-acpi-build: Use possible cpus in generation of MADT
  hw/acpi/aml-build: Add Processor hierarchy node structure
  hw/arm/virt: Add separate -smp parsing function for ARM machines

 hw/acpi/aml-build.c          |  26 ++++++
 hw/arm/virt-acpi-build.c     |  99 ++++++++++++++++++++---
 hw/arm/virt.c                | 148 ++++++++++++++++++++++++++++++++++-
 include/hw/acpi/aml-build.h  |   4 +
 include/hw/arm/virt.h        |   2 +
 include/sysemu/device_tree.h |   1 +
 qemu-options.hx              |   4 +
 softmmu/device_tree.c        |  44 ++++++++++-
 8 files changed, 316 insertions(+), 12 deletions(-)

-- 
2.19.1



^ permalink raw reply	[flat|nested] 45+ messages in thread

end of thread, other threads:[~2021-05-18 19:10 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-16 10:28 [RFC PATCH v3 0/9] hw/arm/virt: Introduce cpu topology support Yanan Wang
2021-05-16 10:28 ` [RFC PATCH v3 1/9] hw/arm/virt: Disable cpu topology support on older machine types Yanan Wang
2021-05-16 10:28 ` [RFC PATCH v3 2/9] device_tree: Add qemu_fdt_add_path Yanan Wang
2021-05-17  3:11   ` David Gibson
2021-05-17 13:18     ` wangyanan (Y)
2021-05-17  6:27   ` Andrew Jones
2021-05-17 13:21     ` wangyanan (Y)
2021-05-16 10:28 ` [RFC PATCH v3 3/9] hw/arm/virt: Add cpu-map to device tree Yanan Wang
2021-05-17  6:41   ` Andrew Jones
2021-05-17 15:00     ` wangyanan (Y)
2021-05-18  7:46       ` Andrew Jones
2021-05-18 10:50         ` wangyanan (Y)
2021-05-16 10:28 ` [RFC PATCH v3 4/9] hw/arm/virt: Initialize the present cpu members Yanan Wang
2021-05-17  6:43   ` Andrew Jones
2021-05-17 20:48   ` Salil Mehta
2021-05-18  4:42     ` wangyanan (Y)
2021-05-18  7:04       ` Salil Mehta
2021-05-18  7:04         ` Salil Mehta
2021-05-18  7:50         ` Andrew Jones
2021-05-18  7:50           ` Andrew Jones
2021-05-18 18:50           ` Salil Mehta
2021-05-18 18:50             ` Salil Mehta
2021-05-16 10:28 ` [RFC PATCH v3 5/9] hw/arm/virt-acpi-build: Use possible cpus in generation of DSDT Yanan Wang
2021-05-16 10:28 ` [RFC PATCH v3 6/9] hw/arm/virt-acpi-build: Use possible cpus in generation of MADT Yanan Wang
2021-05-17  7:42   ` Andrew Jones
2021-05-17 16:27     ` wangyanan (Y)
2021-05-18  8:15       ` Andrew Jones
2021-05-18 11:47         ` wangyanan (Y)
2021-05-18 13:40           ` Andrew Jones
2021-05-17 17:07   ` Salil Mehta
2021-05-18  5:02     ` wangyanan (Y)
2021-05-18  6:47       ` Salil Mehta
2021-05-18  6:47         ` Salil Mehta
2021-05-18 11:58         ` wangyanan (Y)
2021-05-18 11:58           ` wangyanan (Y)
2021-05-16 10:28 ` [RFC PATCH v3 7/9] hw/acpi/aml-build: Add Processor hierarchy node structure Yanan Wang
2021-05-17  7:47   ` Andrew Jones
2021-05-16 10:28 ` [RFC PATCH v3 8/9] hw/arm/virt-acpi-build: Generate PPTT table Yanan Wang
2021-05-17  8:02   ` Andrew Jones
2021-05-17 13:43     ` wangyanan (Y)
2021-05-17 14:45       ` Andrew Jones
2021-05-17 16:02         ` wangyanan (Y)
2021-05-16 10:29 ` [RFC PATCH v3 9/9] hw/arm/virt: Add separate -smp parsing function for ARM machines Yanan Wang
2021-05-17  8:24   ` Andrew Jones
2021-05-18  2:16     ` wangyanan (Y)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.