Messages in this thread | | | Subject | Re: [PATCH] Time precision, adjtime(x) vs. gettimeofday | From | john stultz <> | Date | 08 Oct 2003 12:11:02 -0700 |
| |
On Wed, 2003-10-08 at 11:25, Stephen Hemminger wrote: > On Wed, 08 Oct 2003 15:32:31 +0200 > Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote: > > > > That means that if, for example, adjtimex was called with a factor > > that is trying to slow you down a bit, and you call gettimeofday > > right before the end of a jiffy period, you may calculate an offset > > based on the HW timer that is actually higher than what will be > > really added to xtime on the next interrupt. [snip] > The following will prevent adjtime from causing time regression. > It delays starting the adjtime mechanism for one tick, and > keeps gettimeofday inside the window.
Hmm. Looks good to me. If we're losing ticks, it would make time stair-step somewhat, but it doesn't seem to affect the actual time accumulation.
thanks -john
- 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/
| |