Re: [chrony-dev] Support for Multiple PPS Inputs on single PHC

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


I take that as kernel is not likely to change.

Since I got around to using this myself I hacked up a patch (next email). Its definitely the "how do I make this work" patch, not something where I spent a while digging into all of chrony's internals to make sure things match how it's "supposed to be done".

top seems to think there's no threads to worry about, so I assume the mutex can be dropped with no impact, but I left it cause I wasn't sure.

There's probably a cleaner way to do this, and I'm happy to clean up the patch from feedback if it makes sense, or y'all can replace with a more correct solution.

Thanks,
Matt

On 2/16/23 4:58 PM, Matt Corallo wrote:


On 2/16/23 2:54 PM, Richard Cochran wrote:
On Thu, Feb 16, 2023 at 09:54:56AM -0800, Matt Corallo wrote:
As for duplicating the output across sockets, ptp_chardev.c's `ptp_read` is
pretty trivial - just pop the next sample off the queue and return it.
Tweaking that to copy the sample into every reader is probably above my
paygrade (and has a whole host of leak risk I'd probably screw up).
`extts_fifo_show` appears to be functionally identical.

Each extts in the fifo is delivered only once.  If there are multiple
readers, each reader will receive only some of the data.  This is
similar to how a pipe behaves.

Right, sorry if the context wasn't clear, I only realized part of the message was removed in the first reply after sending. The question from Miroslav was, basically, "would kernel accept something to only get notified of extts pulses on a given channel, and, if so, how would we go about doing that".

The "we get pulses from all extts channels on the same socket" thing is a bit annoying to munge into chrony - it has the concept of "refclocks" which are a single clock, in this case a single pps pulse generator. If you have two of them on the same PTP clock but coming in on different pins/channels it doesn't have a way to express that outside of two refclocks. While we could take pulses from both refclocks on one socket and shove them into some queue and have the refclocks pick that data up its a bunch of complexity on the client side and not super clean in the current codebase.

Thanks,
Matt


--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/