Re: gettimeofday non-monotonic on 2.2.7 SMP

Andrea Arcangeli (andrea@suse.de)
Fri, 21 May 1999 13:28:58 +0200 (CEST)


On Thu, 20 May 1999, dave madden wrote:

>I remember looking at that exact line, too, but I didn't notice the
>error. Unfortunately, my userland prog still detects time decrements
>in the 1-10ms range, frequently (but not always) accompanied by
>recover_lost_timer messages in the log.

Do you still run xntpd? I tried to reproduce here with userspace and now
that the `write' code got compiled from real, I can't reproduce the
time-warp anymore. What I do is to run your gettimeofday checker in
background and then I run two proggy that does a cli() and a loop for some
time, and then sti(). Your proggy don't complain anymore here with the #if
bug fixed. But I am not playing with settimeofday.

>This is frustrating: you'd think that more people would have noticed
>this, but some people with SMP machines tried my program and nobody
>reported any time warps. Maybe something's screwy with my hardware?

Because nobody has the CPU masked from userspace for more than 100msec.

>Looking at time.c now, I wonder if I've screwed up your patch
>somehow. At line 484, I have:
>
> /* read Pentium cycle counter */
> rdtscl(last_tsc_low);
> __asm__ __volatile__("rdtsc" : "=a" (last_tsc_low) : : "edx");

It's been a merging error. It make no one difference at all (except it's a
bit slower :-). Anyway I fixed it now, next patches will be fixed. Thanks.

Andrea Arcangeli

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/