diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2018-09-06 07:25:59 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-09-06 07:25:59 -0700 |
| commit | 356bd90ee7d4caac787e2c4c9da68b585b7cf48b (patch) | |
| tree | 8c082b2255fcabb8f294688e43aa9376f1ad4678 | |
| parent | 42b8b553094efabd099b9935883b728f4c519047 (diff) | |
| parent | 20f23e546e28898062efb3ed6c7e6f7a5585c099 (diff) | |
Merge "printk: Make the console flush configurable in hotplug path"
| -rw-r--r-- | init/Kconfig | 10 | ||||
| -rw-r--r-- | kernel/printk/printk.c | 6 |
2 files changed, 16 insertions, 0 deletions
diff --git a/init/Kconfig b/init/Kconfig index ec2342b3befe..a73b64531d69 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -850,6 +850,16 @@ config LOG_BUF_SHIFT 13 => 8 KB 12 => 4 KB +config CONSOLE_FLUSH_ON_HOTPLUG + bool "Enable console flush configurable in hot plug code path" + depends on HOTPLUG_CPU + def_bool n + help + In cpu hot plug path console lock acquire and release causes the + console to flush. If console lock is not free hot plug latency + increases. So make console flush configurable in hot plug path + and default disabled to help in cpu hot plug latencies. + config LOG_CPU_MAX_BUF_SHIFT int "CPU kernel log buffer size contribution (13 => 8 KB, 17 => 128KB)" depends on SMP diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index dca87791e9c1..da573aeaeb12 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -2119,6 +2119,8 @@ void resume_console(void) console_unlock(); } +#ifdef CONFIG_CONSOLE_FLUSH_ON_HOTPLUG + /** * console_cpu_notify - print deferred console messages after CPU hotplug * @self: notifier struct @@ -2148,6 +2150,8 @@ static int console_cpu_notify(struct notifier_block *self, return NOTIFY_OK; } +#endif + /** * console_lock - lock the console system for exclusive use. * @@ -2712,7 +2716,9 @@ static int __init printk_late_init(void) unregister_console(con); } } +#ifdef CONFIG_CONSOLE_FLUSH_ON_HOTPLUG hotcpu_notifier(console_cpu_notify, 0); +#endif return 0; } late_initcall(printk_late_init); |
