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
Showing the changes to kernel (2 of 10 files). Show all
Unified · Split
| @@ -51,6 +51,7 @@ EXPORT_SYMBOL_GPL(panic_timeout); · 50 unmodified lines | ||
| 51 | 51 | #define PANIC_PRINT_TIMER_INFO 0x00000004 |
| 52 | 52 | #define PANIC_PRINT_LOCK_INFO 0x00000008 |
| 53 | 53 | #define PANIC_PRINT_FTRACE_INFO 0x00000010 |
| 54 | +#define PANIC_PRINT_ALL_PRINTK_MSG 0x00000020 | |
| 54 | 55 | unsigned long panic_print; |
| 55 | 56 | |
| 56 | 57 | ATOMIC_NOTIFIER_HEAD(panic_notifier_list); |
| @@ -134,6 +135,9 @@ EXPORT_SYMBOL(nmi_panic); · 77 unmodified lines | ||
| 134 | 135 | |
| 135 | 136 | static 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 | 141 | if (panic_print & PANIC_PRINT_TASK_INFO) |
| 138 | 142 | show_state(); |
| 139 | 143 | |
| @@ -277,7 +281,7 @@ void panic(const char *fmt, ...) · 137 unmodified lines | ||
| 277 | 281 | * panic() is not being callled from OOPS. |
| 278 | 282 | */ |
| 279 | 283 | debug_locks_off(); |
| 280 | − console_flush_on_panic(); | |
| 284 | + console_flush_on_panic(CONSOLE_FLUSH_PENDING); | |
| 281 | 285 | |
| 282 | 286 | panic_print_sys_info(); |
| 283 | 287 | |
| @@ -2535,10 +2535,11 @@ void console_unblank(void) · 2534 unmodified lines | ||
| 2535 | 2535 | |
| 2536 | 2536 | /** |
| 2537 | 2537 | * console_flush_on_panic - flush console content on panic |
| 2538 | + * @mode: flush all messages in buffer or just the pending ones | |
| 2538 | 2539 | * |
| 2539 | 2540 | * Immediately output all pending messages no matter what. |
| 2540 | 2541 | */ |
| 2541 | −void console_flush_on_panic(void) | |
| 2542 | +void console_flush_on_panic(enum con_flush_mode mode) | |
| 2542 | 2543 | { |
| 2543 | 2544 | /* |
| 2544 | 2545 | * 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 | 2551 | console_trylock(); |
| 2551 | 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 | 2562 | console_unlock(); |
| 2553 | 2563 | } |
| 2554 | 2564 | |