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

Re: [PATCH 05/22] x86/srat: vmap the pages for acpi_slit


  • To: Julien Grall <julien@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 13 Jan 2023 10:16:00 +0100
  • 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=H/EGN5qboOgBGC012glyK/C4KBiGb90uJnhpWogn/v8=; b=Z/SqRmTfgsHqsREqawPqCdRgZafk98IoWDFVJeHOKPKnPKGHGS3+7dYhIG5O1yfzESLDZYh3DXuA7dzJOY1fmc+NV3cLQM+d21gnDyylYk0QykHk+I7LZiuEV3I4RWmzRgqhGSNeT+91pgrbYSwNNlYfEUCeq8fepbxisM8E8HRktQtzEUuu9faCOZR9CEh9eaj7RwXcfLau/WJ7eOmIgaMfLDJelT+sawnPEd2YErgVfP27Kf6wjbpmGC0bT7lsffmLjVOcuhxsUNJJQRCGnAWrjDVAdXgLWge7LG9ULdbtLSvECqSYhTnSGA/LDfrbm3g+IXx31g/+2MI58aAflQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cz36W0dh2FXosdtxqdAa92ZDiP4Oyr9Uac0ps+Bir/G9QyZJgakmOt9e6lJbEZ1IobKm4vxLF+RXVTAWNZyXT63uV4Mtv2nQDsuiA0wehzObnbGGFU6WMCQ2SekHjr3q7BIaHICAa9Au5yU+qdKKAc+L+7vviIHHSvrHif/vmrtOs8vsNZL8cdFrti/JWRtAIYoylR5WDdepvXt3t6z7RKmOisMThsQ8UmPRLn6O9bmMhk93gPFA8NaY1UuiZMApNlCqSBenn82aUc1Wya55ks10VtZM1To2IU0cpKu3Egcr2dtkDhwFmZ/vhECfPO+4RRyVuWP24uqGhBbCK7bDvw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Hongyan Xia <hongyxia@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Julien Grall <jgrall@xxxxxxxxxx>
  • Delivery-date: Fri, 13 Jan 2023 09:16:11 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 13.01.2023 00:15, Julien Grall wrote:
> Hi,
> 
> On 04/01/2023 10:23, Jan Beulich wrote:
>> On 23.12.2022 12:31, Julien Grall wrote:
>>> On 20/12/2022 15:30, Jan Beulich wrote:
>>>> On 16.12.2022 12:48, Julien Grall wrote:
>>>>> From: Hongyan Xia <hongyxia@xxxxxxxxxx>
>>>>>
>>>>> This avoids the assumption that boot pages are in the direct map.
>>>>>
>>>>> Signed-off-by: Hongyan Xia <hongyxia@xxxxxxxxxx>
>>>>> Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>
>>>>
>>>> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
>>>>
>>>> However, ...
>>>>
>>>>> --- a/xen/arch/x86/srat.c
>>>>> +++ b/xen/arch/x86/srat.c
>>>>> @@ -139,7 +139,8 @@ void __init acpi_numa_slit_init(struct 
>>>>> acpi_table_slit *slit)
>>>>>                   return;
>>>>>           }
>>>>>           mfn = alloc_boot_pages(PFN_UP(slit->header.length), 1);
>>>>> - acpi_slit = mfn_to_virt(mfn_x(mfn));
>>>>> + acpi_slit = vmap_contig_pages(mfn, PFN_UP(slit->header.length));
>>>>
>>>> ... with the increased use of vmap space the VA range used will need
>>>> growing. And that's perhaps better done ahead of time than late.
>>>
>>> I will have a look to increase the vmap().
>>>
>>>>
>>>>> + BUG_ON(!acpi_slit);
>>>>
>>>> Similarly relevant for the earlier patch: It would be nice if boot
>>>> failure for optional things like NUMA data could be avoided.
>>>
>>> If you can't map (or allocate the memory), then you are probably in a
>>> very bad situation because both should really not fail at boot.
>>>
>>> So I think this is correct to crash early because the admin will be able
>>> to look what went wrong. Otherwise, it may be missed in the noise.
>>
>> Well, I certainly can see one taking this view. However, at least in
>> principle allocation (or mapping) may fail _because_ of NUMA issues.
> 
> Right. I read this as the user will likely want to add "numa=off" on the 
> command line.
> 
>> At which point it would be better to boot with NUMA support turned off
> I have to disagree with "better" here. This may work for a user with a 
> handful of hosts. But for large scale setup, you will really want a 
> failure early rather than having a host booting with an expected feature 
> disabled (the NUMA issues may be a broken HW).
> 
> It is better to fail and then ask the user to specify "numa=off". At
> least the person made a conscientious decision to turn off the feature.

Yet how would the observing admin make the connection from the BUG_ON()
that triggered and the need to add "numa=off" to the command line,
without knowing Xen internals?

> I am curious to hear the opinion from the others.

So am I.

Jan



 


Rackspace

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