Re: [PATCH printk v3 6/6] printk: introduce console_prepend_dropped() for dropped messages
From: John Ogness
Date: Tue Jan 03 2023 - 10:00:50 EST
On 2023-01-03, Petr Mladek <pmladek@xxxxxxxx> wrote:
>> Actually, I would like to rename all of those limit macros to something
>> that makes more sense for the new code base:
>>
>> CONSOLE_EXT_LOG_MAX -> CONSOLE_MESSAGE_MAX
>>
>> CONSOLE_LOG_MAX -> SYSLOG_MESSAGE_MAX
>
> Heh, we actually do not need this. The size of @scratchbuf
> might be LOG_LINE_MAX/PRINTK_RECORD_MAX. The scratch buffer
> is newly used only to read the plain message. The prefixes
> are added to @outbuf.
>
>> LOG_LINE_MAX -> PRINTK_RECORD_MAX
The scratch buffer would become PRINTK_RECORD_MAX, but we still need
SYSLOG_MESSAGE_MAX for the kmalloc's syslog buffers. Unless you think it
is OK to kmalloc 8KB instead of 1KB for the syslog calls. Then yes, we
do not need SYSLOG_MESSAGE_MAX.
John