Re: [PATCH 0/3] make printk work again

From: Peter Zijlstra
Date: Wed Oct 19 2016 - 10:20:51 EST


On Wed, Oct 19, 2016 at 08:48:28PM +0900, Sergey Senozhatsky wrote:
> On (10/18/16 19:08), Peter Zijlstra wrote:
> > This basically fixes printk by evading everything it does.
> >
> > There's too many problems with printk, from sleeping locks to broken console
> > drivers. Stop using it.
> >
> > The early_console drivers are the most robust and simple, use those.
>
> ACK
>
> Can we also please ban that pre Because it's a bit tricky.emption thing?

Ha, so that's actually quite complicated. The 3rd patch does what is
simple and robust. Doing more gets very tricky real quick.

So actual preemption is disabled per get_cpu()/put_cpu(), and cross-cpu
interleaving is disabled by that 'lock'. But interrupt (and NMI) nesting
are still possible.

It does sporadically happen, but I've not really found it to be a
problem when reading the output.