You can check if the Interrupt System Management (SMI) is being serviced using a turbostat . For instance:
# turbostat sleep 120 [check column SMI for value greater than 0]
Of course, from this you can also calculate the SMI frequency.
Knowing that the media is really happening at a certain speed is important information. But you also want to know how much time System Management Mode (SMM) spends on these interrupts. For example, if the SMI interrupt is very short than it may not be relevant for your real-time application. On the other hand, if you have equipment with long SMI interruptions, you probably want to talk to your supplier, configure the firmware differently (if possible), or switch to other equipment with less intrusive SMM.
The perf tool has a mode that measures how many cycles are spent in SMM during SMI (using the information provided by specific CPU counters ). Example:
# perf stat -a -A --smi-cost -- sleep 120 Performance counter stats for 'system wide': SMI cycles% SMI
You can also look at the raw values ββwith:
Based on this, you can calculate how much time the average SMI takes on your machine. (divide the difference of cycles by the number of cycles per unit time).
Of course, it makes sense to double-check the results obtained on the basis of the processor counter with empirical results.
You can use the Linux hardware delay detector , which is built into the Linux kernel. Usage example:
# echo hwlat > /sys/kernel/debug/tracing/current_tracer
These tools are available on CentOS / RHEL 7 and should be available on other distributions.
As for the approximate indicators: I recently came across a 2011 HP ProLiant Gen8 Xeon server that runs 504 SMI per minute. Perf calculates the 0.1% frequency in SMM, and based on the counter values, the average time spent in SMI reaches several microseconds, but the Linux hwlat detector does not detect such high interruptions in this system.
This SMI is consistent with HP docs when setting up and configuring it. HPE ProLiant Server Guide for Low Latency Applications (October 2017):
Disabling system control interruptions to the processor provides one of the greatest benefits for low latency environments. Turning off power monitoring and using the SMI processor has the greatest effect, because it generates a processor interrupt eight times per second in G6 and later servers.
(my emphasis; and this guide also documents other media sources)
On a Supermicro board with an Intel Atom C3758 processor and my Intel NUC system (i5-4250U), the number of SMIs is exactly zero.
On a Dell laptop based on the Intel i7-6600U, the system reports 8 SMI per minute, but the aperture counter is lower than the (undistorted) cycle counter, which should not be.