Subject: Re: NTP pulse-per-second timestamp diff
To: Bill Studenmund <wrstuden@loki.stanford.edu>
From: Dennis Ferguson <dennis@juniper.net>
List: tech-kern
Date: 03/26/1998 22:32:02
> I see two problems with this idea:
>
> 1) the character receive routine has no idea what line discipline is in.
> So should it timestamp all characters all the time?
DCD timestamping needs to cope with the same difficulty, in that someone
has to explicitly tell it when to take DCD timestamps and it needs to record
this in a place which the interrupt handler knows about. I assume the line
discipline might attempt to tell the driver to start timestamping incoming
characters (it needs to know the driver is doing this in any case) and
collect the timestamps when characters arrive. If the driver can't do
it, the line discipline could continue to take timestamps on its own.
> 2) Some ports, like mac68k, don't have nanosecond (or microsecond or
> millisecond) resolution clocks with which to time stamp things. What then?
This seems to mean two things:
(1) these boxes are never going to know the time with great precision no
matter what you do, but
(2) taking timestamps at interrupt level (or any time) is probably going
to be cheap compared to a box with fancy clock hardware
I'd say you present the same interface as any other box, record the timestamps
at interrupt time and let the consumer deal with the fact that they're not
very precise. Taking the timestamps at interrupt time isn't helping anything
in this case, but it doesn't hurt anything either and it doesn't cost much.
Dennis Ferguson