dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/arch/x86
Mike Travis 98c9e27a56 x86: fix cpu_to_node references
In x86_64 and i386 architectures most arrays that are sized using
NR_CPUS lay in local memory on node 0.  Not only will most (99%?) of the
systems not use all the slots in these arrays, particularly when NR_CPUS
is increased to accommodate future very high cpu count systems, but a
number of cache lines are passed unnecessarily on the system bus when
these arrays are referenced by cpus on other nodes.

Typically, the values in these arrays are referenced by the cpu
accessing it's own values, though when passing IPI interrupts, the cpu
does access the data relevant to the targeted cpu/node.  Of course, if
the referencing cpu is not on node 0, then the reference will still
require cross node exchanges of cache lines.  A common use of this is
for an interrupt service routine to pass the interrupt to other cpus
local to that node.

Ideally, all the elements in these arrays should be moved to the per_cpu
data area.  In some cases (such as x86_cpu_to_apicid) the array is
referenced before the per_cpu data areas are setup.  In this case, a
static array is declared in the __initdata area and initialized by the
booting cpu (BSP).  The values are then moved to the per_cpu area after
it is initialized and the original static array is freed with the rest
of the __initdata.

This patch:

Fix four instances where cpu_to_node is referenced by array instead of
via the cpu_to_node macro.  This is preparation to moving it to the
per_cpu data area.

Signed-off-by: Mike Travis <travis@sgi.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-17 20:16:37 +02:00
..
boot [x86] remove uses of magic macros for boot_params access 2007-10-16 17:38:31 -07:00
crypto x86_64: move crypto 2007-10-11 11:17:03 +02:00
ia32 x86: remove STR() macros 2007-10-17 20:16:25 +02:00
kernel x86: fix cpu_to_node references 2007-10-17 20:16:37 +02:00
lib x86: rename .i assembler includes to .h 2007-10-17 20:16:29 +02:00
mach-default x86: clean up struct irqaction initializers 2007-10-17 20:16:06 +02:00
mach-es7000 i386: es7000 minor cleanups 2007-10-17 20:16:15 +02:00
mach-generic i386: make struct apic_probe static 2007-10-17 20:15:54 +02:00
mach-visws [x86] remove uses of magic macros for boot_params access 2007-10-16 17:38:31 -07:00
mach-voyager x86: misc. constifications 2007-10-17 20:16:08 +02:00
math-emu kbuild: fix up CFLAGS usage 2007-10-14 21:49:42 +02:00
mm x86: fix cpu_to_node references 2007-10-17 20:16:37 +02:00
oprofile i386: make Oprofile call shutdown() only once per session 2007-10-17 20:15:14 +02:00
pci x86: pci use pci=bfsort for HP DL385 G2 and DL585 G2 2007-10-17 20:15:46 +02:00
power i386: move power 2007-10-11 11:16:34 +02:00
vdso x86: Install unstripped copy of 64bit vdso to disk 2007-10-17 20:15:20 +02:00
video i386: move video 2007-10-11 11:16:56 +02:00
xen i386: Clean up duplicate includes in arch/i386/xen/ 2007-10-17 20:15:58 +02:00