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

RE: [XEN RFC PATCH 32/40] xen/x86: make acpi_scan_nodes to be neutral


  • To: Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>
  • From: Wei Chen <Wei.Chen@xxxxxxx>
  • Date: Sat, 28 Aug 2021 02:11:17 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.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=YddDzNFJo0PdVji4yDUv8r6E/XwmA0a5N9vWbUp1hFo=; b=QcTU9AZJ9BqvUVPMn8i5sWkp6E+EAWlbXuH2vZpXSPeodHxAKtkbzQ8KRQItTO/vHZrwUL+phm4j7GiftqMdBnHgReys+UHcmx/lQAfP9qe3SV/kbB5imt/0C78rc8pydRFyWItNa5cLh+9xxZ1pehTvgT+Cke6viliz1UyTw5dbAx2j64X4+4TyOOi90kM4OqZiXGUj40wl+agdMXfrtxvLdJY0KfudEoQy+xRXci7/6VO158TA86YLsEwI9kfIYPzczmyIH0L5I4m1VPZ6EplObtYBvzQaw2ozTpxPpNXptw63ps8xJWhHKcvOlwxt0oxFKaWU9U/slgkDzghRJg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fweHNavgjpK3RFGImCE04hthNVBs6YEyAEaov6+eyw9OGuSA0DgdRdmH2yZ0nskJtNC+E+4sO0W/3S2OTArMcSXCa+owgEN/KdxTTbYGGzTgCIfuS/2QTGvPRwJrpENe4mJ8penXqWCmHrgaquF6Md+VxT7g4o8q31AUqCs2j/pVWWiEpyCWqUH2rlacudj5s5BsX+4KOqnvhvLkeSUeXlSiTUYUK5juWTFl6fqcYBCyHLSCMhuSppyAF4utuNuFO9XRFKPLTOiRc4ThT1UMbbK2FBkiODTbpzxLyhPFnfexS5cRR1By0oVM1EOk59p9742ntM/Y4kDoPIRz+9D++A==
  • Authentication-results-original: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
  • Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Delivery-date: Sat, 28 Aug 2021 02:11:54 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHXjptLHChzC8DaK0WpJXATzNxti6uHfOoAgADIL5A=
  • Thread-topic: [XEN RFC PATCH 32/40] xen/x86: make acpi_scan_nodes to be neutral

Hi Julien,

> -----Original Message-----
> From: Julien Grall <julien@xxxxxxx>
> Sent: 2021年8月27日 22:09
> To: Wei Chen <Wei.Chen@xxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx;
> sstabellini@xxxxxxxxxx; jbeulich@xxxxxxxx
> Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
> Subject: Re: [XEN RFC PATCH 32/40] xen/x86: make acpi_scan_nodes to be
> neutral
> 
> Hi Wei,
> 
> On 11/08/2021 11:24, Wei Chen wrote:
> > The code in acpi_scan_nodes can be reused for device tree based
> > NUMA. So we rename acpi_scan_nodes to numa_scan_nodes for a neutral
> > function name. As acpi_numa variable is available in ACPU based NUMA
> > system only, we use CONFIG_ACPI_NUMA to protect it.
> >
> > Signed-off-by: Wei Chen <wei.chen@xxxxxxx>
> > ---
> >   xen/arch/x86/srat.c        | 4 +++-
> >   xen/common/numa.c          | 2 +-
> >   xen/include/asm-x86/acpi.h | 2 +-
> >   3 files changed, 5 insertions(+), 3 deletions(-)
> >
> > diff --git a/xen/arch/x86/srat.c b/xen/arch/x86/srat.c
> > index dcebc7adec..3d4d90a622 100644
> > --- a/xen/arch/x86/srat.c
> > +++ b/xen/arch/x86/srat.c
> > @@ -362,7 +362,7 @@ void __init srat_parse_regions(u64 addr)
> >   }
> >
> >   /* Use the information discovered above to actually set up the nodes.
> */
> > -int __init acpi_scan_nodes(u64 start, u64 end)
> > +int __init numa_scan_nodes(u64 start, u64 end)
> >   {
> >     int i;
> >     nodemask_t all_nodes_parsed;
> > @@ -371,8 +371,10 @@ int __init acpi_scan_nodes(u64 start, u64 end)
> >     for (i = 0; i < MAX_NUMNODES; i++)
> >             cutoff_node(i, start, end);
> >
> > +#ifdef CONFIG_ACPI_NUMA
> >     if (acpi_numa <= 0)
> >             return -1;
> > +#endif
> 
> Looking at the follow-up patches, I find a bit odd that there is a check
> for ACPI but there is none added for DT. Can you explain why?
> 

Oh, I forgot DT check. And simply to add DT check here seems not a
good idea. Because once, when Arm support ACPI NUMA.
CONFIG_ACPI_NUMA and CONFIG_DEVICE_TREE_NUMA can be selected at
the same time. But only acpi_numa or dtb_numa can be > 0.

> However, I think this check is going to impair the work to support both
> ACPI and DT on Arm because acpi_numa would end up to be 0 so you would
> bail out here.
> 
> With that in mind, I think this check needs to either go away or replace
> by something there is firmware agnostic.

Yes, we have discussed about something like fw_numa before.
> 
> Cheers,
> 
> --
> Julien Grall

 


Rackspace

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