Port-vax archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: PSA: Clock drift and pkgin



On 2023-12-15 11:44, Maciej W. Rozycki wrote:
On Thu, 14 Dec 2023, Anders Magnusson wrote:

As for the high frequency clock in the VAX, I'm not sure it is used at all
by NetBSD. But it's been quite a while since I was digging around, and if
someone knows it is being used, I'd be happy to hear. But I think we have
several problems that should be sorted. And for me, the first one would be
to understand how on earth we can be spending so much time in system mode
when we do anything.
I'm quite sure that all VAXen that have a hires clock uses it in time
difference calculations.
There are two of them; the ICR version and the clock chip version. See clock.c
for more info.

  Thanks for the pointer.  Hmm, indeed we have this:

#if VAX46 || VAXANY
static struct timecounter vax_diag_tc = {
	.tc_get_timecount = vax_diag_get_counter,
	.tc_counter_mask = ~0u,
	.tc_frequency = 1000000,
	.tc_name = "diagtimer",
	.tc_quality = 100,
};
#endif

but the frequency recorded in this structure does not correspond to one in
hardware, which is 2^26/68.26s => 983136Hz, according to the KA46 spec.  I
need to rebuild the kernel anyway as sadly GENERIC doesn't have the TC-USB
option enabled, so I'll see if fixing the frequency changes things anyhow.

983136 is pretty close to 1000000. However, without looking at the code, isn't that the diagnostics timecounter? Now used for anything really related to time keeping, but just for some other information, like sampling the state of the cpu and so on?

  NB NTP still coping on lizzie though jitter reached 350 - 540 at times.
It also keeps resyncing rather than staying steadily in sync as with my
other machines, which is a sign of the clock drift jumping back and forth.
Normally ntpd should stabilise asymptotically over time as it figures out
the drift and adapts the actual measure of the system clock tick interval.

Yeah. That sounds very much like what I've observed in the past. It's moving all over the place, and constantly resyncing.

  Johnny

--
Johnny Billquist                  || "I'm on a bus
                                  ||  on a psychedelic trip
email: bqt%softjar.se@localhost             ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol


Home | Main Index | Thread Index | Old Index