New toy: attic/clocks.c - time sink warning

Achim Gratz Stromeko at nexgo.de
Wed Jan 9 18:47:36 UTC 2019


Hal Murray via devel writes:
> Please play with it and let me know if you find anything interesting.

Asus TinkerBoard:

--8<---------------cut here---------------start------------->8---
tinkerboard1:~/ntpsec$ ./build/main/attic/clocks 
      res   avg     min  dups  CLOCK
        1   526     291        CLOCK_REALTIME
 10000000   442 10000097   -48  CLOCK_REALTIME_COARSE
        1   518     291        CLOCK_MONOTONIC
        1   526     291        CLOCK_MONOTONIC_RAW
        1   728     583        CLOCK_BOOTTIME

Histogram: CLOCK_REALTIME, 5 ns per bucket, 1000000 samples.
        ns      hits
       291     23140
       581    976804
       871         3
53 samples were bigger than 1541.
--8<---------------cut here---------------end--------------->8---

The timer is reported to run at the 24Mhz system base clock frequency by
dmesg, so there seems to be an access or tick possible only every 7
clocks, perhaps in order to synchronize between all consumers.


rasPi 3B+:
--8<---------------cut here---------------start------------->8---
raspberrypi5:~/ntpsec $ ./build/main/attic/clocks 
      res   avg     min  dups  CLOCK
        1   107     104        CLOCK_REALTIME
 10000000    62 9999948    -5  CLOCK_REALTIME_COARSE
        1    96      52        CLOCK_MONOTONIC
        1   411     364        CLOCK_MONOTONIC_RAW
        1   588     572        CLOCK_BOOTTIME

Histogram: CLOCK_REALTIME, 5 ns per bucket, 1000000 samples.
        ns      hits
       104    793559
       154    206422
       204         1
       259         1
17 samples were bigger than 1354.
--8<---------------cut here---------------end--------------->8---

The usual 52ns granularity we know from all multicore rasPi.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada



More information about the devel mailing list