Files
Linux/kernel
Sergey Senozhatsky 64ca752dcb printk: use console_trylock() in console_cpu_notify()
There is no need to always call blocking console_lock() in
console_cpu_notify(), it's quite possible that console_sem can
be locked by other CPU on the system, either already printing
or soon to begin printing the messages. console_lock() in this
case can simply block CPU hotplug for unknown period of time
(console_unlock() is time unbound). Not that hotplug is very
fast, but still, with other CPUs being online and doing
printk() console_cpu_notify() can stuck.

Use console_trylock() instead and opt-out if console_sem is
already acquired from another CPU, since that CPU will do
the printing for us.

Link: http://lkml.kernel.org/r/[email protected]
Cc: Steven Rostedt <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Sebastian Andrzej Siewior <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: [email protected]
Signed-off-by: Sergey Senozhatsky <[email protected]>
Signed-off-by: Petr Mladek <[email protected]>
2017-03-24 16:09:46 +01:00
..
…
…
2017-01-12 07:01:56 -07:00
…
…
…
…
…
2017-02-10 11:15:08 +01:00
…
…
2017-01-14 11:37:18 +01:00
…
…
…
2016-12-22 22:58:37 -05:00
…
2016-09-22 20:00:36 -05:00
2017-02-10 11:15:08 +01:00