Dates and Events: |
OSADL Articles:
2023-11-12 12:00
Open Source License Obligations Checklists even better nowImport the checklists to other tools, create context diffs and merged lists
2022-07-11 12:00
Call for participation in phase #4 of Open Source OPC UA open62541 support projectLetter of Intent fulfills wish list from recent survey
2022-01-13 12:00
Phase #3 of OSADL project on OPC UA PubSub over TSN successfully completedAnother important milestone on the way to interoperable Open Source real-time Ethernet has been reached
2021-02-09 12:00
Open Source OPC UA PubSub over TSN project phase #3 launchedLetter of Intent with call for participation is now available |
Long-term monitoring of apparent latency in PREEMPT_RT Linux real-time systems
Carsten Emde, Open Source Automation Development Lab (OSADL)
The real-time wakeup latency tracer (wakeup_rt) in conjunction with the wakeup latency histogram (CONFIG_WAKEUP_LATENCY_HIST) is part of the Linux kernel trace subsystem. It monitors processes that have the highest priority of the system throughout their entire wakeup processing and do not share this priority with any other concurrently running or scheduled process. Thus, this tracer should be able to continuously monitor a system's worst-case latency. However, in a situation where interrupts are disabled, the timer interrupt to enqueue a process is already late, but the latency between enqueuing and wakeup still may be normal. In this case, an erroneously low latency would be recorded.
To overcome this limitation and to create a true recording of the apparent latency of every single wakeup procedure, an additional tracer was implemented. This tracer determines the offset between the intended timeout and the real timeout of the timer interrupts; the CONFIG_MISSED_TIMER_OFFSETS_HIST configuration item is used to enable this tracer.
When implementing the two tracers, care was taken to minimize the introduced performance penalty.
The combination of the real-time wakeup latency tracer with the timer offset tracer allows to continuously monitor a real-time system during its entire life-time in such a way that every single violation of the scheduling deadline would be registered. This makes it possible to ensure real-time capabilities even in systems where path analysis is no longer feasible.