qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Jones <drjones@redhat.com>
To: Yanan Wang <wangyanan55@huawei.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	qemu-devel@nongnu.org, Shannon Zhao <shannon.zhaosl@gmail.com>,
	qemu-arm@nongnu.org, Eric Auger <eauger@redhat.com>,
	wanghaibin.wang@huawei.com, Ani Sinha <ani@anisinha.ca>,
	Igor Mammedov <imammedo@redhat.com>
Subject: Re: [PATCH v6 1/7] hw/arm/virt: Support CPU cluster on ARM virt machine
Date: Mon, 3 Jan 2022 12:24:57 +0100	[thread overview]
Message-ID: <20220103112457.56iglr2wbcrbws2y@gator> (raw)
In-Reply-To: <20220103084636.2496-2-wangyanan55@huawei.com>

On Mon, Jan 03, 2022 at 04:46:30PM +0800, Yanan Wang wrote:
> ARM64 machines like Kunpeng Family Server Chips have a level
> of hardware topology in which a group of CPU cores share L3
> cache tag or L2 cache. For example, Kunpeng 920 typically
> has 6 or 8 clusters in each NUMA node (also represent range
> of CPU die), and each cluster has 4 CPU cores. All clusters
> share L3 cache data, but CPU cores in each cluster share a
> local L3 tag.
> 
> Running a guest kernel with Cluster-Aware Scheduling on the
> Hosts which have physical clusters, if we can design a vCPU
> topology with cluster level for guest kernel and then have
> a dedicated vCPU pinning, the guest will gain scheduling
> performance improvement from cache affinity of CPU cluster.
> 
> So let's enable the support for this new parameter on ARM
> virt machines. After this patch, we can define a 4-level
> CPU 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
>

Reviewed-by: Andrew Jones <drjones@redhat.com>



  reply	other threads:[~2022-01-03 11:30 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-03  8:46 [PATCH v6 0/7] ARM virt: Support CPU cluster topology Yanan Wang via
2022-01-03  8:46 ` [PATCH v6 1/7] hw/arm/virt: Support CPU cluster on ARM virt machine Yanan Wang via
2022-01-03 11:24   ` Andrew Jones [this message]
2022-01-03  8:46 ` [PATCH v6 2/7] hw/arm/virt: Support cluster level in DT cpu-map Yanan Wang via
2022-01-03 11:25   ` Andrew Jones
2022-01-03  8:46 ` [PATCH v6 3/7] hw/acpi/aml-build: Improve scalability of PPTT generation Yanan Wang via
2022-01-03 11:24   ` Andrew Jones
2022-01-04  2:05     ` wangyanan (Y) via
2022-01-03  8:46 ` [PATCH v6 4/7] hw/arm/virt-acpi-build: Make an ARM specific PPTT generator Yanan Wang via
2022-01-03 11:30   ` Andrew Jones
2022-01-04  2:06     ` wangyanan (Y) via
2022-01-03  8:46 ` [PATCH v6 5/7] tests/acpi/bios-tables-test: Allow changes to virt/PPTT file Yanan Wang via
2022-01-03 11:51   ` Ani Sinha
2022-01-03  8:46 ` [PATCH v6 6/7] hw/arm/virt-acpi-build: Support cluster level in PPTT generation Yanan Wang via
2022-01-03 11:32   ` Andrew Jones
2022-01-04  2:15     ` wangyanan (Y) via
2022-01-03  8:46 ` [PATCH v6 7/7] tests/acpi/bios-table-test: Update expected virt/PPTT file Yanan Wang via
2022-01-03 12:01   ` Ani Sinha
2022-01-04  2:28     ` wangyanan (Y) via
2022-01-04  4:27       ` Ani Sinha
2022-01-04  4:51         ` wangyanan (Y) via

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=20220103112457.56iglr2wbcrbws2y@gator \
    --to=drjones@redhat.com \
    --cc=ani@anisinha.ca \
    --cc=eauger@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=shannon.zhaosl@gmail.com \
    --cc=wanghaibin.wang@huawei.com \
    --cc=wangyanan55@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 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).