|
From: Jan B. <jan...@ja...> - 2013-06-04 10:01:59
|
Hi Drasko, 2013/6/4 Drasko DRASKOVIC <dra...@gm...>: > Hi Jan, > > On Mon, Jun 3, 2013 at 11:30 PM, Jan Breuer <jan...@ja...> wrote: >> 2013/6/3 Drasko DRASKOVIC <dra...@gm...> >> >> this is strange. Are you using unmodified version of PTPd? > > Unmodified version from SourceForge. > >> >> It looks like some other program regulates clock speed e.g. some ntp >> client, NetworkManager or so. Check running processes. > > No, no other process of this type. No NetworkManager, and I stopped > all NTP processes. > >> >> It is also possible, that frequency adjustment does not work as >> expected. It seems that it adjust 50 times faster; > > Can you please tell me how did you concluded this from the logs, as > they do not tell me much. For example these lines: 2013-06-03 18:06:13.910808, slv, deadbefffeef0000(unknown)/01, 0.056085166, 0.010102562, 0.037827831, 0.078952452, 407659, -71, S 2013-06-03 18:06:14.946423, slv, deadbefffeef0000(unknown)/01, 0.056085166, 0.034376506, 0.037827831, 0.101970893, 442035, -71, S Offset from master on the first line is 0.010102562 while on the second line, it is 0.034376506, so the difference is 24.274 ms after only one second. This looks like the drift of yout local clock is 24274 ppm, but the theoretical maximum of linux kernel adjustment is 500 ppm. Something goes realy wrong. Difference of 5th field of the log should be lower then 500us after one second (use only lines ending with S - sync) > >> 100 ppm adjustment >> means 5000 ppm in reality. > > Why is this? I do not see what do you really mean here. This was just an idea before you reveal the secret about disabling interrupts. > >>You can try my drift test program. >> https://github.com/j123b567/adjtimex-test/ >> and compare my results from PC to your results on Pandaboard. > > Here are my results : > root@speaker:~/adjtimex-test/drift# ./drift 500 > adjustment = 0 ppm -> measured drift = 3.090 ppm > adjustment = 500 ppm -> measured drift = 499.824 ppm > root@speaker:~/adjtimex-test/drift# ./drift 100 > adjustment = 0 ppm -> measured drift = -3.046 ppm > adjustment = 100 ppm -> measured drift = 99.964 ppm > As you can see, adjustment of 0 ppm means real drift from -3 ppm to 3 ppm. This also shows, that something goes wrong. > I am wondering is this 0 ppm -> measured drift = 3.090 ppm > dangerous? It comes from the PPS program that I use to toggle GPIO (in > order to observe offest between two boards on scope), and this program > blocks irqs for sam small ammount of time... > I thing, that the problem is, that you switch off interrupts for a very long time. Packet timestamps are innacurate and everything fails to synchronize. If you disable PPS generation, everything should work as expected. I thing, that you don't need to disable interrupts for pps generation. Regards, Jan |