History

Merge branch 'akpm' (patches from Andrew)

Merge yet more updates from Andrew Morton: "A few final bits: - large changes to vmalloc, yielding large performance benefits - tweak the console-flush-on-panic code - a few fixes" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: panic: add an option to replay all the printk message in buffer initramfs: don't free a non-existent initrd fs/writeback.c: use rcu_barrier() to wait for inflight wb switches going into workqueue when umount mm/compaction.c: correct zone boundary handling when isolating pages from a pageblock mm/vmap: add DEBUG_AUGMENT_LOWEST_MATCH_CHECK macro mm/vmap: add DEBUG_AUGMENT_PROPAGATE_CHECK macro mm/vmalloc.c: keep track of free blocks for vmap allocation

Linus Torvalds committed 7 years ago

Commit cb6f8732 parents ff8583d de6da1e10 files · +889 −257Browse files

Showing the changes to kernel (2 of 10 files). Show all

Unified · Split

2 files
  1. kernel/panic.c +5 −1
  2. kernel/printk/printk.c +11 −1
kernel/panic.c+5−1
@@ -51,6 +51,7 @@ EXPORT_SYMBOL_GPL(panic_timeout); · 50 unmodified lines
51#define PANIC_PRINT_TIMER_INFO 0x0000000451#define PANIC_PRINT_TIMER_INFO 0x00000004
52#define PANIC_PRINT_LOCK_INFO 0x0000000852#define PANIC_PRINT_LOCK_INFO 0x00000008
53#define PANIC_PRINT_FTRACE_INFO 0x0000001053#define PANIC_PRINT_FTRACE_INFO 0x00000010
54#define PANIC_PRINT_ALL_PRINTK_MSG 0x00000020
54unsigned long panic_print;55unsigned long panic_print;
55 56
56ATOMIC_NOTIFIER_HEAD(panic_notifier_list);57ATOMIC_NOTIFIER_HEAD(panic_notifier_list);
@@ -134,6 +135,9 @@ EXPORT_SYMBOL(nmi_panic); · 77 unmodified lines
134 135
135static void panic_print_sys_info(void)136static void panic_print_sys_info(void)
136{137{
138 if (panic_print & PANIC_PRINT_ALL_PRINTK_MSG)
139 console_flush_on_panic(CONSOLE_REPLAY_ALL);
140
137 if (panic_print & PANIC_PRINT_TASK_INFO)141 if (panic_print & PANIC_PRINT_TASK_INFO)
138 show_state();142 show_state();
139 143
@@ -277,7 +281,7 @@ void panic(const char *fmt, ...) · 137 unmodified lines
277 * panic() is not being callled from OOPS.281 * panic() is not being callled from OOPS.
278 */282 */
279 debug_locks_off();283 debug_locks_off();
280 console_flush_on_panic();284 console_flush_on_panic(CONSOLE_FLUSH_PENDING);
281 285
282 panic_print_sys_info();286 panic_print_sys_info();
283 287
kernel/printk/printk.c+11−1
@@ -2535,10 +2535,11 @@ void console_unblank(void) · 2534 unmodified lines
2535 2535
2536/**2536/**
2537 * console_flush_on_panic - flush console content on panic2537 * console_flush_on_panic - flush console content on panic
2538 * @mode: flush all messages in buffer or just the pending ones
2538 *2539 *
2539 * Immediately output all pending messages no matter what.2540 * Immediately output all pending messages no matter what.
2540 */2541 */
2541void console_flush_on_panic(void)2542void console_flush_on_panic(enum con_flush_mode mode)
2542{2543{
2543 /*2544 /*
2544 * If someone else is holding the console lock, trylock will fail2545 * If someone else is holding the console lock, trylock will fail
@@ -2549,6 +2550,15 @@ void console_flush_on_panic(void) · 4 unmodified lines
2549 */2550 */
2550 console_trylock();2551 console_trylock();
2551 console_may_schedule = 0;2552 console_may_schedule = 0;
2553
2554 if (mode == CONSOLE_REPLAY_ALL) {
2555 unsigned long flags;
2556
2557 logbuf_lock_irqsave(flags);
2558 console_seq = log_first_seq;
2559 console_idx = log_first_idx;
2560 logbuf_unlock_irqrestore(flags);
2561 }
2552 console_unlock();2562 console_unlock();
2553}2563}
2554 2564