linux/arch/x86
Yinghai Lu d9c2d5ac6a x86, numa: Use near(er) online node instead of roundrobin for NUMA
CPU to node mapping is set via the following sequence:

 1. numa_init_array(): Set up roundrobin from cpu to online node

 2. init_cpu_to_node(): Set that according to apicid_to_node[]
			according to srat only handle the node that
			is online, and leave other cpu on node
			without ram (aka not online) to still
			roundrobin.

3. later call srat_detect_node for Intel/AMD, will use first_online
   node or nearby node.

Problem is that setup_per_cpu_areas() is not called between 2 and 3,
the per_cpu for cpu on node with ram is on different node, and could
put that on node with two hops away.

So try to optimize this and add find_near_online_node() and call
init_cpu_to_node().

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: David Rientjes <rientjes@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <4B07A739.3030104@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-11-23 10:06:24 +01:00
..
boot x86: Eliminate redundant/contradicting cache line size config options 2009-11-19 04:58:34 +01:00
configs tracing: Rename FTRACE_SYSCALLS for tracepoints 2009-08-26 00:17:35 +02:00
crypto Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-09-14 07:57:32 -07:00
ia32 x86: Don't leak 64-bit kernel register values to 32-bit processes 2009-10-01 11:24:26 +02:00
include/asm x86: Eliminate redundant/contradicting cache line size config options 2009-11-19 04:58:34 +01:00
kernel x86, numa: Use near(er) online node instead of roundrobin for NUMA 2009-11-23 10:06:24 +01:00
kvm KVM: add support for change_pte mmu notifiers 2009-10-04 17:04:53 +02:00
lguest lguest: move panic notifier registration to its expected place. 2009-09-23 22:26:44 +09:30
lib x86: Don't generate cmpxchg8b_emu if CONFIG_X86_CMPXCHG64=y 2009-10-01 08:42:24 +02:00
math-emu
mm x86, numa: Use near(er) online node instead of roundrobin for NUMA 2009-11-23 10:06:24 +01:00
oprofile perf: Do the big rename: Performance Counters -> Performance Events 2009-09-21 14:28:04 +02:00
pci const: mark struct vm_struct_operations 2009-09-27 11:39:25 -07:00
power x86: Remove final bits of CONFIG_X86_OLD_MCE 2009-09-18 08:31:23 +02:00
vdso kbuild: rename ld-option to cc-ldoption 2009-09-20 12:27:42 +02:00
video
xen x86, mm: Clean up and simplify NX enablement 2009-11-16 13:44:59 -08:00
Kbuild
Kconfig x86, SLUB: Remove unused CONFIG FAST_CMPXCHG_LOCAL 2009-10-01 10:59:08 +02:00
Kconfig.cpu x86: Eliminate redundant/contradicting cache line size config options 2009-11-19 04:58:34 +01:00
Kconfig.debug kmemcheck: make kconfig accessible for other architectures 2009-06-15 15:49:17 +02:00
Makefile kbuild: use INSTALLKERNEL to select customized installkernel script 2009-09-20 12:18:14 +02:00
Makefile_32.cpu x86: add specific support for Intel Atom architecture 2009-08-23 11:20:02 +02:00