Re: Pentium microtime & SMP: A bug?

Ingo Molnar (mingo@kaliban.csoma.elte.hu)
Thu, 2 May 1996 17:29:26 -0400 (EDT)


On Thu, 2 May 1996, Ulrich Windl wrote:

> If I understand SMP in Linux right (I have only a single-processor
> board), each processor can handle kernel requests (that is serve
> them). The fast timing routine for the Pentium uses the cycle counter
> in the processor (in the current one). Now I assume that both
> processors do not start with the same cycle counter; that way the
> clock offset will jump depending which processor's cycle count is
> read. (I don't know if it's possible to reset a single processor)
>
> The solution (if the problem exists) seems to be to have a cycle
> counter per processor (#ifdef SMP) instead of a single one.

i think the timer interrupts are handled by one CPU only (the master?).
That CPU's counter should be used (and is used now).

This whole issue gets messy if different CPUs get interrupts, one CPU cant
(or only with too much overhead) read the other CPUs clock counter. Btw,
the clocks syncronized, arent they? (if yes then this is only an offset
problem which can be neglected since the error is 1/jiffies => fading away
pretty quickly.)

-- mingo

ps. any news on the gettimeofday() monotonity problem? i can see it on
all systems i have. (though it's cool to go back in time 8)