User Tools

Site Tools


realtime:documentation:howto:tools:cyclictest:limitations

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

realtime:documentation:howto:tools:cyclictest:limitations [2018/08/21 10:39]
ebugden Move from temporary location to main tools page
realtime:documentation:howto:tools:cyclictest:limitations [2018/08/23 14:22] (current)
ebugden Improve technical accuracy of description
Line 1: Line 1:
 ====== Cyclictest - Limitations ====== ====== Cyclictest - Limitations ======
  
-The latencies measured by Cyclictest may be slightly optimistic depending on the final application that will execute on the system. This is because Cyclictest measuring threads essentially have the shortest possible wake-up time that an RT userspace task can have. So, if the application ​tasks have a slower ​wake-up ​time they will experience a longer latency than a Cyclictest measuring thread in an identical situation. In a case like this, the Cyclictest thread'​s measurement will be optimistic even if the latency starts at the exact time that the Cyclictest thread is intended to execute and the thread is affected by the full duration of the latency. ​+The latencies measured by Cyclictest may be slightly optimistic depending on the final application that will execute on the system. This is because, when the [[realtime:​documentation:​howto:​tools:​cyclictest:​options:​nanosleep|nanosleep]] option is used, Cyclictest measuring threads essentially have the shortest possible wake-up time that an RT userspace task can have. When using the nanosleep option, the Cyclictest thread timer expiry path is executed directly in hard interrupt context with no additional indirection. So, if an application ​task'​s ​wake-up ​is not completed in hard interrupt context (e.g. threaded interrupt context), the application task will experience a longer ​wake-up ​latency than a Cyclictest measuring thread in an identical situation ​due to the additional level of indirection. In a case like this, the Cyclictest thread'​s ​latency ​measurement will be optimistic even if the latency starts at the exact time that the Cyclictest thread is intended to execute and the thread is affected by the full duration of the latency.
  
 ---- ----
- 
-During each iteration, Cyclictest'​s latency measuring threads wait for a hardware timer to expire before executing. When the timer expires, their task wake-up is performed in hard interrupt context and is therefore very fast. So, if a task in the final RT application waits on something that will trigger a wake-up that is not executed in hard interrupt context, then it can experience a latency that is longer than what was measured by Cyclictest in the same situation. ​ 
  
 Using Cyclictest can still be useful in a context like this where the application will experience slightly longer latencies than what Cyclictest measures. This is because the Cyclictest results will be an approximate lower bound for the task's maximum latency. In other words, the maximum latency experienced by the application will not be shorter than what Cyclictest measured. So, if the results that Cyclictest provides are already longer than the application'​s latency requirements,​ then the real application'​s wake-up latency will be even worse. In conclusion, in a situation like this Cyclictest can still be used to get an idea of where improvements are needed. Using Cyclictest can still be useful in a context like this where the application will experience slightly longer latencies than what Cyclictest measures. This is because the Cyclictest results will be an approximate lower bound for the task's maximum latency. In other words, the maximum latency experienced by the application will not be shorter than what Cyclictest measured. So, if the results that Cyclictest provides are already longer than the application'​s latency requirements,​ then the real application'​s wake-up latency will be even worse. In conclusion, in a situation like this Cyclictest can still be used to get an idea of where improvements are needed.
realtime/documentation/howto/tools/cyclictest/limitations.1534847952.txt.gz ยท Last modified: 2018/08/21 10:39 by ebugden