From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 07201C54EBD for ; Thu, 12 Jan 2023 23:15:37 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.476435.738606 (Exim 4.92) (envelope-from ) id 1pG6n4-0006qy-Sd; Thu, 12 Jan 2023 23:15:22 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 476435.738606; Thu, 12 Jan 2023 23:15:22 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pG6n4-0006qr-OZ; Thu, 12 Jan 2023 23:15:22 +0000 Received: by outflank-mailman (input) for mailman id 476435; Thu, 12 Jan 2023 23:15:21 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pG6n3-0006qk-A5 for xen-devel@lists.xenproject.org; Thu, 12 Jan 2023 23:15:21 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pG6n1-0006p9-HO; Thu, 12 Jan 2023 23:15:19 +0000 Received: from gw1.octic.net ([88.97.20.152] helo=[10.0.1.102]) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pG6n1-0004vi-Bz; Thu, 12 Jan 2023 23:15:19 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:Subject: From:References:Cc:To:MIME-Version:Date:Message-ID; bh=3Ea7sP/H+lnt603ST7qDMg96sbEvXpor6wScK3E8HfM=; b=0MJpSJ68kUriEXolQ0yKoLyDoL oSWjBY6EdErzGtI5Ik09NevLveiFlVN5vDMJq+luvxb7cFEHLTfqFsA0y8Mrl0iTFVzIwox8QxL9L cIgUb9pLIjVIDk0KOAIwAMsA9U4Io2809iykIeDZgjFM4Ug2W2W2J2e+xm6+y8WKZQbM=; Message-ID: Date: Thu, 12 Jan 2023 23:15:17 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 To: Jan Beulich Cc: Hongyan Xia , Andrew Cooper , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , Wei Liu , xen-devel@lists.xenproject.org, Julien Grall References: <20221216114853.8227-1-julien@xen.org> <20221216114853.8227-6-julien@xen.org> <965e3faa-472d-9a79-83ca-fef57cda81c5@xen.org> From: Julien Grall Subject: Re: [PATCH 05/22] x86/srat: vmap the pages for acpi_slit In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 >>>> >>>> This avoids the assumption that boot pages are in the direct map. >>>> >>>> Signed-off-by: Hongyan Xia >>>> Signed-off-by: Julien Grall >>> >>> Reviewed-by: Jan Beulich >>> >>> 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. I am curious to hear the opinion from the others. Cheers, -- Julien Grall