[bootlin/training-materials updates] master: Boot time slides: update CONFIG_CC_OPTIMIZE_FOR_SIZE results (1fefaf4b)

Michael Opdenacker michael.opdenacker at bootlin.com
Thu Jun 24 09:31:42 CEST 2021


Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/1fefaf4b18996680104f544a5d743a257bcb594f

>---------------------------------------------------------------

commit 1fefaf4b18996680104f544a5d743a257bcb594f
Author: Michael Opdenacker <michael.opdenacker at bootlin.com>
Date:   Thu Jun 24 09:31:42 2021 +0200

    Boot time slides: update CONFIG_CC_OPTIMIZE_FOR_SIZE results
    
    Signed-off-by: Michael Opdenacker <michael.opdenacker at bootlin.com>


>---------------------------------------------------------------

1fefaf4b18996680104f544a5d743a257bcb594f
 slides/boot-time-kernel/boot-time-kernel.tex | 33 ++++++++++------------------
 1 file changed, 11 insertions(+), 22 deletions(-)

diff --git a/slides/boot-time-kernel/boot-time-kernel.tex b/slides/boot-time-kernel/boot-time-kernel.tex
index 1d0748b3..a90b5b10 100644
--- a/slides/boot-time-kernel/boot-time-kernel.tex
+++ b/slides/boot-time-kernel/boot-time-kernel.tex
@@ -152,37 +152,26 @@ depend on storage and CPU performance.
 \begin{itemize}
 \item \kconfig{CONFIG_CC_OPTIMIZE_FOR_SIZE}: possibility to compile the kernel
       with \code{gcc -Os} instead of \code{gcc -O2}.
-\item Such optimizations give priority to code size at
-      the expense of code speed.
-\item Results: the initial boot time is better (smaller
-      size), but the slower kernel code can offset
-      the benefits. Your system will run a bit slower!
+\item Such optimizations give priority to code size at the expense of code speed.
+      \code{-Os} enables all \code{-O2} optimizations except those that
+      often increase code size.
+\item Results: loading and decompressing the kernel is faster (smaller
+      size), but then the kernel boots and runs slower.
 \end{itemize}
 \end{frame}
 
 \begin{frame}
 \frametitle{Optimize kernel for size (2)}
-Results on BeagleBone Black, Linux 5.1, lzo compression
+Results on BeagleBone Black, Linux 5.11, lzo compression
 \begin{tabular}{| l || c | c | c |}
 \hline
 & O2 & Os & Diff \\
 \hline
-Size & 2533872 & 2390608 & -5.7 \% \\
-Copy time &  0.161 s & 0.153 s & -8 ms \\
-Starting kernel & 0.912 s & 0.904 s & -8 ms \\
-Starting userspace & 1.363 s & 1.359 s & -4 ms \\
-Total boot time & 2.961 s & 2.957s & -4 ms \\
-\hline
-\end{tabular}
-\newline\newline
-Results on Microchip SAMA5D3 Xplained, Linux 3.10, gzip compression:
-\begin{tabular}{| l || c | c | c |}
-\hline
-Timestamp & O2 & Os & Diff \\
-\hline
-Starting kernel & 4.307 s & 4.213 s & -94 ms \\
-Starting init & 5.593 s & 5.549 s & -44 ms \\
-Login prompt & 21.085 s & 22.900 s & + 1.815 s \\
+Size & 2533872 & 6594440 &  \% \\
+Copy time &  0.489 s & 0.437s s & -8 ms \\
+Decompression time & 1.490 s & 1.558 s & -68 ms \\
+Time to userspace & 1.303 s & 1.462 s & +159 ms \\
+Total boot time & 5.739 s & 5.796s & +57 ms \\
 \hline
 \end{tabular}
 \newline\newline




More information about the training-materials-updates mailing list