[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190213014141.GB8097@jagdpanzerIV>
Date: Wed, 13 Feb 2019 10:41:41 +0900
From: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To: John Ogness <john.ogness@...utronix.de>
Cc: linux-kernel@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
Petr Mladek <pmladek@...e.com>,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
Steven Rostedt <rostedt@...dmis.org>,
Daniel Wang <wonderfly@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Alan Cox <gnomes@...rguk.ukuu.org.uk>,
Jiri Slaby <jslaby@...e.com>,
Peter Feiner <pfeiner@...gle.com>,
linux-serial@...r.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Subject: Re: [RFC PATCH v1 00/25] printk: new implementation
On (02/12/19 15:29), John Ogness wrote:
> - console_flush_on_panic() currently is a NOP. It is pretty clear how
> this could be implemented if atomic_write was available. But if no
> such console is registered, it is not clear what should be done. Is
> this function really even needed?
If you now rely on a fully preemptible printk kthread to flush
pending logbuf messages, then console_flush_on_panic() is your
only chance to see those pending logbuf messages on the serial
console when the system dies.
Non-atomic consoles should become atomic once you call bust_spinlocks(1),
this is what we currently have:
panic()
bust_spinlocks(1) // sets oops_in_progress
console_flush_on_panic()
call_console_drivers()
-> serial_driver_write()
if (oops_in_progress)
locked = spin_trylock_irqsave(&port->lock);
uart_console_write();
if (locked)
spin_unlock_irqrestore(&port->lock);
-ss
Powered by blists - more mailing lists