]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
kernel: add OSNOISE_TRACER kernel config option
authorThomas Richard <thomas.richard@bootlin.com>
Mon, 5 Jan 2026 15:31:36 +0000 (16:31 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 24 Jan 2026 21:54:29 +0000 (22:54 +0100)
This adds the OSNOISE_TRACER kernel configuration option. The osnoise
tracer allows to track interference experienced by an application due to
activities inside the operating system (like NMIs, IRQs ...).

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/21413
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
config/Config-kernel.in

index 86d99bd49beb875cd70b958184e9890438fdce93..cb6e49d393a5eb2d72d82505dfe8240eac356d24 100644 (file)
@@ -448,6 +448,40 @@ config KERNEL_HWLAT_TRACER
          file. Every time a latency is greater than tracing_thresh, it will
          be recorded into the ring buffer.
 
+config KERNEL_OSNOISE_TRACER
+       bool "OS Noise tracer"
+       depends on KERNEL_FTRACE
+       help
+         In the context of high-performance computing (HPC), the Operating
+         System Noise (osnoise) refers to the interference experienced by an
+         application due to activities inside the operating system. In the
+         context of Linux, NMIs, IRQs, SoftIRQs, and any other system thread
+         can cause noise to the system. Moreover, hardware-related jobs can
+         also cause noise, for example, via SMIs.
+
+         The osnoise tracer leverages the hwlat_detector by running a similar
+         loop with preemption, SoftIRQs and IRQs enabled, thus allowing all
+         the sources of osnoise during its execution. The osnoise tracer takes
+         note of the entry and exit point of any source of interferences,
+         increasing a per-cpu interference counter. It saves an interference
+         counter for each source of interference. The interference counter for
+         NMI, IRQs, SoftIRQs, and threads is increased anytime the tool
+         observes these interferences' entry events. When a noise happens
+         without any interference from the operating system level, the
+         hardware noise counter increases, pointing to a hardware-related
+         noise. In this way, osnoise can account for any source of
+         interference. At the end of the period, the osnoise tracer prints
+         the sum of all noise, the max single noise, the percentage of CPU
+         available for the thread, and the counters for the noise sources.
+
+         In addition to the tracer, a set of tracepoints were added to
+         facilitate the identification of the osnoise source.
+
+         The output will appear in the trace and trace_pipe files.
+
+         To enable this tracer, echo in "osnoise" into the current_tracer
+         file.
+
 config KERNEL_HIST_TRIGGERS
        bool "Histogram triggers"
        depends on KERNEL_FTRACE