Skip to content
  1. Jun 12, 2009
    • Pekka Enberg's avatar
      vt: use kzalloc() instead of the bootmem allocator · a5f4f52e
      Pekka Enberg authored
      
      
      Now that kmem_cache_init() happens before console_init(), we should use
      kzalloc() and not the bootmem allocator.
      
      Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
      a5f4f52e
    • Pekka Enberg's avatar
      sched: use kzalloc() instead of the bootmem allocator · 36b7b6d4
      Pekka Enberg authored
      
      
      Now that kmem_cache_init() happens before sched_init(), we should use kzalloc()
      and not the bootmem allocator.
      
      Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
      36b7b6d4
    • Pekka Enberg's avatar
      init: introduce mm_init() · 444f478f
      Pekka Enberg authored
      
      
      As suggested by Christoph Lameter, introduce mm_init() now that we initialize
      all the kernel memory allocations together.
      
      Cc: Christoph Lameter <cl@linux-foundation.org>
      Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
      444f478f
    • Pekka Enberg's avatar
      vmalloc: use kzalloc() instead of alloc_bootmem() · 43ebdac4
      Pekka Enberg authored
      
      
      We can call vmalloc_init() after kmem_cache_init() and use kzalloc() instead of
      the bootmem allocator when initializing vmalloc data structures.
      
      Acked-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Acked-by: default avatarNick Piggin <npiggin@suse.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
      43ebdac4
    • Pekka Enberg's avatar
      slab: setup allocators earlier in the boot sequence · 83b519e8
      Pekka Enberg authored
      
      
      This patch makes kmalloc() available earlier in the boot sequence so we can get
      rid of some bootmem allocations. The bulk of the changes are due to
      kmem_cache_init() being called with interrupts disabled which requires some
      changes to allocator boostrap code.
      
      Note: 32-bit x86 does WP protect test in mem_init() so we must setup traps
      before we call mem_init() during boot as reported by Ingo Molnar:
      
        We have a hard crash in the WP-protect code:
      
        [    0.000000] Checking if this processor honours the WP bit even in supervisor mode...BUG: Int 14: CR2 ffcff000
        [    0.000000]      EDI 00000188  ESI 00000ac7  EBP c17eaf9c  ESP c17eaf8c
        [    0.000000]      EBX 000014e0  EDX 0000000e  ECX 01856067  EAX 00000001
        [    0.000000]      err 00000003  EIP c10135b1   CS 00000060  flg 00010002
        [    0.000000] Stack: c17eafa8 c17fd410 c16747bc c17eafc4 c17fd7e5 000011fd f8616000 c18237cc
        [    0.000000]        00099800 c17bb000 c17eafec c17f1668 000001c5 c17f1322 c166e039 c1822bf0
        [    0.000000]        c166e033 c153a014 c18237cc 00020800 c17eaff8 c17f106a 00020800 01ba5003
        [    0.000000] Pid: 0, comm: swapper Not tainted 2.6.30-tip-02161-g7a74539-dirty #52203
        [    0.000000] Call Trace:
        [    0.000000]  [<c15357c2>] ? printk+0x14/0x16
        [    0.000000]  [<c10135b1>] ? do_test_wp_bit+0x19/0x23
        [    0.000000]  [<c17fd410>] ? test_wp_bit+0x26/0x64
        [    0.000000]  [<c17fd7e5>] ? mem_init+0x1ba/0x1d8
        [    0.000000]  [<c17f1668>] ? start_kernel+0x164/0x2f7
        [    0.000000]  [<c17f1322>] ? unknown_bootoption+0x0/0x19c
        [    0.000000]  [<c17f106a>] ? __init_begin+0x6a/0x6f
      
      Acked-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Acked-by Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Christoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Matt Mackall <mpm@selenic.com>
      Cc: Nick Piggin <npiggin@suse.de>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
      83b519e8
    • Pekka Enberg's avatar
      bootmem: fix slab fallback on numa · c91c4773
      Pekka Enberg authored
      
      
      If the user requested bootmem allocation on a specific node, we should use
      kzalloc_node() for the fallback allocation.
      
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
      c91c4773
    • Pekka Enberg's avatar
      bootmem: use slab if bootmem is no longer available · 441c7e0a
      Pekka Enberg authored
      
      
      As a preparation for initializing the slab allocator early, make sure the
      bootmem allocator does not crash and burn if someone calls it after slab is up;
      otherwise we'd need a flag day for switching to early slab.
      
      Acked-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Christoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Matt Mackall <mpm@selenic.com>
      Cc: Nick Piggin <npiggin@suse.de>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
      441c7e0a
  2. Jun 11, 2009
  3. Jun 10, 2009