[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b38c6957-c3c1-54fc-781e-06d7eed6a9b1@i-love.sakura.ne.jp>
Date: Tue, 4 Dec 2018 06:10:40 +0900
From: Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
To: Petr Mladek <pmladek@...e.com>
Cc: Dmitry Vyukov <dvyukov@...gle.com>,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Steven Rostedt <rostedt@...dmis.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] printk: Add caller information to printk() output.
On 2018/12/04 0:06, Petr Mladek wrote:
>> If we modify print_time(), I think that the leading spaces inserted by "%5lu"
>> makes little sense, for "%5lu" is too small for systems with uptime >= 1.16 days
>> and parsers after all cannot assume fixed length for the timestamp field. Then,
>> we could change from "%5lu.%06lu" to "%lu.%06lu" so that parsers (like /bin/awk)
>> can get prefix part using white spaces as a delimiter.
>
> My primary concern was a human readability. The different header columns
> are separated by brackets and the message itself is separated by the space.
PID_MAX_LIMIT is 4194304, which can take up to 10 bytes if [T%u] is used.
But unless a race occurs, each series of printk() lines are printed with
same width. My concern is how to minimize number of characters written to
consoles, for writing to consoles are slow, and userspace usually uses
/dev/kmsg rather than netconsole as a source. For normal users who do not
need to directly parse console/netconsole output, saving spaces in the header
fields will be OK.
> /dev/kmsg uses key=value notation. It does not need any version. The
> version filed was intended for crashdump. It would make the life
> easier for its maintainers.
If the version field is for crashdump rather than for netconsole, we can
get it from some vmcoreinfo variable rather than appending to every record.
Powered by blists - more mailing lists