Re: [PATCH] printk: inject caller information into the body of message
From: Sergey Senozhatsky
Date: Sun Sep 30 2018 - 22:58:39 EST
On (10/01/18 11:37), Sergey Senozhatsky wrote:
> If we are about to have a list of printk buffers then we probably can
> define a list of NR_CPUS cont buffers. And we probably can reuse the
> existing struct cont for buffered printk, having 2 different struct-s
> for the same thing - struct cont and struct printk_buffer - is not very
> cool.
And we also can re-use cont_add() / cont_flush() / etc.
Just pass a specific struct cont *cont to those functions.
> All printk()-s are limited by LOG_LINE_MAX. Buffered printk() is not
> special.
Correction: I was wrong about this.
Looking at cont handling, it seems that buffered printk is special after
all. We do let it to be over LOG_LINE_MAX:
if (nr_ext_console_drivers || cont.len + len > sizeof(cont.buf))
cont_flush();
-ss