]> git.karo-electronics.de Git - linux-beck.git/commit
memblock: NUMA allocate can now use early_pfn_map
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 6 Jul 2010 22:39:16 +0000 (15:39 -0700)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 5 Aug 2010 02:56:23 +0000 (12:56 +1000)
commitc196f76fd5ece716ee3b7fa5dda3576961c0cecc
tree7687dbae04327ed56bec60b21667eea66a9e52b4
parentfef501d49d31f997a3381b6c1efd5bca382b6b6f
memblock: NUMA allocate can now use early_pfn_map

We now provide a default (weak) implementation of memblock_nid_range()
which uses the early_pfn_map[] if CONFIG_ARCH_POPULATES_NODE_MAP
is set. Sparc still needs to use its own method due to the way
the pages can be scattered between nodes.

This implementation is inefficient due to our main algorithm and
callback construct wanting to work on an ascending addresses bases
while early_pfn_map[] would rather work with nid's (it's unsorted
at that stage). But it should work and we can look into improving
it subsequently, possibly using arch compile options to chose a
different algorithm alltogether.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
include/linux/memblock.h
mm/memblock.c