[bootlin/training-materials updates] master: preempt-rt: more rtla stuff (6cf9beee)
Maxime Chevallier
maxime.chevallier at bootlin.com
Tue Oct 3 10:20:34 CEST 2023
Repository : https://github.com/bootlin/training-materials
On branch : master
Link : https://github.com/bootlin/training-materials/commit/6cf9beeee150f0b0ca956f07cd972677f7306018
>---------------------------------------------------------------
commit 6cf9beeee150f0b0ca956f07cd972677f7306018
Author: Maxime Chevallier <maxime.chevallier at bootlin.com>
Date: Tue Oct 3 10:18:17 2023 +0200
preempt-rt: more rtla stuff
Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
>---------------------------------------------------------------
6cf9beeee150f0b0ca956f07cd972677f7306018
.../realtime-linux-benchmarking.tex | 37 +++++++++++++++-------
.../realtime-linux-configuration.tex | 19 +++++++++++
2 files changed, 44 insertions(+), 12 deletions(-)
diff --git a/slides/realtime-linux-benchmarking/realtime-linux-benchmarking.tex b/slides/realtime-linux-benchmarking/realtime-linux-benchmarking.tex
index 41c24b06..cac354cf 100644
--- a/slides/realtime-linux-benchmarking/realtime-linux-benchmarking.tex
+++ b/slides/realtime-linux-benchmarking/realtime-linux-benchmarking.tex
@@ -115,6 +115,18 @@ cat /sys/kernel/tracing/tracing_max_latency
\end{itemize}
\end{frame}
+\begin{frame}
+ \frametitle{rtla}
+ \textbf{R}eal\textbf{T}ime \textbf{L}inux \textbf{A}nalysis tool
+ \begin{itemize}
+ \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
+ \item Can generate histograms, that can then be visualized
+ \end{itemize}
+
+\end{frame}
+
\begin{frame}
\frametitle{osnoise}
\begin{itemize}
@@ -145,6 +157,19 @@ cat /sys/kernel/tracing/tracing_max_latency
%%% Schematics
\end{frame}
+\begin{frame}
+ \frametitle{rtla autoanalysis}
+ \begin{itemize}
+ \item Running \code{timerlat -a <us>} will trigger the auto-analysis mode
+ \item A threshold is set with \code{-a}
+ \item Measurement will stop if a latency higher than the threshold is detected
+ \item Timerlat then prints a stack trace with the cause of the latency
+ \item Can identify if the latency comes from a \textbf{blocking} or an \textbf{interference}
+ \item Can identify the \textbf{task} of \textbf{interrupt} at the origin of the latency
+ \item Can identify if the \textbf{hardware} itself is the culprit
+ \end{itemize}
+\end{frame}
+
\begin{frame}
\frametitle{kernelshark}
\begin{itemize}
@@ -157,18 +182,6 @@ cat /sys/kernel/tracing/tracing_max_latency
\end{itemize}
\end{frame}
-\begin{frame}
- \frametitle{rtla}
- \textbf{R}eal\textbf{T}ime \textbf{L}inux \textbf{A}nalysis tool
- \begin{itemize}
- \item Developed 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
- \item Can generate histograms, that can then be visualized
- \end{itemize}
-
-\end{frame}
-
\begin{frame}
\frametitle{cyclictest}
\begin{itemize}
diff --git a/slides/realtime-linux-configuration/realtime-linux-configuration.tex b/slides/realtime-linux-configuration/realtime-linux-configuration.tex
index 3d425361..3672c390 100644
--- a/slides/realtime-linux-configuration/realtime-linux-configuration.tex
+++ b/slides/realtime-linux-configuration/realtime-linux-configuration.tex
@@ -71,6 +71,7 @@
\item \code{while read i; do /bin/echo $i; done < /dev/cpuset/tasks > /dev/cpuset/nontrt-set/tasks}
\item \code{/bin/echo $$ > /dev/cpuset/rt-set/tasks}
\end{itemize}
+ \item You can run tasks in a given set with \code{cgexec -g cpuset:rt-set ...}
\end{itemize}
\end{frame}
@@ -85,9 +86,27 @@
\item IRQs can be pinned to CPUs by tweaking \code{/proc/irq/XX/smp_affinity}
\item The \code{irqbalance} tool monitors and distributes the irq affinty to spread the load across CPUs
\item Use the \code{IRQBALANCE_BANNED_CPUS} environment variable to make \code{irqbalance} ignore some CPUs
+ \item The \code{irqaffinity} cmdline parameter can also be used
\end{itemize}
\end{frame}
+\begin{frame}
+ \frametitle{RCU Callbacks and Workqueues}
+ \begin{center}\textbf{RCU}\end{center}
+ \begin{itemize}
+ \item \textbf{R}ead \textbf{C}opy \textbf{U}pdate
+ \item Synchronisation mechanism that can deferred object reclamation
+ \item Deffered reclamation can be executed on any CPU \code{RCU callbacks}
+ \item We can preven CPU cores from running RCU callbacks with \code{rcu_nocbs=<cpus> rcu_nocb_poll}
+ \end{itemize}
+ \begin{center}\textbf{Workqueues}\end{center}
+ \begin{itemize}
+ \item Deferred execution mechanism
+ \item Can be pinned to CPUs in \code{/sys/devices/virtual/workqueue/cpumask}
+ \end{itemize}
+\end{frame}
+%TODO RCU/workqueues
+
% scheduling classes
\input{../common/scheduling-classes.tex}
More information about the training-materials-updates
mailing list