x86/numa changes for v2.6.24
Subsystems (4)
Linus,
Please pull the latest x86-numa-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-numa-for-linus
Thanks,
Ingo
------------------>
David Rientjes (3):
x86, numa: Fix numa emulation calculation of big nodes x86, numa: Add fixed node size option for numa emulation x86, numa: Remove configurable node size support for numa emulation
Haicheng Li (1):
x86, acpi: Map hotadded cpu to correct node.
Documentation/x86/x86_64/boot-options.txt | 20 +-- arch/x86/include/asm/mmzone_64.h | 6 - arch/x86/include/asm/numa_64.h | 5 + arch/x86/kernel/acpi/boot.c | 21 +++ arch/x86/mm/numa_64.c | 235 ++++++++++++---------------- 5 files changed, 134 insertions(+), 153 deletions(-)
Documentation/x86/x86_64/boot-options.txt +7 -13
@@ -166,19 +166,13 @@ NUMA numa=noacpi Don't parse the SRAT table for NUMA setup - numa=fake=CMDLINE - If a number, fakes CMDLINE nodes and ignores NUMA setup of the - actual machine. Otherwise, system memory is configured - depending on the sizes and coefficients listed. For example: - numa=fake=2*512,1024,4*256,*128 - gives two 512M nodes, a 1024M node, four 256M nodes, and the - rest split into 128M chunks. If the last character of CMDLINE - is a *, the remaining memory is divided up equally among its - coefficient: - numa=fake=2*512,2* - gives two 512M nodes and the rest split into two nodes. - Otherwise, the remaining system RAM is allocated to an - additional node. + numa=fake=<size>[MG] + If given as a memory unit, fills all system RAM with nodes of + size interleaved over physical nodes. + + numa=fake=<N> + If given as an integer, fills all system RAM with N fake nodes + interleaved over physical nodes. ACPI
arch/x86/include/asm/mmzone_64.h +0 -6
@@ -39,11 +39,5 @@ static inline __attribute__((pure)) int phys_to_nid(unsigned long addr)#define node_start_pfn (nid) (NODE_DATA(nid)->node_start_pfn)#define node_end_pfn (nid) (NODE_DATA(nid)->node_start_pfn + \ NODE_DATA(nid)->node_spanned_pages) - -#ifdef CONFIG_NUMA_EMU -#define FAKE_NODE_MIN_SIZE (64 * 1024 * 1024) -#define FAKE_NODE_MIN_HASH_MASK (~(FAKE_NODE_MIN_SIZE - 1UL)) -#endif -#endif #endif /* _ASM_X86_MMZONE_64_H */
arch/x86/include/asm/numa_64.h +5 -0
@@ -36,6 +36,11 @@ extern void __cpuinit numa_set_node(int cpu, int node);extern void __cpuinit numa_clear_node (int cpu);extern void __cpuinit numa_add_cpu (int cpu);extern void __cpuinit numa_remove_cpu (int cpu); + +#ifdef CONFIG_NUMA_EMU +#define FAKE_NODE_MIN_SIZE ((u64)64 << 20) +#define FAKE_NODE_MIN_HASH_MASK (~(FAKE_NODE_MIN_SIZE - 1UL)) +#endif /* CONFIG_NUMA_EMU */ #else static inline void init_cpu_to_node (void ) { }static inline void numa_set_node (int cpu,int node) { }
arch/x86/kernel/acpi/boot.c +21 -0
@@ -49,6 +49,7 @@ EXPORT_SYMBOL(acpi_disabled);#ifdef CONFIG_X86_64 # include <asm/proto.h> +# include <asm/numa_64.h> #endif /* X86 */ #define BAD_MADT_ENTRY (entry, end) ( \
@@ -482,6 +483,25 @@ int acpi_register_gsi(struct device *dev, u32 gsi, int trigger, int polarity)*/ #ifdef CONFIG_ACPI_HOTPLUG_CPU +static void acpi_map_cpu2node (acpi_handle handle,int cpu,int physid) +{ +#ifdef CONFIG_ACPI_NUMA +int nid; + + nid =acpi_get_node (handle); +if (nid ==-1 || !node_online (nid)) +return ; +#ifdef CONFIG_X86_64 + apicid_to_node[physid] = nid; +numa_set_node (cpu, nid); +#else /* CONFIG_X86_32 */ + apicid_2_node[physid] = nid; + cpu_to_node_map[cpu] = nid; +#endif + +#endif +} +static int __cpuinit _acpi_map_lsapic (acpi_handle handle,int *pcpu) {struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER ,NULL };
@@ -540,6 +560,7 @@ static int __cpuinit _acpi_map_lsapic(acpi_handle handle, int *pcpu) } cpu =cpumask_first (new_map); +acpi_map_cpu2node (handle, cpu, physid); *pcpu = cpu; retval =0 ;
arch/x86/mm/numa_64.c +101 -134
272 lines not on this page · raw message