qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v2 0/6] hw/arm/virt: Introduce cpu topology support
@ 2021-04-13  8:07 Yanan Wang
  2021-04-13  8:07 ` [RFC PATCH v2 1/6] device_tree: Add qemu_fdt_add_path Yanan Wang
                   ` (7 more replies)
  0 siblings, 8 replies; 48+ messages in thread
From: Yanan Wang @ 2021-04-13  8:07 UTC (permalink / raw)
  To: qemu-devel, qemu-arm
  Cc: Peter Maydell, Andrew Jones, Michael S . Tsirkin,
	wanghaibin.wang, Yanan Wang, Shannon Zhao, Alistair Francis,
	prime.zeng, yangyicong, yuzenghui, Igor Mammedov, zhukeqian1,
	Jiajie Li, David Gibson

Hi,

This series is a new version of [0] recently posted by Ying Fang
to introduce cpu topology support for ARM platform. I have taken
over his work about this now, thanks for his contribution.

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 [1] also shows the virtual topology could have impact on scheduling
performace. Thus this patch series introduces cpu topology support for
ARM platform.

This series originally comes from Andrew Jones's patches [2], but with
some re-arrangement. Thanks for Andrew's contribution. In this series,
both fdt and ACPI PPTT table are introduced to present cpu topology to
the guest. And a new function virt_smp_parse() not like the default
smp_parse() is introduced, which prefers cores over sockets.

[0] https://patchwork.kernel.org/project/qemu-devel/cover/20210225085627.2263-1-fangying1@huawei.com/
[1] https://kvmforum2020.sched.com/event/eE1y/virtual-topology-for-virtual-machines-friend-or-foe-dario-faggioli-suse
[2] https://github.com/rhdrjones/qemu/commit/ecfc1565f22187d2c715a99bbcd35cf3a7e428fa

Test results:
After applying this patch series, launch a guest with virt-6.0 and cpu
topology configured with: -smp 96,sockets=2,clusters=6,cores=4,threads=2,
VM's cpu topology description shows as below.

Architecture:        aarch64
Byte Order:          Little Endian
CPU(s):              96
On-line CPU(s) list: 0-95
Thread(s) per core:  2
Core(s) per socket:  24
Socket(s):           2
NUMA node(s):        1
Vendor ID:           0x48
Model:               0
Stepping:            0x1
BogoMIPS:            200.00
NUMA node0 CPU(s):   0-95

---

Changelogs:
v1->v2:
- Address Andrew Jones's comments
- Address Michael S. Tsirkin's comments
- Pick up one more patch(patch#6) of Andrew Jones
- Rebased on v6.0.0-rc2 release

---

Andrew Jones (3):
  device_tree: Add qemu_fdt_add_path
  hw/arm/virt: DT: Add cpu-map
  hw/arm/virt: Replace smp_parse with one that prefers cores

Yanan Wang (2):
  hw/acpi/aml-build: Add processor hierarchy node structure
  hw/arm/virt-acpi-build: Add PPTT table

Ying Fang (1):
  hw/arm/virt-acpi-build: Distinguish possible and present cpus

 hw/acpi/aml-build.c          |  27 ++++++++
 hw/arm/virt-acpi-build.c     |  77 ++++++++++++++++++++--
 hw/arm/virt.c                | 120 ++++++++++++++++++++++++++++++++++-
 include/hw/acpi/aml-build.h  |   4 ++
 include/hw/arm/virt.h        |   1 +
 include/sysemu/device_tree.h |   1 +
 softmmu/device_tree.c        |  45 ++++++++++++-
 7 files changed, 268 insertions(+), 7 deletions(-)

-- 
2.19.1



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

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

Thread overview: 48+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-13  8:07 [RFC PATCH v2 0/6] hw/arm/virt: Introduce cpu topology support Yanan Wang
2021-04-13  8:07 ` [RFC PATCH v2 1/6] device_tree: Add qemu_fdt_add_path Yanan Wang
2021-04-16  4:52   ` David Gibson
2021-04-17  2:36     ` wangyanan (Y)
2021-04-19  1:13       ` David Gibson
2021-04-19  7:02         ` wangyanan (Y)
2021-04-13  8:07 ` [RFC PATCH v2 2/6] hw/arm/virt: DT: Add cpu-map Yanan Wang
2021-04-27  9:47   ` Philippe Mathieu-Daudé
2021-04-27 10:04     ` Andrew Jones
2021-04-27 12:36       ` Philippe Mathieu-Daudé
2021-04-28  6:36         ` wangyanan (Y)
2021-05-13  6:58   ` Andrew Jones
2021-05-13  7:15     ` wangyanan (Y)
2021-04-13  8:07 ` [RFC PATCH v2 3/6] hw/arm/virt-acpi-build: Distinguish possible and present cpus Yanan Wang
2021-04-27 13:18   ` Andrew Jones
2021-04-28  6:42     ` wangyanan (Y)
2021-04-27 14:50   ` Andrew Jones
2021-04-28  6:47     ` wangyanan (Y)
2021-04-13  8:07 ` [RFC PATCH v2 4/6] hw/acpi/aml-build: Add processor hierarchy node structure Yanan Wang
2021-04-27 13:37   ` Andrew Jones
2021-04-28  6:59     ` wangyanan (Y)
2021-04-13  8:07 ` [RFC PATCH v2 5/6] hw/arm/virt-acpi-build: Add PPTT table Yanan Wang
2021-04-27 14:16   ` Andrew Jones
2021-04-28  7:30     ` wangyanan (Y)
2021-05-13  5:10   ` wangyanan (Y)
2021-05-13  6:55     ` Andrew Jones
2021-05-18  7:17     ` Salil Mehta
2021-05-18  7:42       ` Andrew Jones
2021-05-18 18:34         ` Salil Mehta
2021-05-18 19:05           ` Andrew Jones
2021-05-18 19:22             ` Salil Mehta
2021-05-19  3:18               ` wangyanan (Y)
2021-05-19  7:54                 ` Salil Mehta
2021-05-19  8:15                   ` Andrew Jones
2021-05-19  8:42                     ` wangyanan (Y)
2021-05-19 10:00                     ` Salil Mehta
2021-05-19  8:27             ` Andrew Jones
2021-05-19 13:26               ` wangyanan (Y)
2021-05-19 13:40                 ` wangyanan (Y)
2021-05-18  9:16       ` wangyanan (Y)
2021-04-13  8:07 ` [RFC PATCH v2 6/6] hw/arm/virt: Replace smp_parse with one that prefers cores Yanan Wang
2021-04-27 14:58   ` Andrew Jones
2021-04-28  8:04     ` wangyanan (Y)
2021-04-28  9:36     ` wangyanan (Y)
2021-04-28 10:13       ` Andrew Jones
2021-04-29  2:21         ` wangyanan (Y)
2021-04-21  7:40 ` [RFC PATCH v2 0/6] hw/arm/virt: Introduce cpu topology support wangyanan (Y)
2021-04-21  9:31 ` wangyanan (Y)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).