[Ksummit-discuss] [TECH TOPIC] asynchronous printk

Steven Rostedt rostedt at goodmis.org
Thu Jul 28 02:55:14 UTC 2016


On Thu, 21 Jul 2016 11:36:42 +0100
David Woodhouse <dwmw2 at infradead.org> wrote:


> A viable solution to fix this might be a 'synchronous' flag on the
> console itself — so I could boot with 'console=ttyS0,synchronous' and
> get a debuggable system again, Or maybe it would be simpler to have a
> system-wide control which makes all consoles synchronous, if that's
> easier. Either way, we do need the option, and we need it to apply to
> *all* output, not just KERN_EMERG messages.
> 

For these cases I use, earlyprintk=ttyS0,keep

;-)

Actually, the RT patch has a option to force all printk()s to be
earlyprintk directly. I have a separate patch that has a special
spinlock to keep SMP from stomping all over the output. It's special
because it locks per CPU, if an NMI comes in while the current context
has the lock and is printing, it will corrupt the buffer being printed,
but I don't care at that moment. If NMI is doing printks, its message
will be more important anyway.

-- Steve



More information about the Ksummit-discuss mailing list