lkml.org 
[lkml]   [2005]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: CONFIG_PRINTK_TIME woes
Nick Piggin <nickpiggin@yahoo.com.au> wrote:
>
> Andrew Morton wrote:
>
> >
> > yup.
> >
> >
> >>Why not use something like do_gettimeofday? (or I'm sure one
> >>of our time keepers can suggest the right thing to use).
> >
> >
> > do_gettimeofday() takes locks, so a) we can't do printk from inside it and
>
> Dang, yeah maybe this is the showstopper.
>
> > b) if you do a printk-from-interupt and the interrupted code was running
> > do_gettimeofday(), deadlock.
> >
>
> What about just using jiffies, then?
>
> Really, sched_clock() is very broken for this (I know you're
> not arguing against that).
>
> It can go backwards when called twice from the same CPU, and the
> number returned by one CPU need have no correlation with that
> returned by another.

jiffies wouldn't have sufficient resolution for this application. Bear in
mind that this is just a debugging thing - it's better to have good
resolution with occasional theoretical weirdness than to have poor
resolution plus super-consistency, IMO.

> However, I understand you probably just want something quick and
> dirty for 2.6.13 and would be happy just if it isn't more broken
> than before ;)

We're OK for 2.6.13, I think. ia64 people will quickly learn to not turn
the option on.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-08-21 23:38    [W:0.053 / U:4.096 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site