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

RE: [PATCH v4 09/17] xen/arm: introduce a helper to parse device tree NUMA distance map


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Wed, 26 Apr 2023 08:56:32 +0000
  • Accept-language: zh-CN, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • 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=Li2dIvkxQIQVgVE27pmrEXty1j/6u0TmS1D0UWIdPNg=; b=iQGI0mcvl8JhGq9cO943UOpd1ZrkUsraeMF+TUj60GG9t/EokzMofY9DdpGJPX4/5t9xPPZ2Ci5sU229SyjYzEfE8fkaD8g6lImQInz8jj9vXnSBhTXk/Pf55idvIZyZs1q7fUu/yLmdABQOxNj6TzrIkYA5+Lv5Z3o19en94PmX9Wfyc0KKxwZDh75m1GUPrr6mJhZfVJUAPz0cxzelb0oTlzkPJSsH2V/XTzB/aCy1zN/mN1yVJu6Yz5XKrLRa2Q2HHrFt7+txInEGrnt0W8SRR25/9zYIaB+PNKq+DC24U/HyodGLx0Mgj4amWXcv0g3dOnmfKsFNpUACLBI66Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OcvFf1mT4Nqht5bX25fEbTJFz7QURyys93LiTtBbXdREnDvIJP6FDthNppzl4Fy2e4lfVS2p1RMlPpqWopXu/4X/7vLCYomzWIc//hP3o+3GBp4cZFq1a7E7Q8JcIh9/4wBYKlR/Br+OImI82WZ8/Q40K1aHND7DKXvaH8JLWMalYGa6yEf+ZxitpWxR1Jgxny0VKQy6ygRYyQrS4UUZ6t4HGazEb3bkbD+htVL5/nhF4l0F+ptb3nH9wqBxCNG2XWntYYCRuTm6hPdeBoFYlP57/+Ttho1VBu7AhxL1R5UbR3gF4B26i3LglqiDqW2jcZX731hnEY84GiiMMI622w==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Wei Chen <Wei.Chen@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 26 Apr 2023 08:56:56 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHZd0ulMpqFICe/LUiDVq6+aDsW9687tFqAgAFSIKCAACZ1gIAABguQgAAM+YCAAAMWUIAAB/ZA
  • Thread-topic: [PATCH v4 09/17] xen/arm: introduce a helper to parse device tree NUMA distance map

Hi Jan

> -----Original Message-----
> From: Henry Wang
> Subject: RE: [PATCH v4 09/17] xen/arm: introduce a helper to parse device
> tree NUMA distance map
> 
> Hi Jan,
> 
> > -----Original Message-----
> > From: Jan Beulich <jbeulich@xxxxxxxx>
> > Subject: Re: [PATCH v4 09/17] xen/arm: introduce a helper to parse device
> > tree NUMA distance map
> >
> > > Great points! Thanks for pointing the 8-bit truncation out. You are 
> > > correct.
> > > Somehow my impression of numa_set_distance()'s first two arguments
> are
> > > already "unsigned int" so I missed this part...Sorry.
> > >
> > > In that case, I think I will add a check between "from, to" and
> > MAX_NUMNODES
> > > as soon as the values of "from" and "to" are populated by dt_next_cell().
> > > Hopefully this will address your concern.
> >
> > While this would address by concern, I don't see why you want to repeat
> > the checking that numa_set_distance() already does.
> 
> Correct, I think I would better to move the check in numa_set_distance() to
> the caller fdt_parse_numa_distance_map_v1() as I believe if the truncation
> really happens it is too late to check in numa_set_distance().

On second thought, maybe even remove the same check in __node_distance()
if we do the check in the caller, as I believe they will suffer the same 
problem...

Kind regards,
Henry

> 
> Kind regards,
> Henry
> 
> >
> > Jan

 


Rackspace

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