Messages in this thread | | | Date | Sat, 18 Nov 2000 23:13:54 +0100 | From | Vojtech Pavlik <> | Subject | Re: rdtsc to mili secs? |
| |
On Sat, Nov 18, 2000 at 09:12:31PM +0100, Pavel Machek wrote:
> > Anyway, this should be solvable by checking for clock change in the > > timer interrupt. This way we should be able to detect when the clock > > went weird with a 10 ms accuracy. And compensate for that. It should be > > possible to keep a 'reasonable' clock running even through the clock > > changes, where reasonable means constantly growing and as close to real > > time as 10 ms difference max. > > > > Yes, this is not perfect, but still keep every program quite happy and > > running. > > No. Udelay has just gone wrong and your old ISA xxx card just crashed > whole system. Oops.
Yes. But can you do any better than that? Anyway, I wouldn't expect to be able to put my old ISA cards into a recent notebook which fiddles with the CPU speed (or STPCLK ratio).
> BTW I mailed patch to do exactly that kind of autodetection to the > list some time ago. (I just can't find it now :-( -- search archives > for 'TSC is slower than it should be'.
If I recall correctly, that patch didn't create a 'reasonable clock' - it wasn't growing all the time and could skip back sometimes.
-- Vojtech Pavlik SuSE Labs - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
| |