All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yanan Wang <wangyanan55@huawei.com>
To: <qemu-devel@nongnu.org>, <qemu-arm@nongnu.org>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Andrew Jones <drjones@redhat.com>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	wanghaibin.wang@huawei.com, Yanan Wang <wangyanan55@huawei.com>,
	Shannon Zhao <shannon.zhaosl@gmail.com>,
	Alistair Francis <alistair.francis@wdc.com>,
	prime.zeng@hisilicon.com, yangyicong@huawei.com,
	yuzenghui@huawei.com, Igor Mammedov <imammedo@redhat.com>,
	zhukeqian1@huawei.com, Jiajie Li <lijiajie11@huawei.com>,
	David Gibson <david@gibson.dropbear.id.au>
Subject: [RFC PATCH v2 0/6] hw/arm/virt: Introduce cpu topology support
Date: Tue, 13 Apr 2021 16:07:39 +0800	[thread overview]
Message-ID: <20210413080745.33004-1-wangyanan55@huawei.com> (raw)

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



             reply	other threads:[~2021-04-13  8:09 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-13  8:07 Yanan Wang [this message]
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)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210413080745.33004-1-wangyanan55@huawei.com \
    --to=wangyanan55@huawei.com \
    --cc=alistair.francis@wdc.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=drjones@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=lijiajie11@huawei.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=prime.zeng@hisilicon.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=shannon.zhaosl@gmail.com \
    --cc=wanghaibin.wang@huawei.com \
    --cc=yangyicong@huawei.com \
    --cc=yuzenghui@huawei.com \
    --cc=zhukeqian1@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.