Skip to content

Commit

Permalink
Boot time: minor init improvements
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
  • Loading branch information
Michael Opdenacker authored and tpetazzoni committed Oct 29, 2021
1 parent edbf945 commit bbf83d4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions slides/boot-time-init-scripts/boot-time-init-scripts.tex
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,11 @@ \section{Optimizing init scripts and system startup}
\item \code{init} scripts run in alphanumeric order and start with
a letter (K for stop ({\bf k}ill) and S for {\bf s}tart).
\item You want to use the lowest number you can for your application.
\item You can even replace \code{init} with your application!
\item You can even replace \code{init} with your application!\\
However, that's easier to keep a standard \code{init}, which also
acts as a universal parent to orphan processes (otherwise
you get zombies), and also takes care of implementing system shutdown.
\end{itemize}
How fast would we be if we could be the first started application?
\end{frame}

\begin{frame}[fragile]
Expand All @@ -104,7 +106,9 @@ \section{Optimizing init scripts and system startup}
script (e.g. \code{/etc/init.d/rcS}). This eliminates multiple
calls to \code{/bin/sh}.
\item An easier to maintain solution allowing to keep subscripts: \code{source} them\\
(\code{.} command) if possible. This won't spawn new shell processes.
(\code{.} command) if possible. This won't spawn new shell
processes. Buildroot's \code{/etc/init.d/rcS} file already
does this with \code{.sh} files.
\item You could mount your filesystems directly in the C code
of your application:
\end{itemize}
Expand Down

0 comments on commit bbf83d4

Please sign in to comment.