On Sun, Feb 19, 2023 at 09:23:38PM -0800, Matt Corallo wrote: > On Linux, an extpps pin on a PHC device firing will only be read > once. If there are multiple sockets to that PHC device (even across > channels), the event will only be read by the first reader to get > to the kernel.
After some thought I implemented this in a different way. Instead of buffering the samples, I feed all refclocks that should receive the new sample as soon as it's available. I'll test it a bit more and push it. Initially I had some troubles reproducing the issue. It seemed to work fine. It turned out the reads from the PHC are blocking. If the timestamps from different channels come in the right order, the refclocks will get just the samples they need, not missing any, even though the original read event corresponds to a different channel. This might explain some weird behavior I saw previously. I'll make it non-blocking, at least within the process as the PHC device doesn't seem to support O_NONBLOCK. -- Miroslav Lichvar -- To unsubscribe email chrony-dev-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-dev-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.