1
0
Fork 0
alistair23-linux/include/asm-generic
Lee Schermerhorn 7aac789885 numa: introduce numa_mem_id()- effective local memory node id
Introduce numa_mem_id(), based on generic percpu variable infrastructure
to track "nearest node with memory" for archs that support memoryless
nodes.

Define API in <linux/topology.h> when CONFIG_HAVE_MEMORYLESS_NODES
defined, else stubs.  Architectures will define HAVE_MEMORYLESS_NODES
if/when they support them.

Archs can override definitions of:

numa_mem_id() - returns node number of "local memory" node
set_numa_mem() - initialize [this cpus'] per cpu variable 'numa_mem'
cpu_to_mem()  - return numa_mem for specified cpu; may be used as lvalue

Generic initialization of 'numa_mem' occurs in __build_all_zonelists().
This will initialize the boot cpu at boot time, and all cpus on change of
numa_zonelist_order, or when node or memory hot-plug requires zonelist
rebuild.  Archs that support memoryless nodes will need to initialize
'numa_mem' for secondary cpus as they're brought on-line.

[akpm@linux-foundation.org: fix build]
Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Signed-off-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Nick Piggin <npiggin@suse.de>
Cc: David Rientjes <rientjes@google.com>
Cc: Eric Whitney <eric.whitney@hp.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-27 09:12:57 -07:00
..
bitops arch, hweight: Fix compilation errors 2010-05-04 10:25:27 -07:00
4level-fixup.h mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() 2009-07-27 12:10:38 -07:00
Kbuild asm-generic: add a generic unistd.h 2009-06-11 21:02:16 +02:00
Kbuild.asm KVM: export kvm_para.h 2009-09-10 10:46:47 +03:00
atomic-long.h asm-generic: merge branch 'master' of torvalds/linux-2.6 2009-06-12 11:32:58 +02:00
atomic.h asm-generic: don't warn that atomic_t is only 24 bit 2010-05-25 08:07:03 -07:00
atomic64.h lib: Provide generic atomic64_t implementation 2009-06-15 13:27:38 +10:00
audit_change_attr.h [PATCH] fix missing ifdefs in syscall classes hookup for generic targets 2006-09-22 17:48:56 -07:00
audit_dir_write.h [PATCH] fix missing ifdefs in syscall classes hookup for generic targets 2006-09-22 17:48:56 -07:00
audit_read.h [PATCH] audit: more syscall classes added 2006-09-11 13:32:27 -04:00
audit_signal.h [PATCH] add SIGNAL syscall class (v3) 2007-05-11 05:38:25 -04:00
audit_write.h [PATCH] asm/generic: fix bug - kernel fails to build when enable some common audit code on Blackfin 2008-12-09 02:27:39 -05:00
auxvec.h asm-generic: add generic ABI headers 2009-06-11 21:02:15 +02:00
bitops.h asm-generic: make bitops.h usable 2009-06-11 21:02:31 +02:00
bitsperlong.h asm-generic: introduce asm/bitsperlong.h 2009-06-11 21:02:14 +02:00
bug.h panic: Allow warnings to set different taint flags 2010-05-19 08:36:48 +01:00
bugs.h asm-generic: add generic versions of common headers 2009-06-11 21:02:37 +02:00
cache.h asm-generic: add generic NOMMU versions of some headers 2009-06-11 21:02:50 +02:00
cacheflush.h block: add helpers to run flush_dcache_page() against a bio and a request's pages 2009-11-26 09:16:19 +01:00
checksum.h add generic lib/checksum.c 2009-06-11 21:02:51 +02:00
cmpxchg-local.h Add cmpxchg_local to asm-generic for per cpu atomic operations 2008-02-07 08:42:30 -08:00
cmpxchg.h Add cmpxchg_local to asm-generic for per cpu atomic operations 2008-02-07 08:42:30 -08:00
cputime.h cputime: Optimize jiffies_to_cputime(1) 2009-08-03 14:48:36 +02:00
current.h asm-generic: add generic versions of common headers 2009-06-11 21:02:37 +02:00
delay.h asm-generic: add generic versions of common headers 2009-06-11 21:02:37 +02:00
device.h Driver Core: Add platform device arch data V3 2009-07-22 00:28:38 +02:00
div64.h rename div64_64 to div64_u64 2008-05-01 08:03:58 -07:00
dma-coherent.h generic: per-device coherent dma allocator 2008-06-30 12:51:05 +02:00
dma-mapping-broken.h dma-mapping: add the device argument to dma_mapping_error() 2008-07-26 12:00:03 -07:00
dma-mapping-common.h dma-mapping: remove unnecessary sync_single_range_* in dma_map_ops 2010-05-27 09:12:52 -07:00
dma.h asm-generic: add legacy I/O header files 2009-06-11 21:02:42 +02:00
emergency-restart.h [PATCH] Add emergency_restart() 2005-07-26 14:35:41 -07:00
errno-base.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
errno.h cfg80211: add rfkill support 2009-06-03 14:06:14 -04:00
fb.h asm-generic: add generic versions of common headers 2009-06-11 21:02:37 +02:00
fcntl.h fix up O_SYNC comments 2009-12-17 11:03:24 -05:00
futex.h remove __KERNEL__ tests of unexported headers under asm-generic/ 2008-04-30 08:29:54 -07:00
getorder.h asm-generic: rename page.h and uaccess.h 2009-06-11 21:02:17 +02:00
gpio.h gpiolib: introduce set_debounce method 2010-05-27 09:12:42 -07:00
hardirq.h IRQ: Change __softirq_pending to unsigned int in asm-generic/hardirq.h. 2009-10-09 13:38:21 -07:00
hw_irq.h asm-generic: add legacy I/O header files 2009-06-11 21:02:42 +02:00
ide_iops.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
int-l64.h asm-generic: introduce asm/bitsperlong.h 2009-06-11 21:02:14 +02:00
int-ll64.h asm-generic: introduce asm/bitsperlong.h 2009-06-11 21:02:14 +02:00
io.h asm-generic: add generic atomic.h and io.h 2009-06-11 21:02:49 +02:00
ioctl.h Make ioctl.h compatible with userland 2008-08-12 16:07:31 -07:00
ioctls.h asm-generic: add generic ABI headers 2009-06-11 21:02:15 +02:00
iomap.h generic: add ioremap_wc() interface wrapper 2008-04-24 23:40:47 +02:00
ipcbuf.h asm-generic: add generic sysv ipc headers 2009-06-11 21:02:15 +02:00
irq.h asm-generic: add generic versions of common headers 2009-06-11 21:02:37 +02:00
irq_regs.h IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
irqflags.h asm-generic: add generic versions of common headers 2009-06-11 21:02:37 +02:00
kdebug.h asm-generic: define DIE_OOPS in asm-generic 2008-10-27 11:39:03 +01:00
kmap_types.h include/asm-generic/kmap_types.h: add helpful reminder 2010-05-25 08:07:03 -07:00
libata-portmap.h libata-portmap: Remove unused definitions 2007-10-12 14:55:37 -04:00
linkage.h asm-generic: add generic versions of common headers 2009-06-11 21:02:37 +02:00
local.h local_t: Remove cpu_local_xx macros 2010-01-05 15:34:49 +09:00
memory_model.h tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
mm_hooks.h [PATCH] x86: PARAVIRT: add hooks to intercept mm creation and destruction 2007-05-02 19:27:14 +02:00
mman-common.h HWPOISON: Add a madvise() injector for soft page offlining 2009-12-16 12:20:00 +01:00
mman.h mm: add MAP_HUGETLB for mmaping pseudo-anonymous huge page regions 2009-09-22 07:17:41 -07:00
mmu.h asm-generic: add generic NOMMU versions of some headers 2009-06-11 21:02:50 +02:00
mmu_context.h asm-generic: add generic NOMMU versions of some headers 2009-06-11 21:02:50 +02:00
module.h asm-generic: add generic versions of common headers 2009-06-11 21:02:37 +02:00
msgbuf.h asm-generic: add generic sysv ipc headers 2009-06-11 21:02:15 +02:00
mutex-dec.h mutex: speed up generic mutex implementations 2008-10-23 09:18:20 -07:00
mutex-null.h fix file specification in comments 2006-10-03 23:01:26 +02:00
mutex-xchg.h mutex: speed up generic mutex implementations 2008-10-23 09:18:20 -07:00
mutex.h asm-generic: add generic versions of common headers 2009-06-11 21:02:37 +02:00
page.h asm-generic: add generic NOMMU versions of some headers 2009-06-11 21:02:50 +02:00
param.h asm-generic: add generic ABI headers 2009-06-11 21:02:15 +02:00
parport.h asm-generic: add legacy I/O header files 2009-06-11 21:02:42 +02:00
pci-dma-compat.h dma-mapping: pci: move pci_set_dma_mask and pci_set_consistent_dma_mask to pci-dma-compat.h 2010-03-12 15:52:42 -08:00
pci.h PCI: remove pcibios_scan_all_fns() 2009-09-09 13:29:18 -07:00
percpu.h percpu: make accessors check for percpu pointer in sparse 2009-10-29 22:34:15 +09:00
pgalloc.h asm-generic: add generic NOMMU versions of some headers 2009-06-11 21:02:50 +02:00
pgtable-nopmd.h mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() 2009-07-27 12:10:38 -07:00
pgtable-nopud.h mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() 2009-07-27 12:10:38 -07:00
pgtable.h asm-generic: add dummy pgprot_noncached() 2009-06-23 14:34:30 +02:00
poll.h Consolidate asm/poll.h 2007-05-11 08:29:34 -07:00
posix_types.h asm-generic: add generic ABI headers 2009-06-11 21:02:15 +02:00
resource.h sched: SCHED_FIFO/SCHED_RR watchdog timer 2008-01-25 21:08:27 +01:00
rtc.h asm-generic: make get_rtc_time overridable 2009-06-11 21:02:18 +02:00
scatterlist.h asm-generic: remove ARCH_HAS_SG_CHAIN in scatterlist.h 2010-05-27 09:12:54 -07:00
sections.h asm/sections: add text/data checking functions for arches to override 2009-09-23 07:39:30 -07:00
segment.h asm-generic: add generic NOMMU versions of some headers 2009-06-11 21:02:50 +02:00
sembuf.h asm-generic: add generic sysv ipc headers 2009-06-11 21:02:15 +02:00
serial.h asm-generic: add legacy I/O header files 2009-06-11 21:02:42 +02:00
setup.h asm-generic: add generic ABI headers 2009-06-11 21:02:15 +02:00
shmbuf.h asm-generic: add generic sysv ipc headers 2009-06-11 21:02:15 +02:00
shmparam.h asm-generic: add generic sysv ipc headers 2009-06-11 21:02:15 +02:00
siginfo.h HWPOISON: Add new SIGBUS error codes for hardware poison signals 2009-09-16 11:50:06 +02:00
signal-defs.h asm-generic: rename termios.h, signal.h and mman.h 2009-06-11 21:01:52 +02:00
signal.h asm-generic: add generic ABI headers 2009-06-11 21:02:15 +02:00
socket.h net: Generalize socket rx gap / receive queue overflow cmsg 2009-10-12 13:26:31 -07:00
sockios.h asm-generic: add generic ABI headers 2009-06-11 21:02:15 +02:00
spinlock.h asm-generic: add generic versions of common headers 2009-06-11 21:02:37 +02:00
stat.h asm-generic: add generic ABI headers 2009-06-11 21:02:15 +02:00
statfs.h remove __KERNEL_STRICT_NAMES 2009-03-26 18:14:21 +01:00
string.h asm-generic: add generic versions of common headers 2009-06-11 21:02:37 +02:00
swab.h asm-generic: add generic ABI headers 2009-06-11 21:02:15 +02:00
syscall.h asm-generic: syscall_get_nr returns int 2009-09-22 19:56:50 -07:00
syscalls.h asm-generic: add generic versions of common headers 2009-06-11 21:02:37 +02:00
system.h asm-generic: add generic versions of common headers 2009-06-11 21:02:37 +02:00
termbits.h asm-generic: add generic ABI headers 2009-06-11 21:02:15 +02:00
termios-base.h asm-generic: rename termios.h, signal.h and mman.h 2009-06-11 21:01:52 +02:00
termios.h asm-generic: add generic ABI headers 2009-06-11 21:02:15 +02:00
timex.h asm-generic: add legacy I/O header files 2009-06-11 21:02:42 +02:00
tlb.h mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() 2009-07-27 12:10:38 -07:00
tlbflush.h asm-generic: add generic NOMMU versions of some headers 2009-06-11 21:02:50 +02:00
topology.h numa: introduce numa_mem_id()- effective local memory node id 2010-05-27 09:12:57 -07:00
types.h asm-generic: add generic ABI headers 2009-06-11 21:02:15 +02:00
uaccess-unaligned.h asm-generic: rename page.h and uaccess.h 2009-06-11 21:02:17 +02:00
uaccess.h asm-generic: uaccess: fix up local access_ok() usage 2009-06-19 14:58:08 +02:00
ucontext.h asm-generic: add generic ABI headers 2009-06-11 21:02:15 +02:00
unaligned.h asm-generic: add generic versions of common headers 2009-06-11 21:02:37 +02:00
unistd.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic 2009-12-11 20:57:31 -08:00
user.h asm-generic: add generic versions of common headers 2009-06-11 21:02:37 +02:00
vga.h asm-generic: add legacy I/O header files 2009-06-11 21:02:42 +02:00
vmlinux.lds.h rapidio: modify initialization of switch operations 2010-05-27 09:12:51 -07:00
xor.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00