Re: Why HZ on i386 is 100 ?

Maciej W. Rozycki
2002-04-24T17:25:38Z

On Tue, 23 Apr 2002, Andi Kleen wrote:

> That's the local APIC timer. Pretty much all modern x86 have it.
> But at least microsoft warns from using them for high precision
> tim ekeeping on their mmtimer page "due to inaccuracy and
> frequent silicon bugs" (and I guess they have the data for that)

That's nothing new -- I recall a problem of missing half a tick each
time when hardware reloads the timer after reaching zero with certain
revisions of Pentium CPUs. It is documented in the specification update.

> The linux local APIC timer setup could be probably also improved, for
> example the 16 multiplier is a bit dubious and the calibration does not
> look very robust.

When fiddling with the predivider, please keep in mind the i82489DX only
supports 2, 4, 8 and 16 as dividers and you may set up 1 (i.e. no
division) but in a different way -- by setting LVTT appropriately (use
SET_APIC_TIMER_BASE(APIC_TIMER_BASE_CLKIN)).

--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +