[bootlin/training-materials updates] master: preempt-rt : Refactor hwlatdetect, NMI, and introduce rtla (368a40e8)
Maxime Chevallier
maxime.chevallier at bootlin.com
Wed Jan 18 18:52:05 CET 2023
Repository : https://github.com/bootlin/training-materials
On branch : master
Link : https://github.com/bootlin/training-materials/commit/368a40e853a3a45f0a68960a43173d419f1c20f6
>---------------------------------------------------------------
commit 368a40e853a3a45f0a68960a43173d419f1c20f6
Author: Maxime Chevallier <maxime.chevallier at bootlin.com>
Date: Mon Jan 9 22:33:20 2023 +0100
preempt-rt : Refactor hwlatdetect, NMI, and introduce rtla
Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
>---------------------------------------------------------------
368a40e853a3a45f0a68960a43173d419f1c20f6
.../realtime-linux-benchmarking.tex | 49 ++++++++++++++++++----
.../realtime-linux-hardware.tex | 3 +-
2 files changed, 43 insertions(+), 9 deletions(-)
diff --git a/slides/realtime-linux-benchmarking/realtime-linux-benchmarking.tex b/slides/realtime-linux-benchmarking/realtime-linux-benchmarking.tex
index edb2d02a..2df43f88 100644
--- a/slides/realtime-linux-benchmarking/realtime-linux-benchmarking.tex
+++ b/slides/realtime-linux-benchmarking/realtime-linux-benchmarking.tex
@@ -73,6 +73,41 @@ cat /sys/kernel/tracing/tracing_max_latency
\end{itemize}
\end{frame}
+\begin{frame}
+ \frametitle{hwlatdetect}
+ Tool provided by \code{rt-tests}, relying on a dedicated kernel feature
+ \begin{itemize}
+ \item Allows detecting NMIs and Hardware latencies the kernel is normally unaware of
+ \item Runs a loop on all CPU cores with local interrupts disabled
+ \item Only NMIs and Hardware Latencies can interrupt the loop
+ \item Samples a high precision timer and looks for large gaps between samples
+ \item Useful to benchmark and validate a hardware platform
+ \item Must \textbf{not} be used in production environment, introduces huge latencies
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \frametitle{osnoise}
+ \begin{itemize}
+ \item Gives an overview of "noise" sources from the Kernel and the Hardware
+ \item Uses a similar measurement loop as \code{hwlatdetect}
+ \item Uses \code{tracepoints} to detect the source of noise :
+ \begin{itemize}
+ \item Thread Latency : Latencies due to the measuring thread being preempted
+ \item SoftIRQ Latency : Latencies due to softIRQ processing
+ \item IRQ Latency : Latencies introduced by IRQs
+ \item NMI Latency : Latencies introduced by NMIs
+ \item Hardware Latency : Latencies that aren't explained by any of the above
+ \end{itemize}
+ \item \code{trace-cmd start -p osnoise} : Start recording os noise events
+ \item \code{trace-cmd start -p osnoise -e osnoise} : Start recording noise events and trace their cause
+ \end{itemize}
+\end{frame}
+
+\begin{frame}
+ \frametitle{timerlat}
+\end{frame}
+
\begin{frame}
\frametitle{kernelshark}
\begin{itemize}
@@ -86,16 +121,14 @@ cat /sys/kernel/tracing/tracing_max_latency
\end{frame}
\begin{frame}
- \frametitle{hwlatdetect}
- Tool provided by \code{rt-tests}, relying on a dedicated kernel feature
+ \frametitle{rtla}
+ \textbf{R}eal\textbf{T}ime \textbf{L}inux \textbf{A}nalysis tool
\begin{itemize}
- \item Allows detecting NMIs, that the kernel is normally unaware of
- \item Runs a loop on all CPU cores with local interrupts disabled
- \item Only NMIs can interrupt the loop
- \item Samples a high precision timer and looks for large latencies
- \item Useful to benchmark and validate a hardware platform
- \item Must \textbf{not} be used in production environment, introduces huge latencies
+ \item Developped by Daniel Bristot de Oliveira
+ \item High-level interface to the \code{timerlat} and \code{osnoise} tracers
+ \item \code{rtla osnoise|timerlat top|hist} gives high-level view of noise and latencies
\end{itemize}
+
\end{frame}
\begin{frame}
diff --git a/slides/realtime-linux-hardware/realtime-linux-hardware.tex b/slides/realtime-linux-hardware/realtime-linux-hardware.tex
index d47cd931..3e0e22a7 100644
--- a/slides/realtime-linux-hardware/realtime-linux-hardware.tex
+++ b/slides/realtime-linux-hardware/realtime-linux-hardware.tex
@@ -14,7 +14,7 @@
\begin{frame}
\frametitle{Non-Maskable Interrupts}
- Non-Maskable Interrupts can't be disabled, and are often transparent to the OS
+ Non-Maskable Interrupts can't be disabled, and can be transparent to the OS
\begin{itemize}
\item Common NMIs are System Management Interrupts (SMIs)
\item SMIs run in a dedicated context, the System Management Mode
@@ -22,6 +22,7 @@
\item Used for thermal management, remote configuration, and are very opaque
\item Can't be prevented, predicted, monitored or controlled
\item Modern CPUs can expose a NMI counter
+ \item Kernel-processed NMIs can be instrumented with \code{ftrace}
\item \code{hwlatdetect} can help measure the NMIs on a given system
\end{itemize}
% SMM, SMI
More information about the training-materials-updates
mailing list