iMX8 Linux Real Time Performance

Hello,

After flashing a real time patched linux kernel in our iMX8QM module, we tested the real time performance of the kernels by applying the instructions given in this link:
http://www.osadl.org/Create-a-latency-plot-from-cyclictest-hi.bash-script-for-latency-plot.0.html

However the results we got seem not fully satisfying as a real time kernel. The latency still relatively high with high priority threads. I applied the recommendations given here Real-Time Linux to optimize the real time performance, but this had no noticable effect.

This is how the latency histogram of iMX8 looked like, (where CPU 4 and 5 represent the Cortex-A72 cores).

[upload|/pA1N7b71HMSpTPv5582N8WrWIk=]

By looking at some examples provided by the www.osadl.org , we can see a much better performance:

ARMv7 Processor rev 0 (v7l), Linux 3.12.24-rt38
[upload|/BAX3ZmaFSTO4xHR73G0W0YM5Mo=]

Ref: Latency plot of system in rack #b, slot #8: OSADL - Open Source Automation Development Lab eG

Is there something we can do on the kernel to make it perform better regarding latencies?

Best regards,
Majd

As you may notice there are not i.MX8 real time patches available, so probably you have to develop them by yourself.

https://www.osadl.org/Hardware-overview.qa-farm-hardware.0.html

Hello,

The patch applies on the kernel that is used by iMX8, and it’s avialable for 4.14.159
Toradex patches its kernels already with PREEMPT RT.

Best regards,
Majd

Hi

DVFS requires relatively huge delays for the regulators to reach a new operating point voltage and for the clocking system to get to the new frequency. During these delays no process will be scheduled contributing to latency.

I expect the worst case latency to be better if you disable automated DVFS depending on current CPU load, even if you fix the CPU frequency to the lowest operating point.

E.g. what happens if you pin both the A53 and A72 CPU complex to the lowest 600MHz:

cpufreq-set -f 600MHz -c 0
cpufreq-set -f 600MHz -c 4

and what with the maximal CPU frequencies with a higher power consumption penalty:

cpufreq-set -f 1200MHz -c 0
cpufreq-set -f 1600MHz -c 4

Max

HI @koan

There are real-time patches around.
hi @majd.m is your issue solved?

Best regards,
Jaski

Hi @jaski.tx,

sure, issue is solved for the mentioned BSP. Thanks!

Best regards, Majd

Perfect. Thanks for the feedback.