diff options
author | Mike Travis <travis@sgi.com> | 2011-05-24 20:13:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-25 11:39:48 -0400 |
commit | 162a7e7500f9664636e649ba59defe541b7c2c60 (patch) | |
tree | f44d4e480975d7f2c4bd4fd8625dbdb81eb04ade /init | |
parent | 95dde501907b06e7203c74f8435acfdab9eb2659 (diff) |
printk: allocate kernel log buffer earlier
On larger systems, because of the numerous ACPI, Bootmem and EFI messages,
the static log buffer overflows before the larger one specified by the
log_buf_len param is allocated. Minimize the overflow by allocating the
new log buffer as soon as possible.
On kernels without memblock, a later call to setup_log_buf from
kernel/init.c is the fallback.
[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: fix CONFIG_PRINTK=n build]
Signed-off-by: Mike Travis <travis@sgi.com>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Jack Steiner <steiner@sgi.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'init')
-rw-r--r-- | init/main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/init/main.c b/init/main.c index 22da33918aef..d2f1e086bf33 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -504,6 +504,7 @@ asmlinkage void __init start_kernel(void) | |||
504 | * These use large bootmem allocations and must precede | 504 | * These use large bootmem allocations and must precede |
505 | * kmem_cache_init() | 505 | * kmem_cache_init() |
506 | */ | 506 | */ |
507 | setup_log_buf(0); | ||
507 | pidhash_init(); | 508 | pidhash_init(); |
508 | vfs_caches_init_early(); | 509 | vfs_caches_init_early(); |
509 | sort_main_extable(); | 510 | sort_main_extable(); |