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

RE: [PATCH v8 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: Fri, 18 Nov 2022 07:23:49 +0000
  • Accept-language: en-US
  • 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=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=Njh4Ebq0MieMmAh+x0JIcpyOp86UX3Tu/y5PfSFeCHA=; b=QacOTd6b7kwLHhCBuutAMn1/N+PuB1KA+wvw5j60NZiCNtM7viTJBifBg9m21DRmtf3htXN0gDPyMWXPhGWMO+7YqFYCe5KC9FZFwnkjfhry5xLOJgTFynEiERPgCWnAQyuT/n0dI+f4ZcigfXD0Gupd9DmrLPb8AAsJE1gG9m5zZC5MWTeoLgL1ynASC03UFv7AegdKeIJrlwZf5X7xxtdk4Bq6x1fKKsC+k6boDGccSfgbNzldtZ6JVEvCMazYfBwKu0EaUUR7HzekbsNoNLRlBJ2HsVgR+wcy4vyLQjAJM+55FIU1nwAl0g63txMfDQTpV3HzaEbILXc4wLkawQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O1pAEocPjQGvTFIw1SclwIdYz3XEQCOdj1lIzB9J4yy3s1XKvIYJF8FQjI6R9yABOBW39YILWyzPj+Q+GMgi0mILVJxRL7sbXRYgmkMI6MHspjGWlaCeXL49E4dIEXZ/r10WBgbALiXb+lW/sJsvrFacfZG0Beb2Oo1hE2yBHJlYjNYImsif5qBxuMp2JT0kuxn7ylq2RbWS2bW5TCoAq8f9HVPRJhDFXzy9zhcZiSE68j5Nejr9b0PXLl7JW+HNfPtx1ASoWMhV1+O8khsoiv53ifiILyHH4wSwe+xYeN8je+ce5l55OL8qLqVAegx0BRUnErbk5JY6KJ9IGyhCig==
  • 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: Fri, 18 Nov 2022 07:24:15 +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: AQHY9/NJEyK+3mrs5EOr3Uxa6OTCSq5DRUeAgAEC0+A=
  • Thread-topic: [PATCH v8 5/6] xen/x86: move NUMA process nodes nodes code from x86 to common

Hi Jan,

> -----Original Message-----
> > to reuse the functions names in common code, we have rename them
> > to neutral names as well.
> >
> > PXM is an ACPI specific item, we can't use it in common code
> > directly. As an alternative, we extend the parameters of
> > numa_update_node_memblks. The caller can pass the PXM as print
> > messages' prefix or as architectural node id.
> 
> The use of "prefix" here must have been stale for a while, perhaps
> resulting from an incomplete re-write of what was here earlier on?
> 

Yes, I forgot to update this description when we're changing the
method from extending parameter to use numa_fw_nid_name. I will
correct it.

> > -static int __init nodes_cover_memory(void)
> > -{
> > -   unsigned int i;
> > -
> > -   for (i = 0; ; i++) {
> > -                           }
> > -           } 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";
> 
> I guess this can't go without a comment, now that we have ...
> 

Ok, how about following comment:
      /*
       * In an extremely unlikely case, srat_parse_regions might not
       * be called. So set "PXM" before the first caller to use it to
       * make it more safe.
       */
And ...

> > +   if (!numa_update_node_memblks(node, pxm, ma->base_address, ma-
> >length,
> > +                                 ma->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE))
> > +           numa_fw_bad();
> >  }
> >
> >  void __init acpi_numa_arch_fixup(void) {}
> > @@ -534,6 +295,7 @@ void __init srat_parse_regions(paddr_t addr)
> >         acpi_table_parse(ACPI_SIG_SRAT, acpi_parse_srat))
> >             return;
> >
> > +   numa_fw_nid_name = "PXM";
> 
> ... this as well. Otherwise someone may spot the redundancy and either
> propose to drop one, or it'll take them quite a bit of time to figure
> why both are there. I thought this would go without saying, so I'm
> sorry for not making this explicit earlier on.

...
      /* Set "PXM" as earlier as we can for those functions will use it. */
> > +   numa_fw_nid_name = "PXM";

Cheers,
Wei Chen

> 
> Jan

 


Rackspace

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