[ntp:hackers] 1 msec jitter on serial PPS tamed

Dave Hart davehart at davehart.com
Mon Feb 23 11:02:44 UTC 2009


 
> Hmmm, sounds a bit like this stuff I wrote 5+ years ago...
> https://support.ntp.org/bugs/show_bug.cgi?id=216

I looked at the "Non-monotonic time on NT" thread in the
hackers archive from May 2007 briefly.  I've read all those
archives recently, and that's why I had my attention to
drawn to this patch before.  And given up confused before.

I've stared at the patch again for a while and I understand
more, but still not enough to know what it's trying to do.
I understand that once per system clock tickover you note
the increase in the performance counter since the last
go-round and feed that difference into your history, which
is kept as one entry per system clock tick containing the
counter delta for that tick.  I also understand that somehow
some correction is computed and an altered performance
counter value is fed back into TimerApcFunction's now surely
misnamed LargeIntNowCount to be used as the operative
baseline count for inteferring time and treated as if it
were captured from the performance counter at the current
time.

I am lost as to how the history is consulted to determine
the correction to the performance counter value to be
treated as corresponding to the current time.  The code is
clean but the only comments are on things I could have
guessed, there is no overview.  Why does a function called
perf_insert return something that has nothing to do with
inserting anything?  I'm sure it was perfectly clear to you
what you were trying to do, but sometimes communication is
required to synchronize the thinking of others.

Please do shed some light.

Cheers,
Dave Hart


More information about the hackers mailing list