Re: rdtsc to mili secs?

Antony Suter
2000-11-07T05:01:11Z

Anton Blanchard wrote:
>
> > > fast_gettimeoffset_quotient, see do_fast_gettimeoffset().
> >
> > Also remember that the TSC may not be available due to the chip era, chip
> > bugs or running SMP with non matched CPU clocks.
>
> When I boot my thinkpad 600e off battery and then change to AC power,
> gettimeofday has a nasty habit of going backwards. Stephen Rothwell
> tells me it is one of these machines in which the cycle counter
> slows down when power is removed.
>
> This means our offset calculations in do_fast_gettimeoffset are way off
> and taking a reading just before a timer tick and just after results in
> a negative interval. Perhaps we should disable tsc based gettimeofday
> for these type of machines.

This issue, and all related issues, need to be taken care of for all
speed
changing CPUs from Intel, AMD and Transmeta. Is the answer of "howto
write
userland programs correctly with a speed changing cpu" in a FAQ
somewhere?

--
- Antony Suter (antony@mira.net) "Examiner" openpgp:71ADFC87
- "And how do you store the nuclear equivalent of the universal
- solvent?"