|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3] xen/arm: Set correct per-cpu cpu_core_mask
Hi All,Gentle ping since it has been a couple of months, any comments on this updated patch? Thanks! Kind regards, Henry On 3/21/2024 11:57 AM, Henry Wang wrote: In the common sysctl command XEN_SYSCTL_physinfo, the value of cores_per_socket is calculated based on the cpu_core_mask of CPU0. Currently on Arm this is a fixed value 1 (can be checked via xl info), which is not correct. This is because during the Arm CPU online process at boot time, setup_cpu_sibling_map() only sets the per-cpu cpu_core_mask for itself. cores_per_socket refers to the number of cores that belong to the same socket (NUMA node). Currently Xen on Arm does not support physical CPU hotplug and NUMA, also we assume there is no multithread. Therefore cores_per_socket means all possible CPUs detected from the device tree. Setting the per-cpu cpu_core_mask in setup_cpu_sibling_map() accordingly. Modify the in-code comment which seems to be outdated. Add a warning to users if Xen is running on processors with multithread support. Signed-off-by: Henry Wang <Henry.Wang@xxxxxxx> Signed-off-by: Henry Wang <xin.wang2@xxxxxxx> --- v3: - Use cpumask_copy() to set cpu_core_mask and drop the unnecessary cpumask_set_cpu(cpu, per_cpu(cpu_core_mask, cpu)). - In-code comment adjustments. - Add a warning for multithread. v2: - Do not do the multithread check. --- xen/arch/arm/smpboot.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c index a84e706d77..b6268be27a 100644 --- a/xen/arch/arm/smpboot.c +++ b/xen/arch/arm/smpboot.c @@ -66,7 +66,11 @@ static bool cpu_is_dead;/* ID of the PCPU we're running on */
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |