| 1 |
.. SPDX-License-Identifier: GPL-2.0 |
| 2 |
|
| 3 |
.. |tool| replace:: hwnoise |
| 4 |
|
| 5 |
============ |
| 6 |
rtla-hwnoise |
| 7 |
============ |
| 8 |
------------------------------------------ |
| 9 |
Detect and quantify hardware-related noise |
| 10 |
------------------------------------------ |
| 11 |
|
| 12 |
:Manual section: 1 |
| 13 |
|
| 14 |
SYNOPSIS |
| 15 |
======== |
| 16 |
|
| 17 |
**rtla hwnoise** [*OPTIONS*] |
| 18 |
|
| 19 |
DESCRIPTION |
| 20 |
=========== |
| 21 |
|
| 22 |
**rtla hwnoise** collects the periodic summary from the *osnoise* tracer |
| 23 |
running with *interrupts disabled*. By disabling interrupts, and the scheduling |
| 24 |
of threads as a consequence, only non-maskable interrupts and hardware-related |
| 25 |
noise is allowed. |
| 26 |
|
| 27 |
The tool also allows the configurations of the *osnoise* tracer and the |
| 28 |
collection of the tracer output. |
| 29 |
|
| 30 |
OPTIONS |
| 31 |
======= |
| 32 |
.. include:: common_osnoise_options.txt |
| 33 |
|
| 34 |
.. include:: common_top_options.txt |
| 35 |
|
| 36 |
.. include:: common_options.txt |
| 37 |
|
| 38 |
EXAMPLE |
| 39 |
======= |
| 40 |
In the example below, the **rtla hwnoise** tool is set to run on CPUs *1-7* |
| 41 |
on a system with 8 cores/16 threads with hyper-threading enabled. |
| 42 |
|
| 43 |
The tool is set to detect any noise higher than *one microsecond*, |
| 44 |
to run for *ten minutes*, displaying a summary of the report at the |
| 45 |
end of the session:: |
| 46 |
|
| 47 |
# rtla hwnoise -c 1-7 -T 1 -d 10m -q |
| 48 |
Hardware-related Noise |
| 49 |
duration: 0 00:10:00 | time is in us |
| 50 |
CPU Period Runtime Noise % CPU Aval Max Noise Max Single HW NMI |
| 51 |
1 #599 599000000 138 99.99997 3 3 4 74 |
| 52 |
2 #599 599000000 85 99.99998 3 3 4 75 |
| 53 |
3 #599 599000000 86 99.99998 4 3 6 75 |
| 54 |
4 #599 599000000 81 99.99998 4 4 2 75 |
| 55 |
5 #599 599000000 85 99.99998 2 2 2 75 |
| 56 |
6 #599 599000000 76 99.99998 2 2 0 75 |
| 57 |
7 #599 599000000 77 99.99998 3 3 0 75 |
| 58 |
|
| 59 |
|
| 60 |
The first column shows the *CPU*, and the second column shows how many |
| 61 |
*Periods* the tool ran during the session. The *Runtime* is the time |
| 62 |
the tool effectively runs on the CPU. The *Noise* column is the sum of |
| 63 |
all noise that the tool observed, and the *% CPU Aval* is the relation |
| 64 |
between the *Runtime* and *Noise*. |
| 65 |
|
| 66 |
The *Max Noise* column is the maximum hardware noise the tool detected in a |
| 67 |
single period, and the *Max Single* is the maximum single noise seen. |
| 68 |
|
| 69 |
The *HW* and *NMI* columns show the total number of *hardware* and *NMI* noise |
| 70 |
occurrence observed by the tool. |
| 71 |
|
| 72 |
For example, *CPU 3* ran *599* periods of *1 second Runtime*. The CPU received |
| 73 |
*86 us* of noise during the entire execution, leaving *99.99997 %* of CPU time |
| 74 |
for the application. In the worst single period, the CPU caused *4 us* of |
| 75 |
noise to the application, but it was certainly caused by more than one single |
| 76 |
noise, as the *Max Single* noise was of *3 us*. The CPU has *HW noise,* at a |
| 77 |
rate of *six occurrences*/*ten minutes*. The CPU also has *NMIs*, at a higher |
| 78 |
frequency: around *seven per second*. |
| 79 |
|
| 80 |
The tool should report *0* hardware-related noise in the ideal situation. |
| 81 |
For example, by disabling hyper-threading to remove the hardware noise, |
| 82 |
and disabling the TSC watchdog to remove the NMI (it is possible to identify |
| 83 |
this using tracing options of **rtla hwnoise**), it was possible to reach |
| 84 |
the ideal situation in the same hardware:: |
| 85 |
|
| 86 |
# rtla hwnoise -c 1-7 -T 1 -d 10m -q |
| 87 |
Hardware-related Noise |
| 88 |
duration: 0 00:10:00 | time is in us |
| 89 |
CPU Period Runtime Noise % CPU Aval Max Noise Max Single HW NMI |
| 90 |
1 #599 599000000 0 100.00000 0 0 0 0 |
| 91 |
2 #599 599000000 0 100.00000 0 0 0 0 |
| 92 |
3 #599 599000000 0 100.00000 0 0 0 0 |
| 93 |
4 #599 599000000 0 100.00000 0 0 0 0 |
| 94 |
5 #599 599000000 0 100.00000 0 0 0 0 |
| 95 |
6 #599 599000000 0 100.00000 0 0 0 0 |
| 96 |
7 #599 599000000 0 100.00000 0 0 0 0 |
| 97 |
|
| 98 |
SEE ALSO |
| 99 |
======== |
| 100 |
|
| 101 |
**rtla-osnoise**\(1) |
| 102 |
|
| 103 |
Osnoise tracer documentation: <https://www.kernel.org/doc/html/latest/trace/osnoise-tracer.html> |
| 104 |
|
| 105 |
AUTHOR |
| 106 |
====== |
| 107 |
Written by Daniel Bristot de Oliveira <[email protected]> |
| 108 |
|
| 109 |
.. include:: common_appendix.txt |