On Thu, 2014-06-19 at 16:18 +0200, Jiri Benc wrote:
> On Thu, 3 Apr 2014 11:53:40 +0200, Miroslav Lichvar wrote:
> > As a future improvement, I think it would be nice if ptp4l sent a
> > notification when exiting so phc2sys could stop its synchronization
> > and wait until ptp4l is running again.
> 
> I was thinking about how to implement this. In particular, I'd like
> this to be more robust and detect also ptp4l being killed.
> 
> The most obvious option, detecting whether other side closed its part
> of the unix socket, would require changing it from SOCK_DGRAM to
> SOCK_SEQPACKET. Which means ptp4l would have to keep track of all
> uds clients, deal with accept calls, etc., and most importantly, poll
> these additional file descriptors. That would require quite substantial
> changes throughout the whole code. But then, uds is treated specially
> in most places, perhaps stopping pretending it's another transport
> wouldn't be bad.


That seems like a whole lot of work, though it does sound like the most
robust solution. Especially difficult since we would be un-abstracting
uds as a transport type..

> 
> Other option is polling from phc2sys every phc_interval. That's ugly,
> consuming unnecessary resources and unreliable anyway.
> 

This is probably not good.

> Better option would be asking ptp4l about its PID and monitoring it.
> That would be reliable enough but still polling, although rather cheap
> polling.
> 

This is most likely the best compromise, and easiest to implement..

Thanks,
Jake

> Thoughts? Different ideas?
> 
> Thanks,
> 
>  Jiri
> 


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to