I am trying to measure the jitter in the Interrupt latency for variousLinux kernel ( with RT patch enabled etc). I know the best way is to use a oscilloscope to do this, by generating a interrupt with GPIO pin and toggling another GPIO pin in the interrupt service routine, but i was wondering whether there are any Linux kernel tools to do this, and may be i can do a comparison of the numbers.
A typical method would be to set up a high-precision clock (such as the CPU's cycle counter) to trigger an interrupt some random-but-known time in the future, and measure in the ISR the difference between the time the clock was set to go off versus the time the ISR was actually reached.
(The "random" part of this is to ensure that you avoid systematically taking measurements during quiet or busy times---for instance, you don't want your timer interrupt to systematically trigger at the same time as a network card interrupt, unfairly pushing your latency numbers up.)
A tool that somewhat implements this is Cyclictest, though it appears to measure time inside a kernel thread instead of the ISR itself, which will push up your measured latency numbers somewhat.
Use "cyclictest" utility to measure latency, I have done research and I am using cyclictest to measure jitter of ported RT linux on powerpc platform.
It is simple yet powerful utility to measure latency
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With