The PREEMPT_RT patch introduces mechanisms intended to improve Linux’s real-time capabilities. A Bachelor’s thesis at the University of Applied Sciences Upper Austria, conducted in collaboration with Sequality, examined how these changes affect the system latency of an embedded Linux platform. The focus on the measurements was not to measure the average response time but instead to evaluate the worst-case latency and the predictability of the system under load.
Kernel Preemption
- PREEMPT_NONE
- PREEMPT_VOLUNTARY
- PREEMPT
- PREEMPT_RT
PREEMPT_RT goes further than the conventional models: interrupt handlers are, to a large extent, executed as schedulable threads, and locking mechanisms are adapted to limit long non-preemptible sections and handle the problem of priority inversion. The goal is not necessarily higher throughput, but more predictable timing behavior.
Test Setup

The measured round-trip time therefore represents the system latency from an external event to an observable response. It includes the CAN communication, the Linux scheduling path, and the processing performed by the application. This high-level topology makes it possible to evaluate the complete application path from outside the system rather than measuring an isolated function call.
Measurements
Idle System: The first measurement was performed with the SUT in an idle state and without additional synthetic load.

The average and median latencies were close across all preemption models. However, PREEMPT_RT had the highest average latency at 0.2967 ms, compared with 0.2850 ms for PREEMPT, 0.2839 ms for PREEMPT_VOLUNTARY, and 0.2865 ms for PREEMPT_NONE.
| Kernel Mode | Min | Q1 | Median | Q3 | Max | Average | Samples |
|---|---|---|---|---|---|---|---|
| RT_PREEMPT | 0.2728 | 0.2929 | 0.2969 | 0.3009 | 0.4208 | 0.2967 | 100.000 |
| DESKTOP | 0.2649 | 0.2809 | 0.2849 | 0.2888 | 0.4409 | 0.2850 | 100.000 |
| VOLUNTARY | 0.2649 | 0.2809 | 0.2848 | 0.2849 | 0.5048 | 0.2839 | 100.000 |
| NONE | 0.2649 | 0.2848 | 0.2849 | 0.2889 | 0.4809 | 0.2865 | 100.000 |
System under heavy load: The second measurement subjected the system to a target CPU load of 100 percent as well as synthetic kernel-related stressors, including timer events, context switches, file I/O, and futex operations.

| Kernel Mode | Min | Q1 | Median | Q3 | Max | Average | Samples |
|---|---|---|---|---|---|---|---|
| RT_PREEMPT | 0.3049 | 0.3649 | 0.3729 | 0.3889 | 0.6449 | 0.3805 | 100.000 |
| DESKTOP | 0.2849 | 0.3568 | 0.3609 | 0.3689 | 3.6727 | 0.3659 | 100.000 |
| VOLUNTARY | 0.2769 | 0.3529 | 0.3608 | 0.3689 | 4.0608 | 0.3701 | 100.000 |
| NONE | 0.2809 | 0.3529 | 0.3569 | 0.3689 | 10.9885 | 0.3718 | 100.000 |