Re: gettimeofday resolution seriously degraded in test9

From: Stephen Hemminger
Date: Mon Oct 27 2003 - 19:16:12 EST


On Mon, 27 Oct 2003 18:44:47 -0500
Joe Korty <joe.korty@xxxxxxxx> wrote:

> [ 2nd posting, the first seems to have been lost ]
>
> Linus,
> This bit of -test9 code reduces the resolution of gettimeofday(2) from
> 1 microsecond to 1 millisecond whenever a negative time adjustment is
> in progress. This seriously damages efforts to measure time intervals
> accurately with gettimeofday. Please consider backing it out.
>
> Joe

The problem is that it is worse to have time go backwards which is what we
have done up until test9. It might be possible to compress time when NTP is doing
negative adjustments, but if you really care about microsecond resolution then
you will still lose.

If you care about microseconds, then NTP is going to whack your data. It has to
cause clock to speed up/slow down. Your data points will skip and stall due to it.
Use a different clock source or don't run NTP if you are doing real time stuff.

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