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

Re: [Xen-devel] [RFC PATCH v3 01/24] NUMA: Make number of NUMA nodes configurable



Hi Vijay,

On 20/07/17 08:30, Vijay Kilari wrote:
On Wed, Jul 19, 2017 at 9:25 PM, Julien Grall <julien.grall@xxxxxxx> wrote:


Also, you likely want to set to 1 if NUMA is not enabled.


I don't see any dependency of NR_NODES with NUMA config.
So it is always set to default value. Isn't?


Well, what is the point to allow more than 1 node when NUMA is not
supported?

In such case, I have to make NR_NODES depends on NUMA config
and define this value to 1 if NUMA config is not defined as below.

diff --git a/xen/arch/Kconfig b/xen/arch/Kconfig
index b73d459..a5d40f5 100644
--- a/xen/arch/Kconfig
+++ b/xen/arch/Kconfig
@@ -11,5 +11,6 @@ config NR_NODES
        int "Maximum number of NUMA nodes"
+      range 1 254
        default "64"
+       depends on NUMA
        ---help---
          Specifies the maximum number of NUMA nodes which Xen will support.
diff --git a/xen/include/asm-x86/numa.h b/xen/include/asm-x86/numa.h
index 604fd6d..eede1c4 100644
--- a/xen/include/asm-x86/numa.h
+++ b/xen/include/asm-x86/numa.h
@@ -10,6 +10,10 @@ extern int srat_rev;
 extern nodeid_t      cpu_to_node[NR_CPUS];
 extern cpumask_t     node_to_cpumask[];

+#ifndef CONFIG_NUMA
+#define NR_NODES 1
+#endif
+
 #define MAX_NUMNODES    NR_NODES
 #define NR_NODE_MEMBLKS (MAX_NUMNODES * 2)

Can't Kconfig do it for you? Something like below:

int "Maximum number of NUMA nodes" if NUMA
range 1 254
default "64" if NUMA
default "0"  if !NUMA

Cheers,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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