Jan Kiszka wrote:
> Hi,
> for those who haven't followed the endless "RTDM and Timer functions"
> thread: we are currently discussing a way to provide high-resolution
> timestamps in periodic mode for RTDM users. It was suggested to use the
> TSC for this, but I noted that this source will not be in sync with the
> periodic system timer and may even be out of sync across multiple CPUs.
> A straight-forward approach to overcome this might be to record the
> current TSC value together with the current jiffies in
> xntimer_do_tick_periodic(). This tuple (per CPU) could then be provided
> to skin implementers in order to let them offer a high-resolution
> timestamp source even in periodic mode. Hmm, sounds too simple actually,
> so I'm waiting now for someone pointing out the pitfalls.

Likely too simple: The periodic IRQ seems to pop up on every CPU so that
the TSC could be recorded, but will this happen synchronously? At least
we will see (IRQ) jitters, and those jitters could already create in the
single-CPU case a non-monotonic clock...

Does anyone ever studied if and how Linux synchronises across CPUs?
There was some activity around the problematic AMD64 multicores, but I
haven't looked at the details and if it's actually solved now.


Attachment: signature.asc
Description: OpenPGP digital signature

Xenomai-core mailing list

Reply via email to