qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC 06/52] hw/cpu: Introduce hybrid CPU topology


From: Philippe Mathieu-Daudé
Subject: Re: [RFC 06/52] hw/cpu: Introduce hybrid CPU topology
Date: Tue, 14 Feb 2023 10:27:53 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.7.2

On 14/2/23 10:30, Zhao Liu wrote:
On Mon, Feb 13, 2023 at 02:10:17PM +0100, Philippe Mathieu-Daudé wrote:
Date: Mon, 13 Feb 2023 14:10:17 +0100
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Subject: Re: [RFC 06/52] hw/cpu: Introduce hybrid CPU topology

On 13/2/23 10:49, Zhao Liu wrote:
From: Zhao Liu <zhao1.liu@intel.com>

For smp systems, the parts in one topology level are the same. But now
there are more and more systems with hybrid architectures. Different
parts of the same topology level may have differences. For example,
Intel's Alder Lake series CPU has two types of cores, so the CPU
topology is no longer symmetrical.

The hybrid topology is compatible with the smp topology type, that is,
different parts on the same level of the hybrid topology can set to be
the same, but the hybrid topology will introduce more complexity (need
to allocate more memory, organized with array or linked-list), so the
original smp topology support is retained while introducing the hybrid
topology, and the hybrid topology is only built when the hybrid is
explicitly required.

Therefore, we introduce the definition support of hybrid cpu topology
here. At the same time, in order to unify with the original smp, we
introduce a new cpu topology structure that can support smp topology
or hybrid topology. This structure will replace the CpuTopology type (in
include/hw/boards.h) used by MachineState.smp.

As for now, we only support two hybrid topology levels: core and
cluster.

Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
---
   MAINTAINERS                   |   1 +
   include/hw/cpu/cpu-topology.h | 117 ++++++++++++++++++++++++++++++++++
   qapi/machine.json             |  12 ++++
   3 files changed, 130 insertions(+)
   create mode 100644 include/hw/cpu/cpu-topology.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 58794885ced3..918a9418d98e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1742,6 +1742,7 @@ F: qapi/machine-target.json
   F: include/hw/boards.h
   F: include/hw/core/cpu.h
   F: include/hw/cpu/cluster.h
+F: include/hw/cpu/cpu-topology.h
   F: include/sysemu/numa.h
   F: tests/unit/test-smp-parse.c
   T: git https://gitlab.com/ehabkost/qemu.git machine-next

Worth splitting this section in 2, machine VS numa/clusters?

Do you mean splitting this header file into numa.h and cluster.h?

No, I meant the MAINTAINERS 'Machine' section.

It seems that the cpu topology is not related to the content of
numa.h,

And you seem to agree ;)

and it may be possible to merge some content into cluster.h,
but the definition in cluster.h is to use the cluster as a device
(if I understand correctly...) , and cpu_topology.h is just about
topology-related things.

I have not included the contents of cluster.h/cluster.c into hybrid
considerations, but only modified the topology defined by smp.

Zhao




reply via email to

[Prev in Thread] Current Thread [Next in Thread]