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

RE: [PATCH 14/37] xen/x86: use name fw_numa to replace acpi_numa


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Wei Chen <Wei.Chen@xxxxxxx>
  • Date: Thu, 27 Jan 2022 08:09:01 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; 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=yQnSvIPrioYZfrjh5gO0/XMTtkGStO9qRsZqgT58GSg=; b=JYW5cL3MscFrv4OhqGdxDKdbLby+c07mnxr6Yueme/Xqll8IzuqOvJHi2jpnhLXucAa5o14DO9PsZapgQWgqHGOsvr+WOjSu+3blayZLoFNOu6hkx2Nzxx9fxGsQXzh4npd2Cc0oS4haNjvIolgAKBnQuzhFVwQzqRucR4OwPF7BhUo84NxjUPDZengzWOJ8u2QS+bBE+yrxSOxjSh10bYkGQn1zerCkQLPajv1Gn0iTyOxFRmTOEkHziUWvrr8RmedvYrIdrPb/4RjZk+WS7YlYBCe9rBDXsHDcT98FTP9hmt+eDplQJUD0Z9JNoLEvombZw6jGWfPCQnR4G8OMkQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mDvcrXOz4puo8l6fMu47I5hVP5aDVkDM7R9dSR0HVmAKWml9M+IkB0PgVfvVem9+i9hqvU+1PgWUtQGBNDbpuUi1v+veKtxEttDcJh/KXZ4Yqze2XQvHR8QfAzg/LeXUTo4ryxIJOVVE6tXmZFxdvbUcXAANHDph1d+0iLTOQwNMEqHZLfmPkBZGHg4sANI19Z9+RCUKAemLcgBsr3tOQYSuSO+ZL/y76Ki1eEqLmPxj4FdkFQqij1I8xBk3L6jVoY14vzqnD04Yq8feg5w1QxKZ2mvlE10mZ26mSmti3FIGIhlNCwy+nFpVMSnl4B3sZPaxBcWCZEFg+SgKfZHVVg==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>
  • Delivery-date: Thu, 27 Jan 2022 08:09:22 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHXsHMTdEf6BAAAdE2ZG0NU313E1ax0R1uAgAMBfOA=
  • Thread-topic: [PATCH 14/37] xen/x86: use name fw_numa to replace acpi_numa

Hi Jan,

> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: 2022年1月25日 18:13
> To: Wei Chen <Wei.Chen@xxxxxxx>
> Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>; xen-
> devel@xxxxxxxxxxxxxxxxxxxx; sstabellini@xxxxxxxxxx; julien@xxxxxxx
> Subject: Re: [PATCH 14/37] xen/x86: use name fw_numa to replace acpi_numa
> 
> On 23.09.2021 14:02, Wei Chen wrote:
> > --- a/xen/arch/x86/numa.c
> > +++ b/xen/arch/x86/numa.c
> > @@ -51,11 +51,11 @@ cpumask_t node_to_cpumask[MAX_NUMNODES]
> __read_mostly;
> >  nodemask_t __read_mostly node_online_map = { { [0] = 1UL } };
> >
> >  bool numa_off;
> > -s8 acpi_numa = 0;
> > +s8 fw_numa = 0;
> 
> In x86 code I'd prefer this to remain "acpi_numa". If you need to access
> the variable from to-become-generic code, introduce an inline wrapper
> (possibly named numa_mode()), allowing you to do whatever you need in the
> DT case. It may be helpful to fold this with numa_off then, seeing e.g.
> ...
> 
> >  int srat_disabled(void)
> >  {
> > -    return numa_off || acpi_numa < 0;
> > +    return numa_off || fw_numa < 0;
> 
> ... this. Actually I think the underlying enumeration could even be made
> generic:
> 
> enum numa_mode {
>     numa_off,
>     numa_on,
>     numa_acpi,
> };
> 
> is, I believe, sufficient to express the present (numa_off,acpi_numa)
> tuple. In this context I'd like to point out that the two uses of
> acpi_numa in srat_parse_regions() and srat_detect_node() should likely
> be invocations of srat_disabled() instead, to also take numa_off into
> account. This would then be addressed effectively as a side effect by
> replacing open-coded uses as well as srat_disabled() by numa_mode() (or
> whichever name the new helper would gain).
> 

Yes, that seems more reasonable, I will try this in next version.

> Jan


 


Rackspace

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