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

Re: [PATCH v5 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: Fri, 30 Sep 2022 08:03:05 +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=rzF0cIUBeYdqvVoYkE0XVVR+Tf936AZ26VIG5zcHCUA=; b=RnXuP3CrbYfkx556gAOqQ5YcTwagotnWThGbL1yJ+Ek0cPS7Tzx5zlPjWqoKo4duG1StRNt6OZSgCPvqyUe5HfdVGNAFmDIqFgVbRTfHa0cxdqZEydXqOVKGEF76ROPiG3o50/pvlTO8etlmpE7xEfhPXbA7+unMmVlhrsSTQXeG4qDsVuSux/Ul6hKGmwWyMmc74z2+CvED0uY/zmU4oKT9j1Xanatz0baG/OYAtznjqPUea70CwHWSMeTjhfIx4Qdonu8ofPE8/oLhPgzMZ+a4cFBkCHPIq5ourtfaEl7Tg4otklc5ebVqD9OnEYiZAUkQGIcJAvWPcettjcGkmg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vrk9YMtOHxGMoSilWjWs8cDIQfwS2WkOjBiQ3V5qWgEk/49KKENO7W0+j3yeyoGxKlADZo5/L5ZGtRHPQym0B5ZTbQNJK58SqI8+tGxLgVisZi5ft8m8mNkEK+n2osEO4Y244cXrnQMV3dLEBriFR08T24s9hAFPwEDxY8T/DY5Q2EbNk3oi7dm8pKyuopMV424TEwrHYDKi3adFTTxzwkxE45VP+hLkx8QDO4LNJ9fn3B1VySFq+MXPJjV5wmNsuey0u1cx4KvHxEP4MXwnZ4SOvlanKDlAagPz0WmfhdMBoEON1xsr8zGerUUrfQNbsTAGD4YIbv65TmXGLigxLg==
  • 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: Fri, 30 Sep 2022 06:03:18 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 30.09.2022 03:40, Wei Chen wrote:
>> -----Original Message-----
>> From: Jan Beulich <jbeulich@xxxxxxxx>
>> Sent: 2022年9月29日 20:21
>>
>> On 29.09.2022 10:21, Wei Chen wrote:
>>> On 2022/9/27 23:48, Jan Beulich wrote:
>>>> On 20.09.2022 11:12, Wei Chen wrote:
>>>>> --- 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
>>>>>           select NUMA
>>>>
>>>> While I might guess that you've chosen the insertion point to have
>>>> things sorted alphabetically, I think here it would be more natural
>>>> to select the wider option first and then also select the more
>>>> narrow one.
>>>>
>>>
>>> Ok, I will adjust the order.
>>>
>>>> One further question though: How is this going to work for Arm64
>>>> once it wants to support both the form of NUMA you're working to
>>>> enable _and_ ACPI-based NUMA? There better wouldn't be a requirement
>>>> to pick one of the two at build time - it would be nice for support
>>>> of both forms to be able to co-exist in a single binary.
>>>
>>> We are also working in this way. In part#3, we will check ACPI first,
>>> only when ACPI is off, the DT NUMA will be used by Arm. If ACPI is on,
>>> we will skip DT NUMA.
>>
>> Even more so an answer to my question would be nice: You'll then have
>> CONFIG_HAS_NUMA_NODE_FWID=y even on Arm (using PXM as mandated by ACPI
>> when in ACPI mode). But then what's the FWID for DT? I know it was me
>> to suggest this build time distinction, but I'm afraid I wasn't doing
>> much good with that (and I'm sorry).
> 
> How about introducing a flag for selected NUMA implementation to
> set it in runtime?
> For example:
> bool numa_has_fw_nodeid;
> 
> ACPI NUMA will set this flag to 1, but 0 for DT NUMA.

That's an option alongside going back to what you had in an earlier
version. Another would be (name subject to improvement)

const char *__ro_after_init numa_fw_nid_name;

which for ACPI would be set to "PXM" (eliminating the need to pass
it to certain functions, albeit the fw_nid will continue to need to
be passed anyway). I guess I'm not really certain which of this and
your earlier approach I prefer; the boolean you suggest above looks
less desirable to me, though.

Jan



 


Rackspace

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