[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: Wed, 4 Jan 2023 11:23:18 +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=q0RcQ0o/ff3cMD/M7ElC/t6CUe9cnaxHFi1kJMUWY50=; b=XJhLCx+WVk6+PL63pxGEeGadAmtN3v/RX7vpLNgJiu5dfOZ+Tb3O5vG2h338icsCtRTbYZiQymqOGenGCWnQwn3wTp43KpOUCVMB+Y1g6Tljrt6YfbGS6olXP3o5dCA+ci2dcg2za3v9m2rEw47SlOiX21E9Dtp2yR/ZPlO0u8es35zEdqZvgTZbGcr2x1GmeoT2zxYBkS5dP5zMas29J3LBKLosSpH/lDct1yyB0o+pAjTEg6cLZ6KHt1xonIj78dy0SOYaV4Fa+EEu7Ae0DwJVPULw9rA8xAOHVp8l49Tph5ecB7cHobtSmp9T1bi4VqV/ST6odP8LDrr81iZUZQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X+C7P2uz4eDXlg3xI4PsY7OYOZr8bcOox/EUFgAxGsF0wfvVz3wsZ/XSHSSXagnm/ytSWTL0KHIwA1QYdfVkJjGQN1paugLjrPDVEaSJUqjtBi6irkWb6xQ4gvDGvKUWYOR/8hdzCtV/lPSR3NpoRGEBrhw6cGsP9dEI0KH5etajyyeZdboJuQ3yjCSPNUmH5UXa0tGy/ykAq3NLu2RQBPen7RzRS6P4JSRQv5EjDeiGZ6oLMqiSkQkTjIRRpLN51RegeCjfuHUnpA1uzaiFrpOR0piZGWg5zV5wf14zC+PqpzIRt7I0z7nu0bjMe2pN81w/U2N/UFQtfnJmbrFj4A==
  • 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: Wed, 04 Jan 2023 10:23:32 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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.
At which point it would be better to boot with NUMA support turned off.

Jan



 


Rackspace

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