[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] x86/NUMA: improve memnode_shift calculation for multi node system
- To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Fri, 30 Sep 2022 12:50:10 +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=qj2a+dRMWO6m3CB7A4f7HIhY6I6eKhA/SbsW2g4szgM=; b=UbALCuewkdfGGQHtj8ZvKffifn0GH0v+JU4lOAnzHRlefHu8/b0qj8lVb9LUMdNKU4xvXFGWflZt0+2SlcplBMzae3Mkn0nFIQnt3co7/4wXow4bBrh+J3+ugRXoheJj1SMVMY/fZXD4kD2eJyU7qTSXGrgEkiyqMTgXkWhPjYcoPQSk3A+b+YnpjnRUOsAiU7/d7N3uhqv2oU4xTnM2Ii1gQWS5207VEIBou8/gA+C2ObEvMhTw4qyCla5g8K25DRtFrIvx8CJbtyRa1ZmnIQRMNdWtZNFJd2QvokFL9yAvjdINjKEVDq9XFF8S895dbxiPkpesg2jUodpM7uVqsQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eQ6MyUsEH6aLgQc1OTGQ9p7o8Feax54P6Zys6xBlJsDDqLMazuf6f66G6d4wOlPfWhIFvwPJaVIa7UnHzOO4XBi4Dgwy9HY7sY/yricgj5fZUwvA9hwDdtpoxldgkumYgM7j5+ocWx3eIy5fYhcovFtGQpz3rUKeE/lyuwcYrTUdoiR9TEUoCHTMSITK6IGpIBUuEHXbTuZv2wWeI7DlXTmubPdEpseuH9IFKgJynKeV+XZXmkdthmU5vKc/fsHPDMic2Lu0aVqktq5tK9VcwKUJxGifAoxZ2f1ks62pp3p5B4iQRD9aEWBQwe3V9eqBzc239AuQFiuoQj7iFrh/Yg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Fri, 30 Sep 2022 10:50:20 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 30.09.2022 12:03, Roger Pau Monné wrote:
> On Fri, Sep 30, 2022 at 10:36:20AM +0200, Jan Beulich wrote:
>> On 30.09.2022 10:25, Roger Pau Monné wrote:
>>> On Tue, Sep 27, 2022 at 06:20:35PM +0200, Jan Beulich wrote:
>>>> @@ -413,14 +414,37 @@ acpi_numa_memory_affinity_init(const str
>>>> node, pxm, start, end - 1,
>>>> ma->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE ? " (hotplug)" : "");
>>>>
>>>> - node_memblk_range[num_node_memblks].start = start;
>>>> - node_memblk_range[num_node_memblks].end = end;
>>>> - memblk_nodeid[num_node_memblks] = node;
>>>> + /* Keep node_memblk_range[] sorted by address. */
>>>> + for (i = 0; i < num_node_memblks; ++i)
>>>> + if (node_memblk_range[i].start > start ||
>>>> + (node_memblk_range[i].start == start &&
>>>
>>> Maybe I'm confused, but won't .start == start means we have
>>> overlapping ranges?
>>
>> Yes, except when a range is empty.
>
> Hm, OK. Won't overlapping ranges be bad if not empty?
They are and ...
> Shouldn't Xen complain if it finds overlapping ranges, or that's taken
> care somewhere else?
... we do, elsewhere. Still I'd like this code to be generic, at the very
least to - as said - deal with empty ranges as well. It didn't seem
indicated to me to special case empty ranges here, when the code is more
clear when written in a more generic manner.
Jan
|