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

Re: [PATCH v4 5/6] xen/x86: move NUMA scan nodes codes from x86 to common


  • To: Wei Chen <Wei.Chen@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 8 Sep 2022 18:01:45 +0200
  • 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=6R8v5F9BSinZzVuDSIJ8utL4egZv2vn5xb4qQq6px5s=; b=bmpxeM3LNyqi4ZW57XJD/y5Rj+f+Xrg6jp8/wbP+uKPYqFYY2yKzbVsEsr+VXvc1DyDk3ovJYhv2Jqby/jEM19m1NTqOo+882uTEq6xAfQIhT6Pc+Kx3PY0b3SO6ncUFKOPKH6uX6Fx2MlrFcq1AdQeSHdjTGxWL9C92zcs6iE4yiODmLig2Uv7+pv/JpkeChOoA8RPtQl3caXGdFD8d4OIjOfpE0OcYIulun5b4V8cSBJtNsQ6akzDFV2NkbpQ3jTJ+DjfcPo29WjsuVCJP3PNm3g1f5nGcW+yGKNa2nv6z7rwZRlZk4aisShcrJXrCtSM0kFAMhAe9Yv7EgugsaA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lLIsWOhGnDhgfTqQKYR/wxEy0MmFraMGrWkelxMNTwXmqBHjW4dENDOU2z7Q6IG+wdz80NQ/vD4SiAHcBjFySwzrk2/W0F0NT7n2ng3dFQaQG+WrYrbDEKsR1GzUfin8QxW0bH4RFq2ojx1G8zqCY/6Gto2YrsPeAfDj4KNimw94Zh+uXJa0xGRmgI8BP5VQslV475Z9D5RjQNqtgG21Wke3X2HOqWUyhF98neb8jA/+aCv92gTN8GRUou4U9o/JPPphkmXU6t+bl3iY7o2wWtZ86E1uSKf6kmtITdwZsaZHvInUJwNDwCRCUgIXOBv9HS+pFBbfz5GYQ5QhTclKDA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: nd <nd@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 08 Sep 2022 16:02:08 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 08.09.2022 17:26, Wei Chen wrote:
>> -----Original Message-----
>> From: Jan Beulich <jbeulich@xxxxxxxx>
>> Sent: 2022年9月8日 21:03
>>
>> On 02.09.2022 05:31, Wei Chen wrote:
>>> --- a/xen/arch/x86/numa.c
>>> +++ b/xen/arch/x86/numa.c
>>> @@ -41,9 +41,12 @@ int __init arch_numa_setup(const char *opt)
>>>      return -EINVAL;
>>>  }
>>>
>>> -bool arch_numa_disabled(void)
>>> +bool arch_numa_disabled(bool init_as_disable)
>>
>> I'm afraid my question as to the meaning of the name of the parameter has
>> remained unanswered.
>>
> 
> Sorry, I might missed some contents of your reply in v3. The name of this
> parameter has been bothering me for a long time, and now this is actually
> quite awkward. The origin of this parameter is because the current NUMA
> implementation will make different judgments under different usage
> conditions when using acpi_numa. In acpi_scan_nodes, it uses acpi_numa <= 0
> as the condition for judging that ACPI NUMA is turned off. But only use
> acpi_numa < 0 as condition in srat_disabled and elsewhere. I use this
> parameter in the hope that we can keep the same semantics as the original
> code without changing the code of the caller.

The difference is "bad only" vs "bad or no data". Maybe that's easier
to express via two functions - arch_numa_disabled() (checking <= 0)
and arch_numa_broken() (checking < 0)? With a single function I guess
the name of the parameter would always be clumsy at best. Unless
someone has a good idea for a suitable name ...

>>> --- a/xen/drivers/acpi/Kconfig
>>> +++ b/xen/drivers/acpi/Kconfig
>>> @@ -7,4 +7,5 @@ config ACPI_LEGACY_TABLES_LOOKUP
>>>
>>>  config ACPI_NUMA
>>>     bool
>>> +   select HAS_NUMA_NODE_FWID
>>
>> Are you selecting an option here which doesn't exist anywhere? Or
>> am I overlooking where this new option is being added?
>>
> 
> Yes, this is a new Kconfig option. Should I need to introduce in a
> separate patch?

I don't think that'll need to be in a separate patch; it can simply
be another hunk in the one here, adding the needed 2 lines (plus a
blank one) to, presumably, common/Kconfig.

Jan



 


Rackspace

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