|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v13 2/5] xen/sched: Link CPU topology to scheduler
On 30-Nov-26 07:57, 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> > Acked-by: Jan Beulich <jbeulich@xxxxxxxx> > Reviewed-by: Juergen Gross <jgross@xxxxxxxx> # scheduler part > --- > xen/arch/arm/include/asm/processor.h | 4 -- > xen/arch/arm/smpboot.c | 34 ++++++++++++----- > xen/arch/ppc/include/asm/processor.h | 4 -- > xen/arch/riscv/include/asm/processor.h | 4 -- > xen/common/device-tree/cpu-topology.c | 53 ++++++++++++++++++++++++++ > xen/common/sched/credit2.c | 6 +++ > xen/common/sysctl.c | 1 + > xen/drivers/acpi/cpu-topology.c | 3 ++ > xen/include/xen/cpu-topology.h | 24 +++++++++++- > 9 files changed, 110 insertions(+), 23 deletions(-) > > diff --git a/xen/arch/arm/include/asm/processor.h > b/xen/arch/arm/include/asm/processor.h > index 8ee8f88fb4..fe4125cd75 100644 > --- a/xen/arch/arm/include/asm/processor.h > +++ b/xen/arch/arm/include/asm/processor.h > @@ -614,10 +614,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 97e227cd92..41162f8ea1 100644 > --- a/xen/arch/arm/smpboot.c > +++ b/xen/arch/arm/smpboot.c > @@ -103,17 +103,30 @@ static void set_cpu_sibling_map(unsigned int cpu) > BUG_ON(!per_cpu(cpu_sibling_mask, cpu)); > BUG_ON(!per_cpu(cpu_core_mask, cpu)); > > - /* > - * Currently we assume there is no multithread and NUMA, so > - * a CPU is a sibling with itself, and the all online CPUs > - * are supposed to belong to the same socket (NUMA node). The comment above cpu_sibling_mask definition is still stale i.e. current Xen on Arm assumes there is no multithread. BTW. We still have a warning if we find MPIDR MT bit set although this bit does not really mean the CPU supports SMT. That's bad because on e.g. A78 which is commonly used these days and that has this bit set, the warning is on. The warning is right that SMT might impact the security of the system as some things are shared between threads. This is just a note that we should do something with that in the future i.e. remove the check that is based on MPIDR and decide what to do with the warning (e.g. use the cpu topology information instead). No action for this patch specifically. With the stale comment removed: Acked-by: Michal Orzel <michal.orzel@xxxxxxx> ~Michal
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |