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

RE: [PATCH 02/37] xen: introduce a Kconfig option to configure NUMA nodes number


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Wei Chen <Wei.Chen@xxxxxxx>
  • Date: Fri, 24 Sep 2021 01:24:22 +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; bh=AZHIHgGJeRuFiAiVk5L7f10ap5pNVfmoZ7c97Z+Icns=; b=DJGyzNsnO0O1OKZmVKzCmxsUZUBqXK3lQZiKXI4xSijZFLiyGOpNYR0l7Ecm/6LeaKCXOtM93g/4/7GPNDguUrsgtXD+0Ap3TUu2kQFLHwSGeQSVj5MeD8nIOinOc+5B6oWhnYWjP+Fz6Pl6YHkuZ2qoMgGUFiG4o788387kuf6sgnUligWQ5MWGIUk1PDGmuAkOB0pttQbp9ZQ2p+MC7ipL/zdR9KYyMM4sEbjs640lrcSfOu0hRrxBik8jP5NDWjy5Rah28hIBB7tpRO+WTAMsDy46whZyiFxDIHdFIjuGfAmOGUG2Qax9dE6e2fUpevJKHKz5BEkjSrs4078y/g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DmnfV+L+rjdwRqXHWNLUFWM//+3SrzLX4GW3KiH8pbowHs6pVbQRu0ndJqYkK2RqQzK7gzIkYlCF91lKRMTAe+I9hpenlt/bNEKo3P0ADF/lXu6ICtUXNruUlYz3YcsCgTVmMUCpeHDzAJd5HmMokCCsCv8/oNpd3lMFOCIu9t89WR69aKV9q9/wmvojhEUuVRMIhSbc+sBGscFU/Cg4UDcOLsYBlyjrogt81/2l5/ddBXng00TZJD/QZNQjh+NaEXsfzzomQY2FVHXctEqlBUX53iF8uD7OEuAafgEz3GoDI+IpGC7T7amO6d8H1s/nM12kZ/IETB95hWxx8VCrGA==
  • Authentication-results-original: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Delivery-date: Fri, 24 Sep 2021 01:24:50 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHXsHMKuuhjNuZvvk2uWABlJOqp6quySUYAgAAbfeA=
  • Thread-topic: [PATCH 02/37] xen: introduce a Kconfig option to configure NUMA nodes number

Hi Stefano,

> -----Original Message-----
> From: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> Sent: 2021年9月24日 7:45
> To: Wei Chen <Wei.Chen@xxxxxxx>
> Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx; sstabellini@xxxxxxxxxx; julien@xxxxxxx;
> Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
> Subject: Re: [PATCH 02/37] xen: introduce a Kconfig option to configure
> NUMA nodes number
> 
> On Thu, 23 Sep 2021, Wei Chen wrote:
> > Current NUMA nodes number is a hardcode configuration. This
> > configuration is difficult for an administrator to change
> > unless changing the code.
> >
> > So in this patch, we introduce this new Kconfig option for
> > administrators to change NUMA nodes number conveniently.
> > Also considering that not all architectures support NUMA,
> > this Kconfig option only can be visible on NUMA enabled
> > architectures. Non-NUMA supported architectures can still
> > use 1 as MAX_NUMNODES.
> 
> This is OK but I think you should also mention in the commit message
> that you are taking the opportunity to remove NODES_SHIFT because it is
> currently unused.
> 
> With that:
> 
> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> 
> 

Thanks, I will update it in next version.

> > Signed-off-by: Wei Chen <wei.chen@xxxxxxx>
> > ---
> >  xen/arch/Kconfig           | 11 +++++++++++
> >  xen/include/asm-x86/numa.h |  2 --
> >  xen/include/xen/numa.h     | 10 +++++-----
> >  3 files changed, 16 insertions(+), 7 deletions(-)
> >
> > diff --git a/xen/arch/Kconfig b/xen/arch/Kconfig
> > index f16eb0df43..8a20da67ed 100644
> > --- a/xen/arch/Kconfig
> > +++ b/xen/arch/Kconfig
> > @@ -17,3 +17,14 @@ config NR_CPUS
> >       For CPU cores which support Simultaneous Multi-Threading or
> similar
> >       technologies, this the number of logical threads which Xen will
> >       support.
> > +
> > +config NR_NUMA_NODES
> > +   int "Maximum number of NUMA nodes supported"
> > +   range 1 4095
> > +   default "64"
> > +   depends on NUMA
> > +   help
> > +     Controls the build-time size of various arrays and bitmaps
> > +     associated with multiple-nodes management. It is the upper bound
> of
> > +     the number of NUMA nodes the scheduler, memory allocation and
> other
> > +     NUMA-aware components can handle.
> > diff --git a/xen/include/asm-x86/numa.h b/xen/include/asm-x86/numa.h
> > index bada2c0bb9..3cf26c2def 100644
> > --- a/xen/include/asm-x86/numa.h
> > +++ b/xen/include/asm-x86/numa.h
> > @@ -3,8 +3,6 @@
> >
> >  #include <xen/cpumask.h>
> >
> > -#define NODES_SHIFT 6
> > -
> >  typedef u8 nodeid_t;
> >
> >  extern int srat_rev;
> > diff --git a/xen/include/xen/numa.h b/xen/include/xen/numa.h
> > index 7aef1a88dc..52950a3150 100644
> > --- a/xen/include/xen/numa.h
> > +++ b/xen/include/xen/numa.h
> > @@ -3,14 +3,14 @@
> >
> >  #include <asm/numa.h>
> >
> > -#ifndef NODES_SHIFT
> > -#define NODES_SHIFT     0
> > -#endif
> > -
> >  #define NUMA_NO_NODE     0xFF
> >  #define NUMA_NO_DISTANCE 0xFF
> >
> > -#define MAX_NUMNODES    (1 << NODES_SHIFT)
> > +#ifdef CONFIG_NR_NUMA_NODES
> > +#define MAX_NUMNODES CONFIG_NR_NUMA_NODES
> > +#else
> > +#define MAX_NUMNODES    1
> > +#endif
> >
> >  #define vcpu_to_node(v) (cpu_to_node((v)->processor))
> >
> > --
> > 2.25.1
> >

 


Rackspace

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