108 lines · plain
1.. SPDX-License-Identifier: GPL-2.02 3============4rtla-hwnoise5============6------------------------------------------7Detect and quantify hardware-related noise8------------------------------------------9 10:Manual section: 111 12SYNOPSIS13========14 15**rtla hwnoise** [*OPTIONS*]16 17DESCRIPTION18===========19 20**rtla hwnoise** collects the periodic summary from the *osnoise* tracer21running with *interrupts disabled*. By disabling interrupts, and the scheduling22of threads as a consequence, only non-maskable interrupts and hardware-related23noise is allowed.24 25The tool also allows the configurations of the *osnoise* tracer and the26collection of the tracer output.27 28OPTIONS29=======30.. include:: common_osnoise_options.rst31 32.. include:: common_top_options.rst33 34.. include:: common_options.rst35 36EXAMPLE37=======38In the example below, the **rtla hwnoise** tool is set to run on CPUs *1-7*39on a system with 8 cores/16 threads with hyper-threading enabled.40 41The tool is set to detect any noise higher than *one microsecond*,42to run for *ten minutes*, displaying a summary of the report at the43end of the session::44 45 # rtla hwnoise -c 1-7 -T 1 -d 10m -q46 Hardware-related Noise47 duration: 0 00:10:00 | time is in us48 CPU Period Runtime Noise % CPU Aval Max Noise Max Single HW NMI49 1 #599 599000000 138 99.99997 3 3 4 7450 2 #599 599000000 85 99.99998 3 3 4 7551 3 #599 599000000 86 99.99998 4 3 6 7552 4 #599 599000000 81 99.99998 4 4 2 7553 5 #599 599000000 85 99.99998 2 2 2 7554 6 #599 599000000 76 99.99998 2 2 0 7555 7 #599 599000000 77 99.99998 3 3 0 7556 57 58The first column shows the *CPU*, and the second column shows how many59*Periods* the tool ran during the session. The *Runtime* is the time60the tool effectively runs on the CPU. The *Noise* column is the sum of61all noise that the tool observed, and the *% CPU Aval* is the relation62between the *Runtime* and *Noise*.63 64The *Max Noise* column is the maximum hardware noise the tool detected in a65single period, and the *Max Single* is the maximum single noise seen.66 67The *HW* and *NMI* columns show the total number of *hardware* and *NMI* noise68occurrence observed by the tool.69 70For example, *CPU 3* ran *599* periods of *1 second Runtime*. The CPU received71*86 us* of noise during the entire execution, leaving *99.99997 %* of CPU time72for the application. In the worst single period, the CPU caused *4 us* of73noise to the application, but it was certainly caused by more than one single74noise, as the *Max Single* noise was of *3 us*. The CPU has *HW noise,* at a75rate of *six occurrences*/*ten minutes*. The CPU also has *NMIs*, at a higher76frequency: around *seven per second*.77 78The tool should report *0* hardware-related noise in the ideal situation.79For example, by disabling hyper-threading to remove the hardware noise,80and disabling the TSC watchdog to remove the NMI (it is possible to identify81this using tracing options of **rtla hwnoise**), it was possible to reach82the ideal situation in the same hardware::83 84 # rtla hwnoise -c 1-7 -T 1 -d 10m -q85 Hardware-related Noise86 duration: 0 00:10:00 | time is in us87 CPU Period Runtime Noise % CPU Aval Max Noise Max Single HW NMI88 1 #599 599000000 0 100.00000 0 0 0 089 2 #599 599000000 0 100.00000 0 0 0 090 3 #599 599000000 0 100.00000 0 0 0 091 4 #599 599000000 0 100.00000 0 0 0 092 5 #599 599000000 0 100.00000 0 0 0 093 6 #599 599000000 0 100.00000 0 0 0 094 7 #599 599000000 0 100.00000 0 0 0 095 96SEE ALSO97========98 99**rtla-osnoise**\(1)100 101Osnoise tracer documentation: <https://www.kernel.org/doc/html/latest/trace/osnoise-tracer.html>102 103AUTHOR104======105Written by Daniel Bristot de Oliveira <bristot@kernel.org>106 107.. include:: common_appendix.rst108