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

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


  • To: "Wang, Henry" <Xin.Wang2@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Mon, 26 Feb 2024 11:43:16 +0100
  • 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=22VHKlc203k+dAjDW5lk4FTjC3jvnaX7PtHMAahlusc=; b=Vnm2NpUU/60YRcrtym9UFojaDwEHElmoEmBKEd3qHjcLh9VSlJtvLQLWlOuj/CxgXaY5vWTC9AJ+zs7DWmkUwmpxDa2EngrVKsaM6betzh+WjH9cxziCyKF42M0qwRcUMlcdHVYGjpzXjTZ56nlxOxEvAm41PmYTiWi72Sr5Yt4L/FrWO6i98UTXi9vcGT3rGmfhYLpGotWIiXND4cLIV7lMAQwu0fLZD39fp8txAXYYPiElxLxUGfkKfPnpkU+i2FbdJA3Q5l2zHUMNsCJPHJn50FMeLOWc0sPF6b+8T6DUiJwqaojVa/PnQz+QBgt5VOGpWEmF0gjnTgLYlojmHw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KO3fNJYsXRFS8x329BGiiw3AUUFQ3RiCeQLDRHoODMv4f3Df8GfuV7eLIZXY1C6LsOpwyo8k0Eed3ZKTZBu+u0M2Vqcg4yEHcoocvj7mVGWB5qzEbSi37dyKau8LV47ovhqzdU2vW4kW1ls8HII9EeMw2FNSDOeoDo69temux9Z7NqPxqazovTR9qQj1hUe51PylDuEr3fx7Lq/Tewf1VUZ9K3+qpj5dB96KL4iHVt7eu5y0nIluz3Cv/HDLfVNrx79/H4lnhR7dUo/EjOD6rYsrozhO0T94r3srt8Mdy6zaZd1ODl0OzldI45huMydOIGH2klGHP/v572UVpwWf0A==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Mon, 26 Feb 2024 10:43:31 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 26/02/2024 10:54, Wang, Henry wrote:
> [AMD Official Use Only - General]
> 
> Hi Michal,
> 
>> -----Original Message-----
>> Subject: Re: [PATCH] xen/arm: Set correct per-cpu cpu_core_mask
>>
>> Hi Henry,
>>
>> On 26/02/2024 04:01, Henry Wang wrote:
>>> Signed-off-by: Henry Wang <xin.wang2@xxxxxxx>
>> NIT: You first sent this patch as part of NUMA series:
>> https://lore.kernel.org/xen-devel/20231120025431.14845-16-
>> Henry.Wang@xxxxxxx/
>> Shouldn't you retain the Arm's authorship?
> 
> Ah good point, in fact I don't really know, since I basically rewrote
> the patch I thought it is not really needed. I will add it back in v2 since
> you mentioned this.
> 
>>> ---
>>>  xen/arch/arm/smpboot.c | 6 +++++-
>>>  1 file changed, 5 insertions(+), 1 deletion(-)
>>>
>>> +    /* PE not implemented using a multithreading type approach. */
>>> +    if ( system_cpuinfo.mpidr.mt == 0 )
>> Do we need this check? It mt was true, cpu_sibling_mask would be incorrect
>> anyway (it would still be 1).
> 
> I added this check for playing safe, because I only want to do the correct 
> thing
> in this patch and avoid make things worse for MT case. With this patch, non-MT
> case can be improved and the MT case is remain unchanged.
> 
> But I agree with you, and I would be more than happy if I can run a MT setup 
> and
> finish the "else" part with this patch or follow-ups. Do you know maybe qemu 
> can
> allow me to emulate a MT setup so that I can fix it properly in v2? Thanks!
A65 is the only Arm CPU with SMT and I'm not aware of Qemu being able to 
emulate it.
AFAICT, in Xen on Arm we assume no SMT, hence my question about your check. 
With or without it,
some parts would still be incorrect (like cpu_sibling_mask), so what's the 
point in having a partial check.
I would keep your solution without the check. Others may have a different 
opinion though.

~Michal



 


Rackspace

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