User Tools

Site Tools


realtime:documentation:howto:debugging:perf-smi-cost

This is an old revision of the document!


Perf stat - SMI cost

Perf's stat tool has an option that can measure the cost of SMIs (–smi-cost (–no-metric-only)) if the necessary MSRs exist on the CPU. This option can be used to determine the average number of cycles per SMI which were spent handling the SMIs that occurred during the measurement period. This Perf option is available as of the 4.13 linux kernel and will only work on recent Intel x86 processors.

Installation

On Debian, Perf can be installed using the package manager via the linux-perf package.

Setup

Because of how the average SMI duration is calculated, it is important to make sure that the CPU never goes idle while Perf is taking measurements.

Test

Give an example of a command that uses it?

Results

Discuss different ways to present the results? –no-metric-only versus percentage

Analysis

If the average number of cycles per SMI is above a few microseconds, then SMI handling could be taking more time than it should.

Because the tool only provides the average time taken to resolve SMIs during a certain period, the results should be interpreted carefully.

realtime/documentation/howto/debugging/perf-smi-cost.1531324209.txt.gz · Last modified: 2018/07/11 15:50 by ebugden