Re: gettimeofday non-monotonic on SMP 2.3.47

From: Boris Okun (bokun@home.com)
Date: Fri Mar 03 2000 - 00:20:55 EST


Andrea,

Thanks again for explaining stuff to me. Some things now make much more
sense to me.

I did some more testing. None of your patches completly cures the
problem. My current version does the following:

1) tsc_quotient[NR_CPUS], struct timeval
time_at_last_interrupt[NR_CPUS], last_tsc_low[NR_CPUS],
delay_at_last_interrupt[NR_CPUS] are per processor.

2) In timer_interrupt I added
time_at_last_interrupt[smp_processor_id()] = xtime

3) In do_gettimeofday I use time_at_last_interrupt instead of xtime.

4) Removed lost_ticks from do_gettimeofday.

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

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 ?

Boris

-
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