Re: [RFC][PATCH v6 0/2] printk: Make printk() completely async

From: Sergey Senozhatsky
Date: Sun Apr 24 2016 - 10:02:53 EST


On (04/24/16 15:35), Pavel Machek wrote:
[..]
> > > So... from basically linux 0.0, cli() printk("") could be used for
> > > debugging. ... and that's now gone. Right?
> > >
> > > Can you explain why that is good idea?
> >
> > it's not gone. you need to explicitly enable async printk mode. the case
> > you mentioned -- cli() printk("")->console_unlock() -- apart from being
> > useful in some scenarios, can cause problems in others, simply because
> > under some circumstances it can run forever, as long as there are printk()
> > calls coming from other CPUs (which can happen during, f.e., debugging).
> > did you mean UP systems? well, async printk is sort of useless on UP systems
> > anyway.
>
> Well, yes, it has been long known that printk() can take long
> time.. Still that's not a problem for smaller system.

well, embedded systems can have slow serial consoles (so
console_unlock()->call_consoles_drivers() endup in uart/etc
device driver). and small systems are the systems where I
see problems with printk.

> Now, patch set above says "Make printk() completely async" -- so I
> assumed that it does...

that's my bad, sorry. I didn't keep an eye on the cover letter
(except for the changelog).

-ss