How to check, and eventually enforce Performance governor on STM32MP15 openst-linux?
I am trying to achieve hard real-time under 100us on the STM32MP157f-eval, specifically, on the Cortex A7 dual core.
Note: I specifically target the Cortex A7 cores because the M4 is already taken for other tasks which requires much smaller latency.
What I did so far is:
- Build the Yocto openst-linux
- Add Preempt-RT patch
- Added several software: irqbalance, tuna, hiccups... to monitor and tune the system.
- Isolate one core
- Tested high-priority process, also IRQ. Tested with internal clock and external oscilloscope.
- Tried to disable most drivers
After all those efforts, the jitter did not improved, and I still get >1ms jitter when applying load for enough time.
------------------------------
My next step is to ensure that the cpu frequency is not throttled.
I read https://wiki.st.com/stm32mpu/wiki/How_to_change_the_CPU_frequency but it's not yet clear to me how to check and set this.
Also, most general questions found on internet don't seem to apply to this architecture.
How to check that cpu frequency is at maximum performance and not throttled?
----------------------------
When using the following command:
$ perf stat -a -A --timeout 10000
CPU0 10003.99 msec cpu-clock # 1.000 CPUs utilized
CPU1 10003.97 msec cpu-clock # 1.000 CPUs utilized
CPU0 184937 context-switches # 18.486 K/sec
CPU1 8410 context-switches # 840.666 /sec
CPU0 1 cpu-migrations # 0.100 /sec
CPU1 1 cpu-migrations # 0.100 /sec
CPU0 0 page-faults # 0.000 /sec
CPU1 0 page-faults # 0.000 /sec
CPU0 6498043474 cycles # 0.650 GHz
CPU1 176739089 cycles # 0.018 GHz
CPU0 2838852339 instructions # 0.44 insn per cycle
CPU1 52273406 instructions # 0.30 insn per cycle
CPU0 471022215 branches # 47.083 M/sec
CPU1 5995202 branches # 599.282 K/sec
CPU0 108715456 branch-misses # 23.08% of all branches
CPU1 1995755 branch-misses # 33.29% of all branchesThe cycles don't match the maximum, I deduce that the frequency is throttled down.
