From: Thomas Richard Date: Mon, 5 Jan 2026 15:31:36 +0000 (+0100) Subject: kernel: add OSNOISE_TRACER kernel config option X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1c37b40c1769b9b53cf9b0c2a05b0827f829652;p=thirdparty%2Fopenwrt.git kernel: add OSNOISE_TRACER kernel config option 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 Link: https://github.com/openwrt/openwrt/pull/21413 Signed-off-by: Hauke Mehrtens --- diff --git a/config/Config-kernel.in b/config/Config-kernel.in index 86d99bd49be..cb6e49d393a 100644 --- a/config/Config-kernel.in +++ b/config/Config-kernel.in @@ -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