]> git.karo-electronics.de Git - karo-tx-linux.git/commit
x86-32, numa: Move lowmem address space reservation to init_alloc_remap()
authorTejun Heo <tj@kernel.org>
Mon, 4 Apr 2011 22:23:55 +0000 (00:23 +0200)
committerH. Peter Anvin <hpa@zytor.com>
Thu, 7 Apr 2011 00:57:27 +0000 (17:57 -0700)
commit0e9f93c1c04c8ab10cc564df54a7ad0f83c67796
tree242d6e4d51866ef91b3c70bac4f3afdee31d0b21
parent82044c328d6f6b22882c2a936e487e6d2240817a
x86-32, numa: Move lowmem address space reservation to init_alloc_remap()

Remap alloc init is done in the following stages.

1. init_alloc_remap() calculates how much memory is necessary for each
   node and reserves node local memory.

2. initmem_init() collects how much each node needs and reserves a
   single contiguous lowmem area which can contain all.

3. init_remap_allocator() initializes allocator parameters from the
   determined lowmem address and per-node offsets.

4. Actual remap happens.

There is no reason for the lowmem remap area to be reserved as a
single contiguous area at one go.  They don't interact with each other
and the memblock allocator will put them side-by-side anyway.

This patch breaks up the single lowmem address reservation and put
per-node lowmem address reservation into init_alloc_remap() and
initializes allocator parameters directly in the function as all the
addresses are determined there.  This merges steps 2 and 3 into 1.

While at it, remove now largely irrelevant comments in
init_alloc_remap().

This change causes the following behavior changes.

* Remap lowmem areas are allocated in smaller per-node chunks.

* Remap lowmem area reservation failure fail future remap allocations
  instead of panicking.

* Remap allocator initialization is less verbose.

Signed-off-by: Tejun Heo <tj@kernel.org>
Link: http://lkml.kernel.org/r/1301955840-7246-10-git-send-email-tj@kernel.org
Acked-by: Yinghai Lu <yinghai@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
arch/x86/mm/numa_32.c