Subject: Re: Could someone fix the mac68k clock-interrupt code?
To: Jonathan Stone <jonathan@DSG.Stanford.EDU>
From: Colin Wood <cwood@ichips.intel.com>
List: port-mac68k
Date: 02/03/1998 16:16:33
Jonathan Stone wrote:
> 
> Steve Allen <wormey@eskimo.com> reminds me that Apple wired
> up the 68k macks with the clock at lowest hardware priority.
> This currently makes Macs incapable of keeping accurate time 
> under heavy interrupt load.
> 
> Is there some compelling reason not to work around this in software?

I don't know.
 
> The obvious fix is to poll for a pending clock-tick interrupt at some
> (or maybe even all) higher hardware interrupt priorities.  The idea is
> to check on exit from the higher-level interrupt handlers to see if a
> clock tick is pending; and if so, to call hardclock() in such a way
> that the CLKF_ macros decide the system is `busy' and just do
> hardclock() processing, not softclock().  (A global variable set by
> the polling code and cleared after calling hardclock() would suffice).
> Time vultures might even considering polling *before* the higher
> hardware-priority interrupts.
> 
> Other m68k-based systems manage to service clock interrupts at ~60 Hz,
> even with zs chips, so a Mac should be able to keep up at ~100Hz.
> Is there something else special about Macs that makes this infeasible?

Very good question.  I don't know about this for sure, either.

> Failing that, maybe the release notes for the mac86k port could say
> that NetBSD doesn't keep accurate time and to not run xntpd??

This, however, I can certainly do until the problem is corrected.
However, I thought that xntpd could work around clock drift by resetting
the real time clock to synch up with whatever it receives from the ntp
servers.  Is this not the case, or am I just missing something in how
xntpd works?

Later.

-- 
Colin Wood                                 cwood@ichips.intel.com
Component Design Engineer - MD6                 Intel Corporation
-----------------------------------------------------------------
I speak only on my own behalf, not for my employer.