Messages in this thread | | | Subject | Re: LTP - gettimeofday02 FAIL | From | Andi Kleen <> | Date | 19 Nov 2002 13:03:48 +0100 |
| |
Jim Houston <jim.houston@attbi.com> writes:
> I believe that this is the result of lost ticks. It has gotten much > easier to lose a tick since HZ was changed to 1000. When the timer > interrupt is delayed, the other processors will continue to keep reasonable > time (based on the TSC), but when the timer interrupt eventually happens, > it will add one tick's worth of nanoseconds to xtime.tv_nsec and set > last_tsc_low to the current tsc value. The other processors now base > their time on this new last_tsc_low and will see time go backwards.
It could be detected by keeping a per cpu last_tsc.
Best would be to use a global timer like HPET, but it's not available everywhere and much slower than rdtsc too.
-Andi - 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/
| |