2024-10-04 04:35 AM - edited 2024-10-04 04:38 AM
Hey, I’m working with an STM32MP157D-DK1, I’m trying to trace for System Management Interrupts, to check how they affect the system.
The following attempt was made to detect the latency of SMIs occurring on the system:
# mount -t debugfs debugfs /sys/kernel/debug
# mount -t tracefs nodev /sys/kernel/tracing
# cd /sys/kernel/tracing
# cat hwlat_detector/window
1000000
# cat hwlat_detector/width
900000
# cat tracing_thresh
10
# cat tracing_max_latency
0
# cat tracing_cpumask
3
# cat hwlat_detector/mode
none [round-robin] per-cpu
# cat tracing_on
1
# cat current_tracer
nop
# echo hwlat > current_tracer
# sleep 1800
# cat trace
# tracer: hwlat
#
# entries-in-buffer/entries-written: 0/0 #P:2
#
# _-----=> irqs-off/BH-disabled
# / _----=> need-resched
# | / _---=> hardirq/softirq
# || / _--=> preempt-depth
# ||| / _-=> migrate-disable
# |||| / delay
# TASK-PID CPU# ||||| TIMESTAMP FUNCTION
# | | | ||||| | |
After a half hour sleep, it’s unclear why `trace` remains empty, and no iterations are shown detecting latencies.
Does the system not have SMIs at all? Or is there something wrong with what I’m doing?
Kind regards
2024-10-07 01:20 AM
Hello @FredBarkins ,
You talk about SMI but it seems that System Management Interrupts are specific to x86 architecture, not ARM.
Kind regards,
Erwan.
2024-10-07 07:02 AM
Hey sir thank you for your response.
You are right. Please note that according to the hardware latency detector documentation :
The tracer hwlat_detector is a special purpose tracer that is used to detect large system latencies induced by the behavior of certain underlying hardware or firmware, independent of Linux itself. The code was developed originally to detect SMIs (System Management Interrupts) on x86 systems, however there is nothing x86 specific about this patchset.
From what I'm getting, the arm equivalent to SMIs are interrupts running in Secure Monitor Mode.
I'm assuming that the reasons that x86 processors need SMIs (temperature management, ...) are inevitably present on arm cores too.
2024-10-11 04:41 AM
@FredBarkins ,
What is the Yocto configuration you tried to set it up ? Did you activate all the Ftrace needed in your image ? https://wiki.st.com/stm32mpu/wiki/Ftrace
Kind regards,
Erwan.