diff options
40 files changed, 1245 insertions, 37 deletions
diff --git a/application-devel/embedded-devel/pres_embedded-devel_de.tex b/application-devel/embedded-devel/pres_embedded-devel_de.tex index 22e0d8d..e8f2e87 100644 --- a/application-devel/embedded-devel/pres_embedded-devel_de.tex +++ b/application-devel/embedded-devel/pres_embedded-devel_de.tex @@ -344,7 +344,7 @@ libhello.so.1 -> libhello.so.1.0.2 # New minor version libhello.so.1 -> libhello.so.1.0.3 # New Major version -libhello.so.2 -> libhello.so.1.0.1 +libhello.so.2 -> libhello.so.2.0.1 \end{verbatim} SONAME beeinhaltet die Majornumber. Der Symbolic Link mit der Majornumber(SONAME) zeigt normalerweise auf die Bibliotheksversion @@ -392,7 +392,7 @@ GNU make kontrolliert und automatisiert Buildprozesse. \begin{frame}[containsverbatim] \frametitle{Einfaches Beispiel} \begin{lstlisting}[language=make,showtabs=true,tabsize=4,tab=\rightarrowfill] -% Makefile +# Makefile hello: hello.o gcc -o $@ $< diff --git a/distribution/debian/Makefile b/distribution/debian/Makefile new file mode 100644 index 0000000..d641258 --- /dev/null +++ b/distribution/debian/Makefile @@ -0,0 +1,9 @@ +all: + for pdf in `ls -1 *.tex` ; do \ + TEXINPUTS=`pwd`/../..:.:..:$(TEXINPUTS) pdflatex $$pdf; \ + TEXINPUTS=`pwd`/../..:.:..:$(TEXINPUTS) pdflatex $$pdf; \ + done + +clean: + rm -f *.aux *.log *.pdf *.log *.snm *.toc *.vrb *.nav *.out + diff --git a/distribution/debian/debian.png b/distribution/debian/debian.png Binary files differnew file mode 100644 index 0000000..e23ddfb --- /dev/null +++ b/distribution/debian/debian.png diff --git a/distribution/debian/dsa.png b/distribution/debian/dsa.png Binary files differnew file mode 100644 index 0000000..85d9e26 --- /dev/null +++ b/distribution/debian/dsa.png diff --git a/distribution/debian/pres_debian.tex b/distribution/debian/pres_debian.tex new file mode 100644 index 0000000..0009185 --- /dev/null +++ b/distribution/debian/pres_debian.tex @@ -0,0 +1,140 @@ +\input{configpres} + +\begin{frame} +\begin{figure}[ht] +\includegraphics[width=1.0\textwidth]{debian.png} +\end{figure} +Manuel Traut, Linutronix GmbH + +OSADL Networking Day 2013 + +May 28, 2013 +\end{frame} + +\subsection{Agenda} +\begin{frame} +Debian is a community driven distribution, + +well-known for + +its high quality standard + +and a clear focus on Security. + +We also have a look at the open-source infrastructure of Debian. +\end{frame} + +\subsection{Debian is a community driven distribution} +\begin{frame} +The Debian Project is +\begin{itemize} +\item a worldwide group of volunteers +\item an operating system distribution +\item composed entirely of free software +\end{itemize} +\end{frame} + + +\subsection{well-known for} +\begin{frame} +its huge number of supported architectures +\begin{itemize} +\item 32-Bit PC/Intel IA-32 (i386) +\item 64-Bit PC/Intel EM64T/x86-64 (amd64) +\item ARM EABI (armel and armhf for devices with FPU) +\item MIPS (mips - Big-Endian and mipsel - Little-Endian) +\item Motorola/IBM PowerPC (powerpc) +\item Sun/Oracle SPARC (sparc) +\item Intel Itanium (ia64) +\item IBM S/390 (31 Bit s390 und 64 Bit s390x) +\end{itemize} + +\dots and its huge number of packages (about 35.000 per arch) +\end{frame} + + +\subsection{its high quality standard} +\begin{frame} +There is an extensive set of policies and procedures for packaging and +delivering software. + +These standards are backed up by +\begin{itemize} +\item tools (dh\_make, lintian, debuild, reprepro) +\item automation (wanna\_build, version tracking) +\item documentation (http://debian.org/doc/): +\begin{itemize} + \item New Maintainer Guide + \item Debian Policies + \item Porting Guide + \item Developer Reference + \item Securing Debian +\end{itemize} +\end{itemize} +All of Debian's key elements are open and visible. +\end{frame} + + +\subsection{and a clear focus on security.} +\begin{frame} +\begin{itemize} +\item Security issues are discussed openly on the debian-security mailing list +\item When a security problem arises, the security update is prepared and + distributed as fast as possible. +\item There is a 'secure by default' policy for service installations + which could impose restrictions on their normal use. +\item Debian Security Advisories (DSAs) are sent to public mailing lists, + are published on http://www.debian.org/security/\#DSAS +\end{itemize} +\end{frame} + +\subsection{Debian Security Advisory} +\begin{frame} +\includegraphics[height=1.0\textheight]{dsa.png} +\end{frame} + +\subsection{Debian Infrastructure} +\begin{frame} +Debian has a great infrastructure which is also available as open-source. + +The following slides show a few components of the infrastructure. +\end{frame} + +\subsection{Debian Package Tracking System} +\begin{frame} +\includegraphics[width=1.0\textwidth]{qa.png} +\end{frame} + +\subsection{Source Repo of a Debian Package} +\begin{frame} +\includegraphics[width=1.0\textwidth]{x11-git.png} +\end{frame} + +\subsection{Debian Package Build} +\begin{frame} +\includegraphics[height=1.0\textheight]{x11-buildd.png} +\end{frame} + +\subsection{Debian Bugtracker} +\begin{frame} +\includegraphics[height=1.0\textheight]{x11-bugs.png} +\end{frame} + +\subsection{Debian Package Informations} +\begin{frame} +\includegraphics[height=1.0\textheight]{x11-pkg.png} +\end{frame} + +\subsection{Conclusion} +\begin{frame} +Debian stands for +\begin{itemize} +\item a huge number of packages and supported architectures +\item development is transparent and community driven +\item a focus on security +\item a strict licence compliance +\item good documentation in different languages +\end{itemize} +\end{frame} + +\input{tailpres} diff --git a/distribution/debian/qa.png b/distribution/debian/qa.png Binary files differnew file mode 100644 index 0000000..1895399 --- /dev/null +++ b/distribution/debian/qa.png diff --git a/distribution/debian/x11-bugs.png b/distribution/debian/x11-bugs.png Binary files differnew file mode 100644 index 0000000..5213ce9 --- /dev/null +++ b/distribution/debian/x11-bugs.png diff --git a/distribution/debian/x11-buildd.png b/distribution/debian/x11-buildd.png Binary files differnew file mode 100644 index 0000000..75d4da8 --- /dev/null +++ b/distribution/debian/x11-buildd.png diff --git a/distribution/debian/x11-git.png b/distribution/debian/x11-git.png Binary files differnew file mode 100644 index 0000000..514ab1b --- /dev/null +++ b/distribution/debian/x11-git.png diff --git a/distribution/debian/x11-pkg.png b/distribution/debian/x11-pkg.png Binary files differnew file mode 100644 index 0000000..9542fae --- /dev/null +++ b/distribution/debian/x11-pkg.png diff --git a/distribution/elbe-usage/pres_elbe-usage_en.tex b/distribution/elbe-usage/pres_elbe-usage_en.tex index be63d54..8e37ad5 100644 --- a/distribution/elbe-usage/pres_elbe-usage_en.tex +++ b/distribution/elbe-usage/pres_elbe-usage_en.tex @@ -318,7 +318,8 @@ elbe setsel <xmlfile> selections.list \begin{frame}[fragile] \frametitle{ELBE command overview: elbe-setcdrom} \begin{verbatim} -$ elbe setcdrom mysqueeze.xml elbe-cd.iso +$ elbe setcdrom mysqueeze.xml \ +/home/user/elbe-test/install.iso \end{verbatim} This command removes all configured mirrors and additional urls from the XML file and sets the given ISO image as the only mirror. \end{frame} diff --git a/distribution/elbe/Makefile b/distribution/elbe/Makefile new file mode 100644 index 0000000..d641258 --- /dev/null +++ b/distribution/elbe/Makefile @@ -0,0 +1,9 @@ +all: + for pdf in `ls -1 *.tex` ; do \ + TEXINPUTS=`pwd`/../..:.:..:$(TEXINPUTS) pdflatex $$pdf; \ + TEXINPUTS=`pwd`/../..:.:..:$(TEXINPUTS) pdflatex $$pdf; \ + done + +clean: + rm -f *.aux *.log *.pdf *.log *.snm *.toc *.vrb *.nav *.out + diff --git a/distribution/elbe/elbe-logo.png b/distribution/elbe/elbe-logo.png Binary files differnew file mode 100644 index 0000000..1d3c745 --- /dev/null +++ b/distribution/elbe/elbe-logo.png diff --git a/distribution/elbe/pres_elbe.tex b/distribution/elbe/pres_elbe.tex new file mode 100644 index 0000000..f1c5cd1 --- /dev/null +++ b/distribution/elbe/pres_elbe.tex @@ -0,0 +1,110 @@ +\input{configpres} + +\begin{frame} +\begin{figure}[ht] +\includegraphics[width=0.7\textwidth]{elbe-logo.png} +\end{figure} +\centerline{\large Embedded Linux Build Environment} +\vskip20pt +Manuel Traut, Linutronix GmbH + +OSADL Networking Day 2013 + +May 28, 2013 +\end{frame} + +\subsection{Agenda} +\begin{frame} +\begin{itemize} +\item What is elbe? +\item elbe Target Architectures +\item elbe Workflow +\item elbe Features +\end{itemize} +\end{frame} + +\subsection{What is elbe?} +\begin{frame} +\begin{itemize} +\item elbe is a tool based on selected components of the Debian infrastructure +\item it is NOT another embedded Linux distribution +\item it uses the well maintained Debian binary packages +\item own application is compiled natively in a virtual machine +\item no more cross-compiling! +\end{itemize} + + +The goal of the elbe project is to + +make embedded Linux development easier and reproducable +\end{frame} + +\subsection{elbe Target Architectures} +\begin{frame} +It currently supports the following Target architectures: +\begin{itemize} +\item x86 (32 and 64 bit) +\item powerpc +\item arm and armhf +\end{itemize} +\end{frame} + +\subsection{elbe Workflow} +\begin{frame} +\begin{itemize} +\item use an example XML file and customize it +\item generate a Buildenvironment +\item build Debian Binary Package(s) from your own Application +\item add the custom Packages to the XML file +\item build the Target Image +\end{itemize} +\end{frame} + +\subsection{elbe Features / elbe Output} +\begin{frame} +\begin{itemize} +\item Buildenvironment for native development + + inside a qemu virtual machine +\item ready to use Target Image + +(tar.gz, cpio, UBI, HD/SDcard) +\item Licence Informations for all used packages +\item Source and Binary Packages as ISO Image, + +usable for regeneration builds +\end{itemize} +\end{frame} + +\subsection{elbe Features} +\begin{frame} +\begin{itemize} +\item different modes for Target Image generation +\item finetuning rules in XML +\item archive.tar.bz2 for config files embedded in XML +\item Update checker +\item Emdebian (grip) Packages can be used +\end{itemize} +\end{frame} + +\subsection{References} +\begin{frame} +\begin{description} +\item[elbe website] http://elbe-rfs.org +\item[elbe source] http://github.com/linutronix/elbe +\item[Debian website] http://debian.org +\end{description} +\end{frame} + +\subsection{Conclusion} +\begin{frame} +\begin{itemize} +\item focus on your application +\item reuse the power of Debian, don't build everything again +\item reproduce your Target Image even in 10 years ore more +\item it's possible to build full featured Debian Images +\item and optimized Images without dpkg/apt functionality +\end{itemize} +\end{frame} + +\input{tailpres} diff --git a/distribution/section.tex b/distribution/section.tex index 41fa146..da6249a 100644 --- a/distribution/section.tex +++ b/distribution/section.tex @@ -1 +1 @@ -\section{ELBE} +\section{Distributions} diff --git a/images/BigTreeClassicRCU.png b/images/BigTreeClassicRCU.png Binary files differnew file mode 100644 index 0000000..131d9dd --- /dev/null +++ b/images/BigTreeClassicRCU.png diff --git a/images/GracePeriodGood.png b/images/GracePeriodGood.png Binary files differnew file mode 100644 index 0000000..f6812c9 --- /dev/null +++ b/images/GracePeriodGood.png diff --git a/images/asource.png b/images/asource.png Binary files differnew file mode 100644 index 0000000..1c6f0d4 --- /dev/null +++ b/images/asource.png diff --git a/images/kdirsource.png b/images/kdirsource.png Binary files differnew file mode 100644 index 0000000..2dd19ec --- /dev/null +++ b/images/kdirsource.png diff --git a/images/ksource.png b/images/ksource.png Binary files differnew file mode 100644 index 0000000..fbc5693 --- /dev/null +++ b/images/ksource.png diff --git a/images/overview.png b/images/overview.png Binary files differnew file mode 100644 index 0000000..ac53578 --- /dev/null +++ b/images/overview.png diff --git a/images/pinh.png b/images/pinh.png Binary files differnew file mode 100644 index 0000000..1862002 --- /dev/null +++ b/images/pinh.png diff --git a/images/pinv.png b/images/pinv.png Binary files differnew file mode 100644 index 0000000..902bc5f --- /dev/null +++ b/images/pinv.png diff --git a/images/rtarch.png b/images/rtarch.png Binary files differnew file mode 100644 index 0000000..e58ffab --- /dev/null +++ b/images/rtarch.png diff --git a/images/rtkernel.png b/images/rtkernel.png Binary files differnew file mode 100644 index 0000000..e2ead31 --- /dev/null +++ b/images/rtkernel.png diff --git a/images/rtsource.png b/images/rtsource.png Binary files differnew file mode 100644 index 0000000..009e8c7 --- /dev/null +++ b/images/rtsource.png diff --git a/images/rwlockRCUupdate.jpg b/images/rwlockRCUupdate.jpg Binary files differnew file mode 100644 index 0000000..edcedcd --- /dev/null +++ b/images/rwlockRCUupdate.jpg diff --git a/kernel-devel/kernel-debugging/pres_kernel-debugging_en.tex b/kernel-devel/kernel-debugging/pres_kernel-debugging_en.tex index cc1824f..82dc25b 100644 --- a/kernel-devel/kernel-debugging/pres_kernel-debugging_en.tex +++ b/kernel-devel/kernel-debugging/pres_kernel-debugging_en.tex @@ -2,6 +2,73 @@ \title{Kernel-Debugging} \maketitle + +\section{Kernel Configuration} +\begin{frame} +\frametitle{Kernel hacking / printk and dmesg options} +\begin{itemize} +\item Show timing information on printks +\item Default message log level (1-7) +\item Enable dynamic printk() support +\end{itemize} +\end{frame} + +\begin{frame} +\frametitle{Kernel hacking / Compile-time checks and compiler options} +\begin{itemize} +\item Compile the kernel with debug info +\item Debug Filesystem +\end{itemize} +\end{frame} + +\begin{frame} +\frametitle{Kernel hacking / Memory Debugging} +\begin{itemize} +\item Kernel memory leak detector +\end{itemize} +reports leaks in /sys/kernel/debug/kmemleak + +see also: Documentation/kmemleak.txt +\end{frame} + +\begin{frame} +\frametitle{Kernel hacking / Debug Lockups and Hangs} +\begin{itemize} +\item Debug Lockups and Hangs +\begin{description} +\item[Softlockup] loop in kernel mode +\item[Hardlockup] CPU loop in kernel mode without letting IRQs run +\item[Hung task] task is uninterruptible (D state) +\end{description} +\end{itemize} +stack trace is printed on detection +\end{frame} + +\begin{frame} +\frametitle{Kernel hacking / Lock Debugging} +\begin{itemize} +\item RT Mutex debugging, deadlock detection +\item Lock debugging: prove locking correctness, see Documentation/lockdep-design.txt. +\end{itemize} +\end{frame} + +\begin{frame} +\frametitle{Kernel hacking / Tracing} +\begin{itemize} +\item Kernel Function (Graph) Tracer +\item Scheduling Latency Tracer +\item Enable [k/u]probes-based dynamic events +\item enable/disable function tracing dynamically +\item Ring buffer benchmark stress tester (!!don't use it!!) +\end{itemize} +\end{frame} + +\begin{frame} +\frametitle{Kernel hacking} +\begin{description} +\item[Remote debugging over FireWire] Documentation/debugging-via-ohci1394.txt +\end{description} +\end{frame} \section{printk} \begin{frame}[fragile] \frametitle{printk is your friend!!} @@ -38,6 +105,25 @@ $ cat /proc/sys/kernel/printk \end{verbatim} \end{frame} +\section{dynamic printk} +\begin{frame} +\frametitle{dynamic printk} +controlled by debugfs: dynamic\_debug/control + +format: filename:lineno [module]function flags format +\begin{description} +\item[filename] source file of the debug statement +\item[lineno] line number of the debug statement +\item[module] module that contains the debug statement +\item[function] function that contains the debug statement +\item[flags] '=p' means the line is turned 'on' for printing +\item[format] the format used for the debug statement +\end{description} +Use pr\_debug() and dev\_dbg() in your code. + +see also: Documentation/dynamic-debug-howto.txt +\end{frame} + \section{Logging messages} \begin{frame}[fragile] \frametitle{Serial Console} diff --git a/kernel-devel/kernel-perf/Makefile b/kernel-devel/kernel-perf/Makefile new file mode 100644 index 0000000..d641258 --- /dev/null +++ b/kernel-devel/kernel-perf/Makefile @@ -0,0 +1,9 @@ +all: + for pdf in `ls -1 *.tex` ; do \ + TEXINPUTS=`pwd`/../..:.:..:$(TEXINPUTS) pdflatex $$pdf; \ + TEXINPUTS=`pwd`/../..:.:..:$(TEXINPUTS) pdflatex $$pdf; \ + done + +clean: + rm -f *.aux *.log *.pdf *.log *.snm *.toc *.vrb *.nav *.out + diff --git a/kernel-devel/kernel-perf/pres_kernel-perf_en.tex b/kernel-devel/kernel-perf/pres_kernel-perf_en.tex new file mode 100644 index 0000000..b6edfc0 --- /dev/null +++ b/kernel-devel/kernel-perf/pres_kernel-perf_en.tex @@ -0,0 +1,135 @@ +\input{configpres} + +\title{perf} +\section{Performance Analyzation} +\maketitle + +\begin{frame} +\frametitle{What is perf?} +Perf is a profiler tool for Linux 2.6+ based systems. +\begin{itemize} +\item perf\_events interface of the Linux kernel +\item perf userspace tool +\item access perf events from own applications +\end{itemize} +Perf is an event counter, no tracer. +\end{frame} + +\begin{frame} +\frametitle{perf events} +\begin{itemize} +\item hardware performance counters (PMU of Host CPU) +\item tracepoint events (from ftrace) +\item dynamic probes (e.g. kprobes or uprobes) +\end{itemize} +\end{frame} + +\begin{frame} +\frametitle{perf subcommands I} +\begin{description} +\item[list] list available events +\item[stat] measure total event count for single program or for system, for + some time +\item[top] top-like dynamic view of hottest functions +\item[record] measure and save sampling data for single program +\item[report] analyze file generated by perf record; + can generate flat, or graph profile +\item[diff] Read two perf.data files and display the differential profile +\end{description} +\end{frame} + +\begin{frame} +\frametitle{perf subcommands II} +\begin{description} +\item[sched] tracing/measuring of scheduler actions and latencies +\item[lock] analyze lock events +\item[timechart]tool to visualize total system behavior during a workload +\end{description} +\end{frame} + + +\begin{frame} +\frametitle{selecting events} +\begin{description} +\item[-e] use the specified event +\item[-f] filter events, e.g. -e irq:irq\_handler\_entry --filter irq==18 +\end{description} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Example: live-view of page-fault event} +\begin{lstlisting} +# perf stat chromium + Performance counter stats for 'chromium': + + 3733.112825 task-clock # 0.716 CPUs utilized + 8,696 context-switches # 0.002 M/sec + 1,063 cpu-migrations # 0.285 K/sec + 134,686 page-faults # 0.036 M/sec + 9,102,760,996 cycles # 2.438 GHz +[83.59%] + 6,217,623,412 stalled-cycles-frontend # 68.30% frontend cycles idle +[83.32%] + 4,755,104,208 stalled-cycles-backend # 52.24% backend cycles idle +[67.20%] + 7,262,564,269 instructions # 0.80 insns per cycle + # 0.86 stalled cycles per insn +[83.72%] + 1,495,191,394 branches # 400.521 M/sec +[83.38%] + 26,037,805 branch-misses # 1.74% of all branches +[83.04%] + + 5.214978731 seconds time elapsed +\end{lstlisting} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Example: live-view of page-fault event} +\begin{lstlisting} +# sudo perf top -e page-faults +Samples: 562 of event 'page-faults', Event count (approx.): 4557 + 62.32% libc-2.17.so [.] __memcpy_ssse3_back + 20.36% libc-2.17.so [.] _int_malloc + 3.16% module.so [.] evas_gl_common_context_font_push + 2.83% libevas.so.1.7.7 [.] 0x0000000000083237 + 2.37% libdricore9.0.2.so.1.0.0 [.] 0x0000000000126050 + 1.80% libxul.so (deleted) [.] 0x000000000182e48f + 1.12% [kernel] [k] file_read_actor + 0.92% libfontconfig.so.1.6.2 [.] 0x000000000001bd43 + 0.88% libdrm_intel.so.1.0.0 [.] 0x0000000000008503 + 0.79% libc-2.17.so [.] __memset_sse2 + 0.75% libeet.so.1.7.7 [.] eet_data_image_header_decode_cipher + 0.61% module.so [.] evas_gl_common_context_image_push + 0.42% libfreetype.so.6.10.0 [.] FT_Stream_ReadFields + 0.42% libecore_x.so.1.7.7 [.] ecore_x_netwm_icons_set + 0.24% libelementary.so.1.7.7 [.] 0x000000000005ae60 +\end{lstlisting} +\end{frame} + + +\begin{frame}[fragile] +\frametitle{Example: count CPU cycles of a ls call} +\begin{lstlisting} +# perf record -e cpu-cycles ls +<output of ls> +[ perf record: Woken up 1 times to write data ] +[ perf record: Captured and wrote 0.008 MB perf.data (~334 samples) ] +# perf report +Samples: 24 of event 'cpu-cycles', Event count (approx.): 12333055 + 21.67% ls [kernel.kallsyms] [k] get_unmapped_area + 20.77% ls ld-2.17.so [.] _dl_map_object_deps + 17.21% ls [kernel.kallsyms] [k] __slab_free + 15.73% ls [kernel.kallsyms] [k] tty_insert_flip_string_fixed_flag + 12.65% ls [kernel.kallsyms] [k] unlock_page + 6.94% ls libc-2.17.so [.] __strlen_sse2 + 3.41% ls [kernel.kallsyms] [k] count.isra.17.constprop.28 + 1.02% ls [kernel.kallsyms] [k] get_pageblock_flags_group + 0.41% ls [kernel.kallsyms] [k] perf_event_context_sched_in + 0.13% ls [kernel.kallsyms] [k] perf_ctx_unlock + 0.07% ls [kernel.kallsyms] [k] native_write_msr_safe +\end{lstlisting} +\end{frame} + + +\input{tailpres} diff --git a/kernel-devel/kernel-tracing/pres_kernel-tracing_en.tex b/kernel-devel/kernel-tracing/pres_kernel-tracing_en.tex index d73a10f..f185e58 100644 --- a/kernel-devel/kernel-tracing/pres_kernel-tracing_en.tex +++ b/kernel-devel/kernel-tracing/pres_kernel-tracing_en.tex @@ -7,7 +7,7 @@ \frametitle{Kerneltracing: Overview} \begin{itemize} \item DebugFS interface -\item Different tracers: function, function\_graph, sched\_switch, ... +\item Different tracers: function, function\_graph, wakeup, wakeup\_rt, \dots \item Custom trace events \item Graphical frontend (kernelshark) \end{itemize} @@ -62,18 +62,24 @@ wnck-2022 [003] 5766.659918: kfree <-skb \frametitle{Tracer: function / latency\_format} \begin{verbatim} $ echo 1 > options/latency_format -$ less trace -# _------=> CPU# -# / _-----=> irqs-off -# | / _----=> need-resched -# || / _---=> hardirq/softirq -# ||| / _--=> preempt-depth -# |||| /_--=> lock-depth -# |||||/ delay -# cmd pid |||||| time | caller -# \ / |||||| \ | / -wnck-app-2022 3..... 1237702us : skb_relea -wnck-app-2022 3..... 1237703us : sock_wfre +# tracer: function +# +# function latency trace v1.1.5 on 3.9.4-x1-00124-g0bfd8ff +# -------------------------------------------------------------------- +# latency: 0 us, #204955/25306195, CPU#0 | (M:desktop VP:0, KP:0, SP:0 HP:0 #P:4) +# ----------------- +# | task: -0 (uid:0 nice:0 policy:0 rt_prio:0) +# ----------------- +# +# _------=> CPU# +# / _-----=> irqs-off +# | / _----=> need-resched +# || / _---=> hardirq/softirq +# ||| / _--=> preempt-depth +# |||| / delay +# cmd pid ||||| time | caller +# \ / ||||| \ | / +terminol-11964 1.... 11639243us : ep_read_events_proc <-ep_scan_ready_list.isra.8 \end{verbatim} \end{frame} @@ -95,22 +101,6 @@ $ less trace \end{frame} \begin{frame}[fragile] -\frametitle{Tracer: sched\_switch} -\tiny -\begin{verbatim} -# tracer: sched_switch -# -# TASK-PID CPU# TIMESTAMP FUNCTION -# | | | | | - bash-4328 [003] 78.553966: 4328:120:S + [003] 4328:120:S bash - bash-4328 [003] 78.553979: 4328:120:S ==> [003] 0:120:R <idle> -<idle>-0 [003] 78.553986: 0:120:R + [003] 13:120:R ksoftirqd/3 -<idle>-0 [003] 78.553988: 0:120:R ==> [003] 13:120:R ksoftirqd/3 - -\end{verbatim} -\end{frame} - -\begin{frame}[fragile] \frametitle{Tracer: wakeup\_rt} \tiny \begin{verbatim} diff --git a/kernel-devel/kexec-and-crash-kernel/Makefile b/kernel-devel/kexec-and-crash-kernel/Makefile new file mode 100644 index 0000000..d641258 --- /dev/null +++ b/kernel-devel/kexec-and-crash-kernel/Makefile @@ -0,0 +1,9 @@ +all: + for pdf in `ls -1 *.tex` ; do \ + TEXINPUTS=`pwd`/../..:.:..:$(TEXINPUTS) pdflatex $$pdf; \ + TEXINPUTS=`pwd`/../..:.:..:$(TEXINPUTS) pdflatex $$pdf; \ + done + +clean: + rm -f *.aux *.log *.pdf *.log *.snm *.toc *.vrb *.nav *.out + diff --git a/kernel-devel/kexec-and-crash-kernel/crashkernel_patches/crashkernel.diff b/kernel-devel/kexec-and-crash-kernel/crashkernel_patches/crashkernel.diff new file mode 100644 index 0000000..1d3e082 --- /dev/null +++ b/kernel-devel/kexec-and-crash-kernel/crashkernel_patches/crashkernel.diff @@ -0,0 +1,65 @@ +From: Magnus Damm <damm at opensource.se> + +Update the copy_oldmem_page() function to ioremap() only +when accessing memory that is outside the regular range +of system memory that is managed by the kernel. + +Without this patch a warning is triggered in the ARM-specific +ioremap implementation, see WARN_ON(pfn_valid()) in ioremap.c + +The copy_oldmem_page() function is used by the secondary crash +kernel to access memory using the /proc/vmcore code implemented +in fs/proc/vmcore.c. To pass information from the first kernel +to the secondary crash kernel a kernel command line option is +used to point out where the elf core hdr is located. + +The crash kernel is loaded through kexec-tools which also contains +code that reserves memory for the elfcorehdr= option. This memory +block is reserved _inside_ the main system memory of the secondary +kernel. The /proc/vmcore code in the secondary kernel is however +using copy_oldmem_page() to access both this elfcorehdr area and +the rest of the memory used by the the first kernel. + +So the copy_oldmem_page() function is used to access data that +may be located in system memory, or it may be outside. Always +using ioremap will not work, so this patch makes it conditional +based on pfn_valid(). + +For more details please look at the sh7372-based example here: +http://permalink.gmane.org/gmane.linux.ports.sh.devel/11502 + +Signed-off-by: Magnus Damm <damm at opensource.se> +--- + + arch/arm/kernel/crash_dump.c | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +--- 0001/arch/arm/kernel/crash_dump.c ++++ work/arch/arm/kernel/crash_dump.c 2011-06-18 20:59:49.000000000 +0900 +@@ -39,9 +39,13 @@ ssize_t copy_oldmem_page(unsigned long p + if (!csize) + return 0; + +- vaddr = ioremap(pfn << PAGE_SHIFT, PAGE_SIZE); +- if (!vaddr) +- return -ENOMEM; ++ if (pfn_valid(pfn)) { ++ vaddr = phys_to_virt(pfn << PAGE_SHIFT); ++ } else { ++ vaddr = ioremap(pfn << PAGE_SHIFT, PAGE_SIZE); ++ if (!vaddr) ++ return -ENOMEM; ++ } + + if (userbuf) { + if (copy_to_user(buf, vaddr + offset, csize)) { +@@ -52,6 +56,8 @@ ssize_t copy_oldmem_page(unsigned long p + memcpy(buf, vaddr + offset, csize); + } + +- iounmap(vaddr); ++ if (!pfn_valid(pfn)) ++ iounmap(vaddr); ++ + return csize; + } diff --git a/kernel-devel/kexec-and-crash-kernel/crashkernel_patches/kexec_fix_arm_braindamage.diff b/kernel-devel/kexec-and-crash-kernel/crashkernel_patches/kexec_fix_arm_braindamage.diff new file mode 100644 index 0000000..877f5ea --- /dev/null +++ b/kernel-devel/kexec-and-crash-kernel/crashkernel_patches/kexec_fix_arm_braindamage.diff @@ -0,0 +1,28 @@ +Index: kexec-tools-2.0.3/kexec/arch/arm/crashdump-arm.c +=================================================================== +--- kexec-tools-2.0.3.orig/kexec/arch/arm/crashdump-arm.c 2011-10-03 00:56:38.000000000 +0200 ++++ kexec-tools-2.0.3/kexec/arch/arm/crashdump-arm.c 2013-07-06 17:26:13.410309437 +0200 +@@ -204,12 +204,12 @@ + * @cmdline. Note that @cmdline must be at least %COMMAND_LINE_SIZE bytes long + * (including %NUL). + */ +-static void cmdline_add_mem(char *cmdline, unsigned long size) ++static void cmdline_add_mem(char *cmdline, unsigned long size, unsigned long offset) + { + char buf[COMMAND_LINE_SIZE]; + int buflen; + +- buflen = snprintf(buf, sizeof(buf), "%s mem=%ldK", cmdline, size >> 10); ++ buflen = snprintf(buf, sizeof(buf), "%s mem=%ldK@0x%X", cmdline, size >> 10, offset); + if (buflen < 0) + die("Failed to construct mem= command line parameter\n"); + if (buflen >= sizeof(buf)) +@@ -301,7 +301,7 @@ + * prevents the dump capture kernel from using any other memory regions + * which belong to the primary kernel. + */ +- cmdline_add_mem(mod_cmdline, elfcorehdr - crash_reserved_mem.start); ++ cmdline_add_mem(mod_cmdline, elfcorehdr - crash_reserved_mem.start, crash_reserved_mem.start); + + dump_memory_ranges(); + dbgprintf("kernel command line: \"%s\"\n", mod_cmdline); diff --git a/kernel-devel/kexec-and-crash-kernel/crashkernel_patches/zreladdr.diff b/kernel-devel/kexec-and-crash-kernel/crashkernel_patches/zreladdr.diff new file mode 100644 index 0000000..867e13a --- /dev/null +++ b/kernel-devel/kexec-and-crash-kernel/crashkernel_patches/zreladdr.diff @@ -0,0 +1,13 @@ +Index: linux-3.2/arch/arm/mach-omap2/Makefile.boot +=================================================================== +--- linux-3.2.orig/arch/arm/mach-omap2/Makefile.boot 2012-01-05 00:55:44.000000000 +0100 ++++ linux-3.2/arch/arm/mach-omap2/Makefile.boot 2013-07-06 17:00:18.718516198 +0200 +@@ -1,3 +1,8 @@ ++ifeq ($(CONFIG_CRASH_DUMP),y) ++ zreladdr-y += 0x84008000 ++params_phys-y := 0x84000100 ++else + zreladdr-y += 0x80008000 + params_phys-y := 0x80000100 ++endif + initrd_phys-y := 0x80800000 diff --git a/kernel-devel/kexec-and-crash-kernel/pres_kexec_and_crashkernel_en.tex b/kernel-devel/kexec-and-crash-kernel/pres_kexec_and_crashkernel_en.tex new file mode 100644 index 0000000..1791267 --- /dev/null +++ b/kernel-devel/kexec-and-crash-kernel/pres_kexec_and_crashkernel_en.tex @@ -0,0 +1,70 @@ +\input{configpres} + +\title{Kexec and Crashkernels} +\maketitle +\begin{frame} +\frametitle{What is kexec?} +Kexec is a mechanism to boot Linux from within Linux, +without going through the BIOS / the Bootloader. +\end{frame} + +\begin{frame} +\frametitle{kexec-tools} +http://horms.net/projects/kexec/ +\end{frame} + +\begin{frame}[fragile] +\frametitle{Using kexec: Kernel configuration} +\begin{verbatim} +Boot options --> +[*] Kexec system call +\end{verbatim} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Using kexec: Booting the new kernel} +\begin{verbatim} +# Load the kernel image and set the commandline +$ kexec -l uImage --append=$(cat /proc/cmdline) +# Start the new kernel +$ kexec -e +\end{verbatim} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Using kexec: Crashkernel} +\begin{itemize} +\item Build production kernel (enable kexec system call!) +\item Build ''crash kernel'' (enable kexec system call and crash dump kernel): +\begin{verbatim} +Boot options --> +[*] Kexec system call +[*] Build kdump crash kernel +\end{verbatim} +\item The crash kernel option should automatically select /proc/vmcore +\end{itemize} +\end{frame} + + +\begin{frame}[fragile] +\frametitle{Using kexec: Crashkernel} +\begin{itemize} +\item Boot production kernel (Commandline: crashkernel=256M@0x84000000) +\item Check if crashkernel memory was reserved: +\begin{verbatim} +cat /proc/iomem | grep Crash + 84000000-93ffffff : Crash kernel +\end{verbatim} +\item Load crash kernel and let the system crash ;-) +\begin{verbatim} +kexec -p uImage-crash \ + --append="$(cat /proc/cmdline | \ + sed 's/crashkernel/bla/')" +echo c > /proc/sysrq-trigger +\end{verbatim} +\item After crashing the crash kernel should boot up! +\item Within the crashkernel the core file for the production kernel is available in /proc/vmcore +\end{itemize} +\end{frame} + +\input{tailpres} diff --git a/linux-basics/filesystems/pres_filesystems_en.tex b/linux-basics/filesystems/pres_filesystems_en.tex index 5b1149b..e6339e5 100644 --- a/linux-basics/filesystems/pres_filesystems_en.tex +++ b/linux-basics/filesystems/pres_filesystems_en.tex @@ -29,6 +29,10 @@ \item ReiserFS \item XFS \end{itemize} +Filesystem for ''flash based'' block devices: +\begin{itemize} +\item F2FS +\end{itemize} \end{frame} \subsubsection{For flash} @@ -71,7 +75,8 @@ size of a filesystem \begin{itemize} \item \textbf{N}o journalling filesystem \item A good choice for ''flash-based block devices'', like SD cards or USB -sticks (ext2 minimizes the number of writes) +sticks (ext2 minimizes the number of writes), if you have heavy write access. F2FS +might be an alternative for flash devices \item Supported block sizes: 1kb, 2kb, 4kb, 8kb \item Max. filesystem size: 32TB (for 8kb blocks) \end{itemize} @@ -113,6 +118,16 @@ sticks (ext2 minimizes the number of writes) \subsubsection{Flash filesystems} \begin{frame} +\frametitle{F2FS} +\begin{itemize} +\item F lash F riendly F ilesystem +\item Available since Linux Kernel 3.8 (backports available back to 3.0) +\item Not a ''real'' flashfilesystem +\item For ''NAND flash based'' block devices, like SD, MMC, eMMC, ... +\end{itemize} +\end{frame} + +\begin{frame} \frametitle{JFFS2} \begin{itemize} \item Flash filesystem diff --git a/realtime/rt-internals/Makefile b/realtime/rt-internals/Makefile new file mode 100644 index 0000000..d641258 --- /dev/null +++ b/realtime/rt-internals/Makefile @@ -0,0 +1,9 @@ +all: + for pdf in `ls -1 *.tex` ; do \ + TEXINPUTS=`pwd`/../..:.:..:$(TEXINPUTS) pdflatex $$pdf; \ + TEXINPUTS=`pwd`/../..:.:..:$(TEXINPUTS) pdflatex $$pdf; \ + done + +clean: + rm -f *.aux *.log *.pdf *.log *.snm *.toc *.vrb *.nav *.out + diff --git a/realtime/rt-internals/pres_rt-internals_en.tex b/realtime/rt-internals/pres_rt-internals_en.tex new file mode 100644 index 0000000..baeb2e1 --- /dev/null +++ b/realtime/rt-internals/pres_rt-internals_en.tex @@ -0,0 +1,511 @@ +% on the following slides, include icon in the left sidebar +\def\lximg{/usr/share/lx/icons/fueller.png} + +\input{configpres} + +\title{Linux Preempt-RT internals} +\maketitle + +% stop displaying 'fueller.png' on the following slides +\def\lximg{none} + +\subsection{Linux Real-Time history} +\begin{frame}[fragile] +\frametitle{Linux Real-Time history} +\begin{beamerboxesrounded}[shadow=true]{First projects in the late 1990s} +\begin{itemize} +\item KURT - Kansas University +\item RTAI - University of Milano +\item RTLinux - New Mexico Tech - Soccoro, New Mexico +\item Linux/RK - Carnegie Mellon Univeristy, Pittsburgh +\item QLinux - University of Massachusetts +\item DROPS - University of Dresden +\item ... +\end{itemize} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Linux Real-Time history} +\begin{beamerboxesrounded}[shadow=true]{Approaches} +\begin{itemize} +\item Linux as the idle thread of a nano/micro kernel +\item Linux with implicit Real-Time properties +\end{itemize} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Linux Real-Time history} +\begin{beamerboxesrounded}[shadow=true]{Opinion I} +\begin{quote} +With RTLinux, you have to split the app up into the hard realtime part +and the rest. +\newline +Which is, in my opinion, the only sane way to handle hard realtime. No +confusion about priority inversions, no crap. +\end{quote} +\begin{flushright} +Linus Torvalds - 2002 +\end{flushright} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Linux Real-Time history} +\begin{beamerboxesrounded}[shadow=true]{Opinion II} +\begin{quote} +It is impossible to turn a General Purpose Operating System Kernel +into a Real-Time Operating System Kernel! +\end{quote} +\begin{flushright} +Unknown participant of a podium discussion about Linux Real-Time - 2004 +\end{flushright} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Linux Real-Time history} +\begin{beamerboxesrounded}[shadow=true]{Preempt-RT} +\begin{itemize} +\item Started 2004 by Ingo Molnar +\item In kernel real-time approach +\item Driven by mainline kernel developers +\end{itemize} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Linux Real-Time history} +\begin{beamerboxesrounded}[shadow=true]{Opinion III} +\begin{quote} +Controlling a laser with Linux is crazy, but everyone in this room is +crazy in his own way. So if you want to use Linux to control an +industrial welding laser, I have no problem with your using +PREEMPT\_RT. +\end{quote} +\begin{flushright} +Linus Torvalds - 2006 +\end{flushright} +\end{beamerboxesrounded} +\end{frame} + +\subsection{Preempt-RT goals} + +\begin{frame}[fragile] +\frametitle{Preempt-RT goals} +\begin{beamerboxesrounded}[shadow=true]{What's the goal?} +\begin{itemize} +\item Full Linux kernel hardware support +\item Standard posix interface +\item No specialized user space ABI +\item Full reuse of existing tools +\item Scalability +\end{itemize} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Preempt-RT goals} +\begin{beamerboxesrounded}[shadow=true]{What's the target application space?} +\begin{itemize} +\item The majority of Real-Time applications +\end{itemize} +\end{beamerboxesrounded} +\end{frame} + +\subsection{Preempt-RT properties} +\begin{frame}[fragile] +\frametitle{Preempt-RT properties} +\begin{beamerboxesrounded}[shadow=true]{Is it hard realtime?} +\begin{itemize} +\item Not by the requirement of mathematical proof +\end{itemize} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Preempt-RT properties} +\begin{beamerboxesrounded}[shadow=true]{Is mathematical proof feasible?} +\begin{itemize} +\item Not for complex systems +\end{itemize} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Preempt-RT properties} +\begin{beamerboxesrounded}[shadow=true]{Can it be verified?} +\begin{itemize} +\item Empirical verfication +\item Open and documented testing efforts (OSADL, RedHat) +\end{itemize} +\end{beamerboxesrounded} +\end{frame} + +\subsection{Preempt-RT technology} +\begin{frame}[fragile] +\frametitle{Preempt-RT technology} +\begin{beamerboxesrounded}[shadow=true]{Why is mainline not realtime capable?} +\begin{itemize} +\item Hard interrupt context +\item Soft interrupt context +\item Interrupt disabled regions +\item Preemption disabled regions +\item No protection against priority inversion +\end{itemize} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Preempt-RT technology} +\begin{beamerboxesrounded}[shadow=true]{Hard interrupt context} +\begin{itemize} +\item Runs with interrupts disabled +\item Executes driver interrupt handlers +\end{itemize} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Preempt-RT technology} +\begin{beamerboxesrounded}[shadow=true]{Soft interrupt context} +\begin{itemize} +\item Runs with preemption disabled, mostly on return from hard interrupt context +\item Executes driver and infrastructure callbacks +\end{itemize} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Preempt-RT technology} +\begin{beamerboxesrounded}[shadow=true]{Interrupt disabled regions} +\begin{itemize} +\item Mostly in context of spinlocks and rwlocks +\item Few places which require explicit interrupt disable +\end{itemize} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Preempt-RT technology} +\begin{beamerboxesrounded}[shadow=true]{Why spinlocked interrupt disabled regions} +\begin{table} +\begin{tabular}{ll} + \textbf{thread} & \textbf{interrupt} \\ + spin\_lock(lock); & \\ + interrupt & \\ + & interrupt handler \\ + & spin\_lock(lock); \\ + & DEADLOCK! \\ +\end{tabular} +\end{table} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Preempt-RT technology} +\begin{beamerboxesrounded}[shadow=true]{Preemption disabled regions} +\begin{itemize} +\item Mostly in context of spinlocks and rwlocks +\item Also protects per cpu variables +\item Few places which require explicit preemption disable +\end{itemize} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Preempt-RT technology} +\begin{beamerboxesrounded}[shadow=true]{Why spinlocked preempt disabled regions} +\begin{table} +\begin{tabular}{ll} + \textbf{thread A} & \textbf{thread B} \\ + spin\_lock(lock); & \\ + preemption & \\ + & spin\_lock(lock);\\ + & DEADLOCK! \\ +\end{tabular} +\end{table} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Preempt-RT technology} +\begin{beamerboxesrounded}[shadow=true]{spinlocks} +\begin{itemize} +\item RT separates them into spinlock and raw\_spinlock +\item raw\_spinlock in RT is identical to mainline +\item spinlock in RT is replaced by a "'sleeping"' spinlock +\end{itemize} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Preempt-RT technology} +\begin{beamerboxesrounded}[shadow=true]{Reader/Writer locks} +\begin{itemize} +\item rwlock in RT is replaced by a "'sleeping"' spinlock +\item Readercount in RT is limited to 1 +\end{itemize} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Preempt-RT technology} +\begin{beamerboxesrounded}[shadow=true]{Lock replacement requires} +\begin{itemize} +\item Forced interrupt threading +\item Forced soft interrupt threading +\item Substitution of percpu constructs +\end{itemize} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Preempt-RT technology} +\begin{beamerboxesrounded}[shadow=true]{Lock replacement requires} +Preservation of migration disable. In mainline migration is disabled by +\begin{itemize} +\item interrupt disable +\item preempt disable +\end{itemize} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Preempt-RT technology} +\begin{beamerboxesrounded}[shadow=true]{Priority inversion} +\begin{center} +\includegraphics[scale=0.4]{images/pinv.png} +\end{center} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Preempt-RT technology} +\begin{beamerboxesrounded}[shadow=true]{Priority inheritance} +\begin{center} +\includegraphics[scale=0.4]{images/pinh.png} +\end{center} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Preempt-RT technology} +\begin{beamerboxesrounded}[shadow=true]{Priority inheritance} +\begin{itemize} +\item Kernelimplementation: rtmutex +\item Nested lock boosting +\item User space interface: futex (pthread\_mutex) +\end{itemize} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Preempt-RT technology} +\begin{beamerboxesrounded}[shadow=true]{Lock replacement} +\begin{itemize} +\item Wrapper around rtmutex +\item Adaptive spinning for spinlocks and rwlocks +\end{itemize} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Preempt-RT technology} +\begin{beamerboxesrounded}[shadow=true]{Lock replacement} +All locking primitives are replaced except +\begin{itemize} +\item raw\_spinlock +\item semaphore +\end{itemize} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Preempt-RT technology} +\begin{beamerboxesrounded}[shadow=true]{Why are semaphores special?} +\begin{itemize} +\item No strict owner semantics +\item No owner, no boosting +\end{itemize} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Preempt-RT technology} +\begin{beamerboxesrounded}[shadow=true]{Further changes} +\begin{itemize} +\item per cpu locks +\item preemptible RCU +\end{itemize} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Preempt-RT technology} +\begin{beamerboxesrounded}[shadow=true]{Per CPU locks} +Protect regions which are in mainline protected by +\begin{itemize} +\item preemption disable +\item interrupt disable +\end{itemize} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Preempt-RT technology} +\begin{beamerboxesrounded}[shadow=true]{Preemptible RCU} +What's RCU? +\begin{itemize} +\item Read Copy Update +\item Scalability replacement for reader/writer locks +\item Restricted bulk refcounting +\item Poor mans garbage collector +\end{itemize} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Preempt-RT technology} +\begin{beamerboxesrounded}[shadow=true]{Preemptible RCU} +What's RCU? +\begin{center} +\includegraphics[scale=0.4]{images/GracePeriodGood.png} +\end{center} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Preempt-RT technology} +\begin{beamerboxesrounded}[shadow=true]{Preemptible RCU} +RCU versus rwlocks +\begin{center} +\includegraphics[scale=0.4]{images/rwlockRCUupdate.jpg} +\end{center} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Preempt-RT technology} +\begin{beamerboxesrounded}[shadow=true]{Preemptible RCU} +\begin{itemize} +\item Original RCU implementation relied on preempt disable +\item Preemptible implementation is in mainline +\end{itemize} +\end{beamerboxesrounded} +\end{frame} + +\subsection{Preempt-RT source impact} + +\begin{frame}[fragile] +\frametitle{Preempt-RT source impact} +\begin{beamerboxesrounded}[shadow=true]{Kernel source structure} +\begin{center} +\includegraphics[scale=0.35]{images/ksource.png} +\end{center} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Preempt-RT source impact} +\begin{beamerboxesrounded}[shadow=true]{Kernel source structure RT patch} +\begin{center} +\includegraphics[scale=0.4]{images/rtsource.png} +\end{center} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Preempt-RT source impact} +\begin{beamerboxesrounded}[shadow=true]{Architecture source structure} +\begin{center} +\includegraphics[scale=0.35]{images/asource.png} +\end{center} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Preempt-RT source impact} +\begin{beamerboxesrounded}[shadow=true]{Architecture source structure, RT patch} +\begin{center} +\includegraphics[scale=0.35]{images/rtarch.png} +\end{center} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Preempt-RT source impact} +\begin{beamerboxesrounded}[shadow=true]{Core source structure} +\begin{center} +\includegraphics[scale=0.35]{images/kdirsource.png} +\end{center} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Preempt-RT source impact} +\begin{beamerboxesrounded}[shadow=true]{Core source structure, RT patch} +\begin{center} +\includegraphics[scale=0.4]{images/rtkernel.png} +\end{center} +\end{beamerboxesrounded} +\end{frame} + +\subsection{Preempt-RT downsides} + +\begin{frame}[fragile] +\frametitle{Preempt-RT downsides} +\begin{beamerboxesrounded}[shadow=true]{Determinism comes with a prize} +\begin{itemize} +\item Reduced throughput +\item Measurable I/O performance impact +\end{itemize} +\end{beamerboxesrounded} +\end{frame} + +\subsection{Preempt-RT influence on mainline Linux} + +\begin{frame}[fragile] +\frametitle{Preempt-RT influence on mainline Linux} +\begin{beamerboxesrounded}[shadow=true]{Most of it is upstream} +\begin{itemize} +\item More than 95\% of the development has been merged +\item Only the hard to solve issues are left +\end{itemize} +\end{beamerboxesrounded} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Preempt-RT influence on mainline Linux} +\begin{beamerboxesrounded}[shadow=true]{What has been achieved?} +\begin{itemize} +\item Generic interrupt subsystem +\item Generic timekeeping subsystem +\item Generic timer subsystem +\item High resolution timers +\item NOHZ infrastructure +\item Preemptible RCU +\item Consolidated locking infrastructure +\item Lock dependency validator +\item Tracing +\item ... +\end{itemize} +\end{beamerboxesrounded} +\end{frame} + +\subsection{Preempt-RT and Linus Torvalds} + +\begin{frame}[fragile] +\frametitle{Preempt-RT} +\begin{beamerboxesrounded}[shadow=true]{Famous last words} +\begin{quote} +And yeah, I still think the hard-RT people are mostly crazy. +\end{quote} +\begin{flushright} +Linus Torvalds - 2010 +\end{flushright} +\end{beamerboxesrounded} +\end{frame} + +\input{tailpres} diff --git a/realtime/rt-specialties/pres_rt-specialties_de.tex b/realtime/rt-specialties/pres_rt-specialties_de.tex index 85cf301..7061ea4 100644 --- a/realtime/rt-specialties/pres_rt-specialties_de.tex +++ b/realtime/rt-specialties/pres_rt-specialties_de.tex @@ -199,11 +199,10 @@ void stack_prefault(void) { \frametitle{Cyclictest + FTrace} \begin{lstlisting}[basicstyle=\ttfamily\fontsize{8}{10}\selectfont] # mount DebugFS -mkdir -p /mnt/debugfs -mount -t debugs debugfs /mnt/debugfs +mount -t debugs debugfs /sys/kernel/debug # list available tracers -zi:~# cat /mnt/debugfs/tracing/available_tracers +zi:~# cat /sys/kernel/debug/tracing/available_tracers wakeup_rt wakeup preemptoff function sched_switch nop \end{lstlisting} \end{frame} |
