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 <thomas.richard@bootlin.com> Link: https://github.com/openwrt/openwrt/pull/21413 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
parent
9a584c631e
commit
c1c37b40c1
@ -448,6 +448,40 @@ config KERNEL_HWLAT_TRACER
|
|||||||
file. Every time a latency is greater than tracing_thresh, it will
|
file. Every time a latency is greater than tracing_thresh, it will
|
||||||
be recorded into the ring buffer.
|
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
|
config KERNEL_HIST_TRIGGERS
|
||||||
bool "Histogram triggers"
|
bool "Histogram triggers"
|
||||||
depends on KERNEL_FTRACE
|
depends on KERNEL_FTRACE
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user