[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
On Tue, Jul 18, 2017 at 11:25 PM, Julien Grall <julien.grall@xxxxxxx> wrote: > Hi, > > > On 18/07/17 12:41, vijay.kilari@xxxxxxxxx wrote: >> >> From: Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxx> >> >> Introduce NR_NODES config option to specify number >> of NUMA nodes supported. By default value is set at >> 64 for x86 and 8 for arm. Dropped NODES_SHIFT macro. >> >> Also move NR_NODE_MEMBLKS from asm-x86/acpi.h to xen/numa.h >> >> Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxx> >> --- >> xen/arch/Kconfig | 7 +++++++ >> xen/include/asm-x86/acpi.h | 1 - >> xen/include/asm-x86/numa.h | 2 -- >> xen/include/xen/config.h | 1 + >> xen/include/xen/numa.h | 7 ++----- >> 5 files changed, 10 insertions(+), 8 deletions(-) >> >> diff --git a/xen/arch/Kconfig b/xen/arch/Kconfig >> index cf0acb7..9c2a4e2 100644 >> --- a/xen/arch/Kconfig >> +++ b/xen/arch/Kconfig >> @@ -6,3 +6,10 @@ config NR_CPUS >> default "128" if ARM >> ---help--- >> Specifies the maximum number of physical CPUs which Xen will >> support. >> + >> +config NR_NODES >> + int "Maximum number of NUMA nodes" >> + default "64" if X86 >> + default "8" if ARM > > > 3rd time I am asking it... Why the difference between x86 and ARM? AFAIK, there is no arm platform for now with numa more than 8 nodes. Thunderx is only 2 nodes. So kept it low value for ARM to avoid unnecessary memory allocation. Do you want me to keep same as x86?. > > 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? > > >> + ---help--- >> + Specifies the maximum number of NUMA nodes which Xen will >> support. >> diff --git a/xen/include/asm-x86/acpi.h b/xen/include/asm-x86/acpi.h >> index 27ecc65..15be784 100644 >> --- a/xen/include/asm-x86/acpi.h >> +++ b/xen/include/asm-x86/acpi.h >> @@ -105,7 +105,6 @@ extern void acpi_reserve_bootmem(void); >> >> extern s8 acpi_numa; >> extern int acpi_scan_nodes(u64 start, u64 end); >> -#define NR_NODE_MEMBLKS (MAX_NUMNODES*2) >> >> #ifdef CONFIG_ACPI_SLEEP >> >> diff --git a/xen/include/asm-x86/numa.h b/xen/include/asm-x86/numa.h >> index bada2c0..3cf26c2 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/config.h b/xen/include/xen/config.h >> index a1d0f97..0f1a029 100644 >> --- a/xen/include/xen/config.h >> +++ b/xen/include/xen/config.h >> @@ -81,6 +81,7 @@ >> >> /* allow existing code to work with Kconfig variable */ >> #define NR_CPUS CONFIG_NR_CPUS >> +#define NR_NODES CONFIG_NR_NODES >> >> #ifndef CONFIG_DEBUG >> #define NDEBUG >> diff --git a/xen/include/xen/numa.h b/xen/include/xen/numa.h >> index 7aef1a8..6bba29e 100644 >> --- a/xen/include/xen/numa.h >> +++ b/xen/include/xen/numa.h >> @@ -3,14 +3,11 @@ >> >> #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) >> +#define MAX_NUMNODES NR_NODES >> +#define NR_NODE_MEMBLKS (MAX_NUMNODES * 2) >> >> #define vcpu_to_node(v) (cpu_to_node((v)->processor)) >> >> > > Cheers, > > -- > Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |