lkml.org 
[lkml]   [2011]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Printk mulitple line message support
From
Date
On Tue, 2011-11-15 at 09:52 +0800, Huang Ying wrote:
> On Tue, 2011-11-15 at 09:18 +0800, Joe Perches wrote:
> > I believe you are not solving any real problem
> > with pr_<level>_ml.
> > Most all interleaved complete line uses have some
> > pr_fmt prefix that distinguishes between the sources.
> Except dev_<level> and netdev_<level>, it appears that many general
> pr_<level> do not have the prefix.

I'm working on that.
There are a lot of them and it's a slog.

> > A perhaps larger problem is interleaved partial
> > lines with pr_cont.
> In an interleaved situation, how to determine <level> for pr_cont?

pr_cont has its own KERN_CONT level, it's "<c>", which
is stripped from output by printk. It's used to continue
the previous printks output on a single line.

> > I believe that an initiator/terminator is necessary
> > for reassembly. Something that could be used
> > with pr_<level>, dev_<level>, netdev_<level>, et al.
> >
> > mp_start(&cookie)
> > pr_<level>(fmt, ...);
>
> Do not need cookie here?

Ideally not.

> > pr_mp_cont(&cookie, fmt, ...);
> > pr_mp_cont(&cookie, fmt "\n", ...);
> > mp_end(&cookie);
>
> With initiator/terminator the kernel log will be more structural, but
> that will make kernel log a little harder to read too.

Initiator/terminator would not be part of printk output
but could exist simply to set/track the atomic/cookie #
and have printk output the appropriate cookie id when
more than 1 cookie is active.




\
 
 \ /
  Last update: 2011-11-15 03:33    [W:0.059 / U:1.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site