Re: [RFC patch 15/15] LTTng timestamp x86
From: Ingo Molnar
Date: Sat Oct 18 2008 - 13:50:54 EST
* Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
> And if you make all these linear interpolations be per-CPU (so you
> have per-CPU offsets and frequencies) you never _ever_ need to touch
> any shared data at all, and you know you can scale basically
> Your linear interpolations may not be _perfect_, but you'll be able to
> get them pretty damn near. In fact, even if the TSC's aren't
> synchronized at all, if they are at least _individually_ stable (just
> running at slightly different frequencies because they are in
> different clock domains, and/or at different start points), you can
> basically perfect the precision over time.
there's been code submitted by Michael Davidson recently that looked
interesting, which turns the TSC into such an entity:
The periodic synchronization uses the hpet, but it thus allows lockless
and globally correct readouts of the TSC .
And that would match the long term goal as well: the hw should do this
all automatically. So perhaps we should have a trace_clock() after all,
independent of sched_clock(), and derived straight from RDTSC.
The approach as propoed has a couple of practical problems, but if we
could be one RDTSC+multiplication away from a pretty good timestamp that
would be rather useful, very fast and very robust ...
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/