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

Re: [PATCH v3] xen/arm: Set correct per-cpu cpu_core_mask


  • To: Henry Wang <xin.wang2@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Tue, 21 May 2024 09:57:11 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rSBbL6llymM5kwICXoSUKun7pq9ChUTp2++7iY5p2uI=; b=Bxq9gOTlJ1+/HodywRXf8c8LHlzkLRMxV31eskFz2y+MLaPx0tfGROyGOMeZVoZ2BwwnWfALFuUn2+UH4NL5SuqMi3O/5WYoUJYea/wt8ib5Aryz3rzT5dMQFxL23/BJmKLgN3Cg95K3vl7OIMLfs6g7bvrrPQalXZB37TQ95/lK0qVxb0BZ8WUoj418+7+pAgm6lAXnIZkjwnUrbX7aXt5xQYhcZGrQrkyamI1YtoWzVfMHvlWnJjBLa7t/HPJBRj38lGteHO0DNDm0DfOhPzg3tgtbFTlCD3vNblqIFFojQnsBxI8Aura2ixPmrkWJ6ifPJ/Ef3LnMV/DDuoOL0g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H5tjaY+JkNAboZ1C+WZ89Vz32d0tcsRvGBILO2FMS74HznJDMkbSZYxo9ZYn1FR8uZrES2Y7K8V08VSB/CF+Xoi0SCyUkThWbgv0vSH67nowMrZ0QY9wIlw9XixaDRfxwFR/+5I2R5ltsNpxWGfdRfG08Ptqd9cZq7jU3wfc8oAYfrAQnHQWAvLIG1rrZATzJ/Sg00/dkg1QMyL0bzpm1A+5GZ8/VPFNFwcdrK1zl9GNVx9jtfuzHFu8VzOR4TG1D49lvsHIUFAA84ckzJ7IsGAI2/gwcRBcABOOhgowDl8Nf27vpTKhrQPt+tLxQjyq4533lk53DRWM7OIx553RsQ==
  • Cc: Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Henry Wang <Henry.Wang@xxxxxxx>
  • Delivery-date: Tue, 21 May 2024 07:57:24 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 21/05/2024 09:51, Henry Wang wrote:
> Hi Michal,
> 
> On 5/21/2024 3:47 PM, Michal Orzel wrote:
>> Hi 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>
>> Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>
> 
> Thanks.
> 
>>>>    /* ID of the PCPU we're running on */
>>>>    DEFINE_PER_CPU(unsigned int, cpu_id);
>>>> -/* XXX these seem awfully x86ish... */
>>>> +/*
>>>> + * Although multithread is part of the Arm spec, there are not many
>>>> + * processors support multithread and current Xen on Arm assumes there
>> NIT: s/support/supporting
> 
> Sorry, it should have been spotted locally before sending. Anyway, I 
> will correct this in v4 with your Reviewed-by tag taken. Thanks for 
> pointing this out.
I don't think there is a need to resend a patch just for fixing this typo. It 
can be done on commit.

~Michal




 


Rackspace

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