lkml.org 
[lkml]   [2021]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH next v3 07/15] printk: introduce CONSOLE_LOG_MAX for improved multi-line support
Date
Hi Geert,

On 2021-03-02, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Tue, Mar 2, 2021 at 2:54 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>> On Thu, Feb 25, 2021 at 9:30 PM John Ogness <john.ogness@linutronix.de> wrote:
>>> Instead of using "LOG_LINE_MAX + PREFIX_MAX" for temporary buffer
>>> sizes, introduce CONSOLE_LOG_MAX. This represents the maximum size
>>> that is allowed to be printed to the console for a single record.
>>>
>>> Rather than setting CONSOLE_LOG_MAX to "LOG_LINE_MAX + PREFIX_MAX"
>>> (1024), increase it to 4096. With a larger buffer size, multi-line
>>> records that are nearly LOG_LINE_MAX in length will have a better
>>> chance of being fully printed. (When formatting a record for the
>>> console, each line of a multi-line record is prepended with a copy
>>> of the prefix.)
>>>
>>> Signed-off-by: John Ogness <john.ogness@linutronix.de>
>>> Reviewed-by: Petr Mladek <pmladek@suse.com>
>>
>> Thanks for your patch!
>>
>> This increases kernel size by more than 3 KiB, which affects small
>> devices (e.g. SoCs with 10 MiB of SRAM inside).

Petr was concerned that this patch might raise issues for the small
devices.

>> Who is printing such long lines to the console?

Some printk users like to print large multi-line messages into a single
record. They can get pretty long. But since no one is complaining with
the current 1024, we can assume it is big enough.

For v4 I will return it back to 1024 bytes.

> BTW, printing a single line of 1024 characters to a serial console at
> 115200 bps takes almost 100 ms.

Yes. Although once we move to threaded printers, I don't think anyone
will care. Also, I think the netconsole will become quite attractive
when we move to threaded printers.

John Ogness

\
 
 \ /
  Last update: 2021-03-02 19:36    [W:0.055 / U:1.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site