← Engineering topics

Why did we choose Linux RT?

A controller is writing logs when its next power dispatch task becomes due. How long might that task wait before it can run?

Budget for time spent waiting

Consider an illustrative 20 ms control cycle. If the thread wakes 8 ms late, only 12 ms remain to read state, calculate a target and send the command. This can happen even when average CPU utilization is low. Scheduling latency and jitter under load matter to the choice of platform.

What changes with PREEMPT_RT?

More kernel execution paths become preemptible, and most interrupt handling runs in schedulable threads. Priority inheritance lets a lock holder temporarily inherit a waiting task’s higher priority so it can release the lock sooner. Linux RT gives us a way to prioritize periodic control while retaining the Linux tools we use for communications, storage and diagnostics.

Measure the complete control path

On the target hardware, run field communications, logging and remote data transfers together. Compare the control thread’s scheduled wakeup with the time it actually runs. Then measure from sampling through command output to device feedback. Record the worst observed delay, test duration and missed deadlines. Fieldbus and device response times are part of the site’s acceptance criteria too.