Andi Kleen wrote:
> Even on real hardware it's also per CPU, although the errors
> are usually not big. At least the scheduler deals with that by
> only ever comparing time stamps from the same CPU.
>
Well, it uses sched_clock to measure how long something has been asleep,
which is inherently non-per-cpu. But it tries to keep a measure of the
skew between the various runqueue's sched_clocks, so the error doesn't
seem to get too large.
> If you have big deviations between CPUs then it might cause problems
> for non scheduler uses. I guess printk_clock is not critical, but
> it might be a little confusing.
They could be huge differences - unbounded, in fact. It would make
printk fairly hard to interpret, I would think. The only benefit to
using sched_clock in printk is that if you're using it to work out the
startup latencies you won't be confused by stolen time. But I think
that's a fairly small benefit compared to the disadvantage of not being
able to meaningfully compare the timestamps on two printk messages.
J
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]