Re: [PATCH] HZ==100 assumptions

Steve Underwood (steveu@netpage.com.hk)
Fri, 30 Jul 1999 04:09:40 +0000


"Albert D. Cahalan" wrote:

> Steve Underwood writes:
> [...]
> > Nope. Many modern computers use an el. cheapo clock that is just plain
> > inaccurate, and they don't keep time very well. Any Compaq ProLiant produced
>
> I didn't say anything about the _quality_ of the clock. Quality is
> unrelated to the intended frequency.

> When running without an external reference, how should Linux keep time? The
> kernel can assume that a video reference is used, or it can assume that the
> system was designed for DOS timekeeping. The kernel can't do anything about an
> unstable or out-of-spec clock, but it can at least start with an estimate that
> is appropriate for common modern hardware.

The _intended_ frequency has not changed. Its still 4 x NTSC colour sub-carrier,
as used for CGA cards way back when. CGA may be long gone, but you cannot
arbitrarily change this clock frequency, as some ISA cards (and, of course the
8254 timer) still use it. For example, many serial cards pick this up from the
ISA slot to generate baud rates, and end up with rates which are 0.25% out, but
good enough to work reliably (I don't think the serial ports embedded on most
current motherboards do this, but I'm not sure). Some industrial control cards
also use it. Some of these won't work properly in Compaq (or certain other)
servers, because their clock accuracy is too poor. Its not consistently high or
low. It has a random error of up to 0.1% or so, which is totally unreasonable.
Even the nastiest ceramic resonator is usually an order of magnitude better than
that.

If you look at the label on the clock on many motherboards you see labels like
14.3MHz. In fact, these usually give exactly the right frequency, just as many
colour sub-carrier crystals vaguely say 3.57MHz or 3.58MHz but are accurate to
10ppm or so.

This problem could be forgiven in a desktop machine, which is usually switched
off at night, and doesn't creep too far from the correct time (the non-volatile
clock is far more accurate). In a server intended to stay up for ages its a real
pain.

Steve

-
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/