[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: Henry Wang <Henry.Wang@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 26 Apr 2023 08:56:33 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=/qG/e5edz6n7E3IYj7TTk5sucdHWBDsJLvmI1nmGUH4=; b=ElJbW2vggq9FWRWjZA6f+Lkfa6GLoTf5lQTA1+Q1VP6b4EmX49Rcdze4VNgME3zFDXTNmVQPlLiwa2rTWrbaWPC/giZUQhTvXyIXsZauvuGv+xibL5mhmSbyns1ckk0FzrYLzYV1iQyY9ZbDJq4EldPDyv41tkXxM62ATlSDw31Cmu2skRYpRgu99VApo82ad0IdC2oNo1OG8rrBjR9HOgOoQJqUzfOzBKrWZfMXv0Jm98P7JN1SrtxaRPQoN+nbwTfT+/RKXTXhcMWddpydEB47FwD6FNbF7XC8BLM0zl8Oyf1iegfnDT3MRXi2widpTk+HfW766pFrUDeAJXNiMQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kNYkIb7GsHA5yZmZx9LNdft8RH/ndfS3uER6I/lw5rJNzo0AIelm+pMczZPbcb5bSKv8TJGqNrPXvlT9dL8zne1uJLqFGBpjVAlnIvAl1aVHnUOLKDjcbkFM0fRcJR5Qhy0ADJuZWKhvxDt7H3uScj41FmbK7PiIHWcgRYuDi/lZkjB5WBFU7xYtWmyE6JM6fAsY+hI4r96D0+cLpzI0R12i25U8sZQXr+Dv+dcVCuRMmTW0m4A+7sceSqEH9ePF/u3dHl86Dtl2TW5ju8oG+oB3byrDr3vEPfkvApxloTN48xw8K1vynMGWuhmg6QCgKYQySZVPW2W7+OHQw2RgLw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Wei Chen <Wei.Chen@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 26 Apr 2023 06:56:56 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 26.04.2023 07:33, Henry Wang wrote:
>> -----Original Message-----
>> From: Jan Beulich <jbeulich@xxxxxxxx>
>>
>>> +        /* Get opposite way distance */
>>> +        opposite = __node_distance(to, from);
>>> +        /* The default value in node_distance_map is NUMA_NO_DISTANCE
>> */
>>> +        if ( opposite == NUMA_NO_DISTANCE )
>>
>> And the matrix you're reading from can't hold NUMA_NO_DISTANCE entries?
>> I ask because you don't check this above; you only check against
>> NUMA_LOCAL_DISTANCE.
> 
> My understanding for the purpose of this part of code is to check if the 
> opposite
> way distance has already been set, so we need to compare the opposite way
> distance with the default value NUMA_NO_DISTANCE here.
> 
> Back to your question, I can see your point of the question. However I don't 
> think
> NUMA_NO_DISTANCE is a valid value to describe the node distance in the device
> tree. This is because I hunted down the previous discussions and found [2] 
> about
> we should try to keep consistent between the value used in device tree and 
> ACPI
> tables. From the ACPI spec, 0xFF, i.e. NUMA_NO_DISTANCE means unreachable.
> I think this is also the reason why NUMA_NO_DISTANCE can be used as the 
> default
> value of the distance map, otherwise we won't have any value to use.

The [2] link you provided discusses NUMA_LOCAL_DISTANCE. Looking at
Linux'es Documentation/devicetree/numa.txt, there's no mention of an
upper bound on the distance values. It only says that on the diagonal
entries should be 10 (i.e. matching ACPI, without really saying so).

Jan



 


Rackspace

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