Re: printk: what is going on with additional newlines?

From: Tetsuo Handa
Date: Tue Sep 05 2017 - 08:35:48 EST


Petr Mladek wrote:
> Some of these problems would be solved by a custom buffer.
> But you are right. There are less guarantees that it would
> get flushed or that it can be found in case of troubles.
> Now, I am not sure that it is a good idea to use it even
> for a single continuous line.
>
> I wonder if all this is worth the effort, complexity, and risk.
> We are talking about cosmetic problems after all.
>
> Well, what do you think about the extra printed information?
> For example:
>
> <timestamp> <PID> <context> message
>
> It looks straightforward to me. These information
> might be helpful on its own. So, it might be a
> win-win solution.

Yes, if buffering multiple lines will not be implemented, I do want
printk context identifier field for each line. I think <PID> <context>
part will be something like TASK#pid (if outside interrupt) or
CPU#cpunum/#irqlevel (if inside interrupt).