Subject: Re: xntpd doesn't do its thing
To: None <jonathan@NetBSD.ORG>
From: Bill Studenmund <wrstuden@loki.stanford.edu>
List: port-mac68k
Date: 03/26/1998 09:07:05
On Wed, 25 Mar 1998, Jonathan Stone wrote:

> >First I thought the problem was that GENERIC kernels do not have options
> >NTP turned on.  Now I have a custom kernel with that option and I am seeing
> >the same problem other people have reported:  NTP thinks it's working, but
> >it isn't fixing the local clock.
>   ...
> >Anybody got any ideas for where the problem is?
> 
> the problem is that the Mac hardware has a priority inversion: it puts
> the serial port at higher priority than the clock.
> 
> This causes macbsd to lose clock-tick interrupts (up to 5%), killing NTP.
> here is just _no_way_ NTP can handle sustained loss of clock ticks.
> It creates about 3 orders of magnitude more jitter than NTP is
> designed to handle.

Actually, the problem's that the clock is interrupt level 1, which right
now is also where softnet, softserial, and whatever are. It's also below
splimp, splbio, and blocked by spltty. So basically ANY splfoo in the
kernel blocks the clock. Also, since 1.2, the kernel has been hanging out
with interrupts (at SOME level) blocked more, thus more time loss.

Some people have reported clock rate skews corresponding to a 50%
interrupt loss when compiling a kernel. That's with just disk I/O, no
serial action.

> That's  a Definitive Answer of the cause of the problem.
> I thought it was going to be in the release notes for 1.3.1.

Doh! So did I. We should probably talk to Colin about it. :-(

More in a reply to a later message. :-)

Take care,

Bill