[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: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Wei Chen <Wei.Chen@xxxxxxx>
  • Date: Wed, 9 Nov 2022 08:51:58 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; 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=N6hCrj/BCkI13OSrtI5sCVOlvwOyCwZt6T3Umr7LA9A=; b=dAAryuNcUevs7yRu1cGFby9WuTU06otqirXzWy2VaGwScZPeLGtYEIZN5uVVHm3zWAmbDMdAetJ02zywEJb77td0NWcNDBUkOhtp1FZNdIXjXLQEhmYJ/NCHA/e7EWpnvx2nxW+q5XQAPfqBuoRWRVUZqv70ncyuN8LHBPi2WWUwu91gfjPdtcZWNvRnlUzUviWohmz5oNruw7IknuH8453udk16H6OiEbMwiVed/8l6wi8hf30MA9EjGayuHsi1ABcr84llM+D1HCJKfETChqDQYgef2PFlfpIszPjrHvD6DySHut71cwlPX3HFv831K9zU1kxb9a3lKXdb+6OzkA==
  • 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=N6hCrj/BCkI13OSrtI5sCVOlvwOyCwZt6T3Umr7LA9A=; b=aP/YnsO61fzWbo6h1GcHMafMjU2Slhiv8cCdyYWKkAT+RhR38y7dRr9IDzkLx47bqeota6oLRDYYHT4L80MbtnHrVSJzcX0Q0ohqGpZNwLlpeAsOSdfqFJVTvsAdr/OBK4dfeLEb+3FRJ6P8WKK+Befm6oE01O7EZ6c5+VAV8v/QP7LpqwVOruSR5xjzvefCvXngphzJNCEbT7XJjVzHoPfPcf96qVOOrDcKWiSUvWKEasqvy8jGz8CeTm/PuineO8SU9lwyWVQ7F3YzTL/+ndMja3VC7AHiJ08xg471gvgXVJ3+NotZLw9XQZGON+pzpCLJcHLQXH/BISygO1Biag==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=f4TQs4uSNA5/tAKZVPhdRDqgytAjimSrxE3D5nRx4D4FkTZ1EGugo/gvI2YZ7R9zQ5VVjBBydzFTETNMELJXWjKeWJfHHdSXm+LFhyEHA+37ulgDQ2C2dHrhYHaSUFQOab5LzclUejZ+lTowT14lfdjm3OadMDKhBMKfV607vHcj5Jnk5XYAXMyTATd6FesW18Bd/evQQ3qrG8yQ1cqH9ugpzwMp9nazTh8Ng9uN3CG1+cV0fT9BpTVnTUZgWsmlml017iokJYsxN9fc+g/uEPt/Y7AtQn8WccIlh7qwsRpxdiBKwQJBqBzRNxyT8yoojVRb2ZU1rGsk454AsIGong==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QpFlAFSAShetcajjgSqGYO4+LSbDuNEmTUZCq3hpucRUY9jS8iIFomSWCZTt9WQ23q/izyCvj0FETE6riarcc89hUpBtQgzeThmOHOS/pgHYljpXMkqyaFbcV4B5Z3inINYyFssLLDGz3oqNUb5nqAUjtFnffKmxFcGP0nM2FGx5Y/wof7IeWeUDdTOUUkqM2lZrwu1F03+0qZEp1V+EdgZl1dxUiD0qyDa6e0Bg6fF/W6LPsZYcFGrvkMyUrz0rar0fhiWsM76XkeRRSwD5By9ChIB0osgh27vuMTFOcMBya0G7vZ+rmfXHDJ8hD7efAwlBnQs/drLbtun4ll/H/g==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.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 08:52:34 +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: AQHY5EtSdgmFSeaU8UGG/Ef8aqU5eq41XS4AgAEIj3A=
  • Thread-topic: [PATCH v7 5/6] xen/x86: move NUMA process nodes nodes code from x86 to common

Hi Jan,

> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: 2022年11月9日 0:55
> To: Wei Chen <Wei.Chen@xxxxxxx>
> 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
> Subject: Re: [PATCH v7 5/6] xen/x86: move NUMA process nodes nodes code
> from x86 to common
> 
> > mem_hotplug is accessed by common code if memory hotplug is
> > activated. Even if this is only supported by x86, export the
> > variable so that other architectures could support it in the future.
> >
> > As asm/acpi.h has been removed from common/numa.c, we have to
> > move NR_NODE_MEMBLKS from asm/acpi.h to xen/numa.h in this patch
> > as well.
> >
> > Signed-off-by: Wei Chen <wei.chen@xxxxxxx>
> 
> There's just one remaining concern I have: I continue to consider ...
> 
> > @@ -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.

Cheers,
Wei Chen

> Jan

 


Rackspace

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