rpi3 clock drift

Ian Lepore ian at freebsd.org
Fri Nov 29 17:10:39 UTC 2019


On Thu, 2019-11-28 at 23:51 -0700, Ross Alexander wrote:
> On Fri, 29 Nov 2019, Peter Jeremy wrote:
> 
> > [...]
> 
> BTW, another *significant* source of jitter is the brand and age of
> the sd/mmc card used.  As they age, the write speed decreases and
> block write latency gets less uniform; this shows up as system clock
> jitter in the loopstats.  After a few years (3 or 4), the box becomes
> a complete falseticker and you need to replace the sd/mmc card.
> 

I'm having a real hard time with this one, conceptually.  This is
exactly what every one of our products at $work does:  precision timing
including ntpd and kernel time tracking UTC(GPS) to within a few nanos.
We've had products in the field for 15 years still using the original
sdcard and still hitting the same on-time performance numbers as the
day they were shipped (tracking UTC(GPS) +-10ns RMS).

I'm having a hard time picturing how sdcard write performance could
impact kernel timekeeping that much.  I say this as a person who has
spent years working on both the sdcard drivers and the kernel
timekeeping code in freebsd.  An sdcard driver that used PIO instead of
DMA might even cause a bit of jitter in measuring a PPS signal due to
interrupt latency (mostly if the interrupt thread priorities weren't
right), but even that would be nowhere near enough jitter to become a
falseticker, it would be on the order of a few dozen microseconds.

-- Ian



More information about the freebsd-arm mailing list