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

Re: [XEN RFC PATCH 37/40] xen: introduce an arch helper to do NUMA init failed fallback


  • To: Wei Chen <Wei.Chen@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 30 Aug 2021 11:52:26 +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-SenderADCheck; bh=fYh4N0p7oemNLxY0ylX5ZNMPBgydOPsE2vUeWx1lTW8=; b=hxcSHvIKOb1nMaFH8G/SJEcRcFwjn2S3RUmKSUJXt4bQfvXusvPuTTxfnYzHXIGMjjISD5aiypjTa6cQhM038ciT+8sTEfNZpVqz5wdSRbsiGjB6kyK1lASa7psuiEaqahrSBVcJqArnsUJxiuOrqzn7hTvSLE0yu7QS1BGmEFFf2jQywsNziX0VXUaPpDriYDEdW6K3tu+xE3viLuYoTKOWRsEXMEBgOMuqwwxf1RepH/RXg+GbG4ahQZr5egqvmp2k9JbUxBfQ9MO/GkLxJAAy/O2x7c8vWicgQCWM/OlV0+H0/ey3CgBlXjdhdKZzEd7mKdjVchV4cH6BA9RBwg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hPsCzHKTW7VyUBptAB4Q5syFhD4oH2YQfsGWrKfDYoproK/r1HCZO0qNCbutSosO27hYdsdca/cISutkeFAHCtzSbZNtsz2DXhjZDnk1IiydQMVAPgrMMjm3cwnLaprfYgOM/Ta4KIcfkaoLhy0bY26KfqFx/Aed/DSx24x2Pce99PhuSfVT8yvhg+p+0rg/EUdFenpO8vtIvvkEwcgVfoy2dw6RUV+Ln3AZxblBGdotY1n7aZM6Kk543B6NoD51OX36Fd2nG+9NjHQQIdFIJp7++uR3sDikV1/fWTbQnvvI0w99QxR8Hv87GgWlZiAZCuFkJ+Y2bTDOYGLZMKyQGQ==
  • Authentication-results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=suse.com;
  • Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>
  • Delivery-date: Mon, 30 Aug 2021 09:52:53 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 28.08.2021 05:45, Wei Chen wrote:
>> From: Xen-devel <xen-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of Wei
>> Chen
>> Sent: 2021年8月28日 11:09
>>
>>> From: Julien Grall <julien@xxxxxxx>
>>> Sent: 2021年8月27日 22:30
>>>
>>>> --- a/xen/arch/arm/numa.c
>>>> +++ b/xen/arch/arm/numa.c
>>>> @@ -140,3 +140,16 @@ int __init arch_meminfo_get_ram_bank_range(int
>> bank,
>>>>
>>>>    return 0;
>>>>   }
>>>> +
>>>> +void __init arch_numa_init_failed_fallback(void)
>>>> +{
>>>> +    int i, j;
>>>> +
>>>> +    /* Reset all node distance to remote_distance */
>>>> +    for ( i = 0; i < MAX_NUMNODES; i++ ) {
>>>> +        for ( j = 0; j < MAX_NUMNODES; j++ ) {
>>>> +            numa_set_distance(i, j,
>>>> +                (i == j) ? NUMA_LOCAL_DISTANCE :
>> NUMA_REMOTE_DISTANCE);
>>>> +        }
>>>> +    }
>>>> +}
>>>
>>> ... this implementation looks fairly generic. So can you explain why we
>>> need it on Arm but not x86?
>>>
>>
>> This implementation is DT only, for x86, it's using acpi_slit.
>> For now, I am not quit sure ACPI need to do fallback or not.
>> Or say in another way, I don't know how to implement the fallback
>> for ACPI. I planned to solve it in Arm ACPI version NUMA, so I left
>> an empty helper for x86.
>>
>> @Jan Beulich Could you give me some suggestion about x86 fallback?
>>
>>
> 
> I have a quick look into Linux. When Arch do numa init failed,
> the numa_free_distance will be invoked to revert numa_distance.

Does this matter in the first place? Don't we fall back to single
node mode, in which case the sole entry of the distance table
will say "local" anyway?

Jan




 


Rackspace

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