Re: [PATCH 2/3] dyntick - Fix lost tick calculation in timer pm.c

From: john stultz
Date: Fri Sep 02 2005 - 16:22:57 EST


On Fri, 2005-09-02 at 22:18 +0200, Thomas Schlichter wrote:
> 2. Can we really assure that the monotonic clock is still monotonic?
> I think with your new code we estimate the monotonic clock value and the
> offset_last at the last tick.
> But if we underestimate monotonic_base or overestimate offset_last (even
> simply by rounding errors), the time will make a small step backwards with
> the value-update.
> And as far as I understand the monotonic clock its not that bad if it drifts a
> bit, but it is really bad if time makes steps backward...
>
> But maybe you can show me that I am wrong with my second point.
> I hope I don't bother you too much with this kind of stuff...
>
> Thomas
>
> P.S.: I CC'd John because he knows the monotonic clock better than I do... :-)


Thanks Thomas, that's a good catch. Since monotonic_clock has no real
notion of interrupt edges (it was designed to be constant regardless if
we miss ticks), I would keep accumulating the full inter-tick intervals
converted to usecs into the monotonic_base.

thanks
-john


-
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/