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

Re: [PATCH 2/3] xen/sched: Link CPU topology to scheduler



Hi,

On 10/06/2026 12:13, Hirokazu Takahashi wrote:
Make CPU topology information available to the Xen scheduler.
Additionally, ensure that this topology information is displayed
when executing the 'xl info -n' command.

Signed-off-by: Hirokazu Takahashi <taka@xxxxxxxxxxxxx>
---
  xen/arch/arm/include/asm/processor.h  |  4 ---
  xen/arch/arm/smpboot.c                | 10 ++++--
  xen/common/device-tree/cpu-topology.c | 51 +++++++++++++++++++++++++++
  xen/common/sched/credit2.c            |  3 ++
  xen/common/sysctl.c                   |  1 +
  xen/include/xen/cpu-topology.h        | 10 ++++++
  6 files changed, 72 insertions(+), 7 deletions(-)

diff --git a/xen/arch/arm/include/asm/processor.h 
b/xen/arch/arm/include/asm/processor.h
index a3753c317f..41fa73cfc4 100644
--- a/xen/arch/arm/include/asm/processor.h
+++ b/xen/arch/arm/include/asm/processor.h
@@ -613,10 +613,6 @@ void show_stack(const struct cpu_user_regs *regs);
#define cpu_relax() barrier() /* Could yield? */ -/* All a bit UP for the moment */
-#define cpu_to_core(_cpu)   (0)
-#define cpu_to_socket(_cpu) (0)
-
  struct vcpu;
  void vcpu_regs_hyp_to_user(const struct vcpu *vcpu,
                             struct vcpu_guest_core_regs *regs);
diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c
index c071f1494f..b25d98c109 100644
--- a/xen/arch/arm/smpboot.c
+++ b/xen/arch/arm/smpboot.c
@@ -91,13 +91,17 @@ static int setup_cpu_sibling_map(int cpu)
           !zalloc_cpumask_var(&per_cpu(cpu_core_mask, cpu)) )
          return -ENOMEM;
+#ifdef CONFIG_DT_CPU_TOPOLOGY

For Arm, we support both ACPI and Device-Tree in a single binary. That's fine if we don't support NUMA with ACPI for now, but we need to make sure this doesn't regress for now.

With that in mind, I was expecting some runtime checks based on whether ACPI or DT is used. Can you explain why this is not the case?

Cheers,

--
Julien Grall




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.