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

Re: [PATCH v7 5/6] xen/x86: move NUMA process nodes nodes code from x86 to common


  • To: Wei Chen <Wei.Chen@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 9 Nov 2022 10:30:07 +0100
  • 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=2kZE7U7NQ7GZIwC5g9fFzLHfPsijZCo0hDfLuoH5oOM=; b=YtEyhhAMPxC9Kv/2vKYs/yCIXYBunk9wHRnuBlZQKDDPThdYYQBh72B+egBTltPKeT9lSor9X1mu9lYswnWfQ4l6LbL7PWCMonlCSuHSPTOlPRBgu+/KA6VlNZnP/f2f/Ml8pBXzXAmDICBys14BhG++uFIlh73wL7lBHC2PV+zQHfmjJuhs7Gh3N5ZJ0JoUI+070NmGwJwfn7fGA9zm9LJiRpgyfBkvrsybyrCEvTPKVjwWpYKMp27Qu3lS53LEZ1qE0OhJ48/lEKrRAEkG4ZFVr36jyfEwK5j0aDD9MAOvQOrC1DGM/ok1I+DgA+zNaGOtwBbElIYyiO8+n3e9tg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MYJ74Xc1xw/W0ypMmaZeOwZtiEwuQVMO0DU5j7F1ItItCAtD39v7MOsCu4fqNXzXWedTaiu7f3B8lJ/S9uqtljpM0YIDWpW3DV+tkBqFRSHScCSOKixZJNxNixLW3jbfgfMEkDNYVpEZiZwGykY3E4tKHRWR2mJtJ+0tHvBEBNumajGkTOCHYbU35S/PmGh4TxCgxD59yI7hjeLWN9khoSkLws+qJoV4iQ5W//7Lxg/H8D8cGdygcpjAIY66SxlpTBRtS8Hhabw9d0w+Z+0WcBxhNZErcU0eBG6o2tfxvNiv+0lvjs/QbM3oE7W70saFOh6IbpisvZJ7JQY+OxUqNg==
  • 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: Wed, 09 Nov 2022 09:30:16 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 09.11.2022 09:51, Wei Chen wrote:
>> -----Original Message-----
>> From: Jan Beulich <jbeulich@xxxxxxxx>
>> Sent: 2022年11月9日 0:55
>>
>>> @@ -341,159 +247,14 @@ acpi_numa_memory_affinity_init(const struct
>> acpi_srat_mem_affinity *ma)
>>>             pxm &= 0xff;
>>>     node = setup_node(pxm);
>>>     if (node == NUMA_NO_NODE) {
>>> -           bad_srat();
>>> +           numa_fw_bad();
>>>             return;
>>> -                           }
>>> -           } while (found && start < end);
>>> -
>>> -           if (start < end) {
>>> -                   printk(KERN_ERR "NUMA: No NODE for RAM range: "
>>> -                           "[%"PRIpaddr", %"PRIpaddr"]\n", start, end - 1);
>>> -                   return 0;
>>> -           }
>>> -   }
>>> -   return 1;
>>> +   numa_fw_nid_name = "PXM";
>>
>> ... this to be happening too late. Not because I can see a way for current
>> code to use the variable earlier, but because of the risk of future code
>> potentially doing so. Afaics srat_parse_regions() is called quite a bit
>> earlier, so perhaps the field should (also?) be set there, presumably
>> after acpi_table_parse() has succeeded. I've included "(also?)" because I
>> think to be on the safe side the setting here may want keeping, albeit
>> perhaps moving up in the function.
>>
> 
> When I was composing this patch, I also thought current place to call this
> "PXM" setting would be a little late. But since there is only one function
> that uses this prefix right now, I thought it was acceptable at the time.
> But obviously your concerns make sense, I will move this call to
> srat_parse_regions after acpi_table_parse has been done successfully.

As said - perhaps not move, but copy. There is an (extremely unlikely) case
where srat_parse_regions() would not be called at all.

Jan



 


Rackspace

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