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
Kbuild
Kbuild.asm KVM: export kvm_para.h 2009-09-10 10:46:47 +03:00
atomic-long.h
atomic.h asm-generic: don't warn that atomic_t is only 24 bit 2010-05-25 08:07:03 -07:00
atomic64.h
audit_change_attr.h
audit_dir_write.h
audit_read.h
audit_signal.h
audit_write.h
auxvec.h
bitops.h
bitsperlong.h
bug.h panic: Allow warnings to set different taint flags 2010-05-19 08:36:48 +01:00
bugs.h
cache.h
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
cmpxchg-local.h
cmpxchg.h
cputime.h cputime: Optimize jiffies_to_cputime(1) 2009-08-03 14:48:36 +02:00
current.h
delay.h
device.h
div64.h
dma-coherent.h
dma-mapping-broken.h
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
emergency-restart.h
errno-base.h
errno.h
fb.h
fcntl.h fix up O_SYNC comments 2009-12-17 11:03:24 -05:00
futex.h
getorder.h
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
ide_iops.h
int-l64.h
int-ll64.h
io.h
ioctl.h
ioctls.h
iomap.h
ipcbuf.h
irq.h
irq_regs.h
irqflags.h
kdebug.h
kmap_types.h include/asm-generic/kmap_types.h: add helpful reminder 2010-05-25 08:07:03 -07:00
libata-portmap.h
linkage.h
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
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
mmu_context.h
module.h
msgbuf.h
mutex-dec.h
mutex-null.h
mutex-xchg.h
mutex.h
page.h
param.h
parport.h
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
pgtable-nopmd.h
pgtable-nopud.h
pgtable.h
poll.h
posix_types.h
resource.h
rtc.h
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
sembuf.h
serial.h
setup.h
shmbuf.h
shmparam.h
siginfo.h HWPOISON: Add new SIGBUS error codes for hardware poison signals 2009-09-16 11:50:06 +02:00
signal-defs.h
signal.h
socket.h net: Generalize socket rx gap / receive queue overflow cmsg 2009-10-12 13:26:31 -07:00
sockios.h
spinlock.h
stat.h
statfs.h
string.h
swab.h
syscall.h asm-generic: syscall_get_nr returns int 2009-09-22 19:56:50 -07:00
syscalls.h
system.h
termbits.h
termios-base.h
termios.h
timex.h
tlb.h
tlbflush.h
topology.h numa: introduce numa_mem_id()- effective local memory node id 2010-05-27 09:12:57 -07:00
types.h
uaccess-unaligned.h
uaccess.h
ucontext.h
unaligned.h
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
vga.h
vmlinux.lds.h rapidio: modify initialization of switch operations 2010-05-27 09:12:51 -07:00
xor.h