I wanted to send packets bursts on gigabit ports spread on numerous computers
at precise dates specified in a common scenario.
I could achieve a ~200ns jitter among packets in a burst by synchronizing the
computers (only two at this time...) with a slightly modified ptp4l and phc2sys
(dedicated gbe links for synchronization) and a task in a dedicated module
which waits on msleep_interruptible, usleep_range, ndelay or a polling with
getnstimeofday depending on the interval between the different dates in
scenario. This task triggers the packet sending at the date wanted.
I rapidly gave up timers for small intervals because of the scheduling latency.
Julien.
________________________________
De : Richard Cochran <richardcoch...@gmail.com>
À : Ledda William EXT <william.le...@iter.org>
Cc : "linuxptp-users@lists.sourceforge.net"
<linuxptp-users@lists.sourceforge.net>
Envoyé le : Mercredi 19 février 2014 16h08
Objet : Re: [Linuxptp-users] clock_nanosleep on /dev/ptpX
On Wed, Feb 19, 2014 at 02:58:40PM +0000, Ledda William EXT wrote:
> > I might do it one day, but so far I haven't had a really compelling reason
> > to do so. Probably using the Linux system clock (and phc2sys) will be good
> > enough
> > most of the time. It would be interesting to find out whether that is true
> > for your own application.
>
> Richard,
> Think about this "simple" but very interesting problem. System time is not
> monotonic (assuming it is in UTC), PTP time yes (assuming it is TAI). In a
> real time control system you could have the need to make a "wait_until" or to
> execute some functions in a very well-defined time in spite of any clock
> adjustment made to recover some UTC leap second event. This could be a valid
> reason to implement these features on a PHC?
Well, now that we have CLOCK_TAI in Linux, that takes of the leap
second issue.
I agree that it would be nice to have the PHC timers, but considering
the scheduling latency on typical Linux systems (even RT), I do think
using the system CLOCK_REALTIME or CLOCK_TAI will be good enough.
In fact, timers built off of PHC devices which are PCIe cards will
probably have *worse* latency than using system timers. I would expect
that only register based SoC devices (like the gianfar) would bring
any benefit at all.
Thanks,
Richard
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users