Re: gettimeofday non-monotonic on SMP 2.3.47

From: Andrea Arcangeli (andrea@suse.de)
Date: Thu Mar 02 2000 - 09:03:19 EST


On Fri, 3 Mar 2000, Boris Okun wrote:

>This works for me, I cannot force non-monotone time.

Try to run this proggy in all CPUs at the same time while timetest is
running into the background. Also benchmark that it will take around
5msec on your machine (change the value of i to make it to run for such
time).

main ()
{
        volatile int i = 50000;
        iopl(3);
        asm("cli");
        while(i--);
}

>I still don't quite understand the logic of lost_ticks. For example,
>if one processor executes lost_ticks++, is it possible for the other to
>do lost_ticks=0 ?

No, lost_ticks is protected by the rw xtime_lock. You can read it with a
read lock, and you can write it with an exclusive write lock.

Andrea

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



This archive was generated by hypermail 2b29 : Tue Mar 07 2000 - 21:00:14 EST