lkml.org 
[lkml]   [2014]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] printk: Print cpu number along with time
On Fri, Apr 25, 2014 at 12:12:06AM +0200, Jiri Kosina wrote:
> On Thu, 24 Apr 2014, Greg Kroah-Hartman wrote:
>
> > > +#ifdef CONFIG_PRINTK_CPU
> > > + if (!buf)
> > > + return snprintf(NULL, 0, "[%5lu.000000,%02x] ",
> >
> > %02x for a cpu? What happens on machines with 8k cpus?
>
> Ummm ... what issue do you see here, Greg? It'll print 0x1f40, no?

Yes, just not be as "pretty" and aligned properly :)

> > And is this really an issue? Debugging by using printk is fun, but not
> > really something that people need to add a cpu number to. Why not just
> > use a tracepoint in your code to get the needed information instead?
>
> Well, if you have dmesg dump from panic that happens every other year, and
> you have to do post-mortem analysis on it, I am pretty sure you would love
> to be able to figure out how the stack traces would look like without
> inter-CPU interleaving. And I am pretty sure you wouldn't want to
> insert/enable a tracepoint and wait another two years for the bug to
> trigger again.

Fair enough, and the multi-oops message drives that home.

But does this break things like 'dmesg --human' mode that is in
util-linux?

thanks,

greg k-h


\
 
 \ /
  Last update: 2014-04-26 21:01    [W:0.092 / U:0.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site