[time-nuts] linux kernel pps support

folkert folkert at vanheusden.com
Wed Dec 17 15:56:30 UTC 2014


Did a test for a while: every 5 minutes I would look at the output of
ntpq -c pe -n for jitter of the pps source.
This pps source was "measured" either in the kernel (this newly added
gpio pps support in the raspberry pi) or in user space using my own
rpi_gpio_ntp.

kernel pps interrupt handling
-----------------------------
root at detijd:/etc# while true ; do echo `date +%s` `ntpq -c pe -n | grep 127.127.22.0` ; sleep 300 ; done | tee -a /pps.log

root at detijd:/etc# cat /pps.log | awk '{ print $11; }' | awk 'BEGIN { max = -1; min = 1000; } { if ($1 > max) { max=$1; } if ($1 < min) { min=$1; } t+=$1; n++; } END { print min, max, t/n, n; }'
0.001 0.124 0.0131945 797

This is minimum, maximum (yes that's 124!) and average. And I took 797
samples which is almost 3 days.

average temperature of soc: 49.7 with stddev of 1.87

userspace
---------
note: I looked at ntpq every 30 seconds(!)
root at hetlicht:/var/log/ntpstats# cat /rpn.log | awk '{ print $11; }' | awk 'BEGIN { max = -1; min = 1000; } { if ($1 > max) { max=$1; } if ($1 < min) { min=$1; } t+=$1; n++; } END { print min, max, t/n, n; }'
0.001 0.101 0.00955351 27797

This is over 9,6 days.

average temperature of soc: 51,1 with stddev of 4.01


TL;DR:
- kernel   : 13.2us jitter on average
- userspace:  9.6us jitter on average


Folkert van Heusden

-- 
----------------------------------------------------------------------
www.smartwinning.info



More information about the Time-nuts_lists.febo.com mailing list