lkml.org 
[lkml]   [2018]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] printk: inject caller information into the body of message
On (06/20/18 18:06), Sergey Senozhatsky wrote:
>
> b) printk_safe output is quite uncommon. And we flush per-CPU buffer
> from the same CPU which has caused printk_safe output [except for
> panic() flush] therefore logging the info available to log_store()
> seemed enough. IOW, once again, was a bit unsure if we want to add
> some complex code to already complex code, with just one potential
> user.

BTW, pr_cont() handling is not so simple when we are in printk_safe()
context. Unlike vprintk_emit() [normal printk], we don't use any
dedicated pr_cont() buffer in printk_safe. So, at a glance, I suspect
that injecting context info at every printk_safe_log_store() call for
`for (...) pr_cont()' loop is going to produce something like this:
I<10> 23 I<10> 43 I<10> 47 ....

// Hmm, maybe the line will endup having two prefixes. Once
// from printk_safe_log_store, the other from normal printk
// log_store().

While the same `for (...) pr_cont()' called from normal printk() context
will produce
I<10> 32 43 47 ....

It could be that I'm wrong.
Tetsuo, have you tested pr_cont() from printk_safe() context?

-ss

\
 
 \ /
  Last update: 2018-06-20 11:19    [W:0.125 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site