From b567b950ce9bbcc087b3d09a0f761e29d3633026 Mon Sep 17 00:00:00 2001
From: Holger Dengler <dengler@linutronix.de>
Date: Sun, 17 Mar 2013 14:54:32 +0100
Subject: Flash-memory: Extend presentations and handout

Extend presentations and handouts for MTD, UBI and Flashfilesystems.
Add ECC, YAFFS2, Fastmap and other items.

Signed-off-by: Holger Dengler <dengler@linutronix.de>
---
 flash-memory/ubi/pres_ubi_en.tex | 305 ++++++++++++++++++++++++++++++++++++---
 1 file changed, 288 insertions(+), 17 deletions(-)

(limited to 'flash-memory/ubi/pres_ubi_en.tex')

diff --git a/flash-memory/ubi/pres_ubi_en.tex b/flash-memory/ubi/pres_ubi_en.tex
index fc5703f..f7f7a3b 100644
--- a/flash-memory/ubi/pres_ubi_en.tex
+++ b/flash-memory/ubi/pres_ubi_en.tex
@@ -6,34 +6,40 @@
 	\tableofcontents
 \end{frame}
 
+\subsubsection{Concepts}
+
 \begin{frame}
-\frametitle{UBI - Unsorted Block Images}
+\frametitle{UBI}
+\begin{beamerboxesrounded}[shadow=true]{Provides}
 \begin{itemize}
-\item scans list of eraseblocks
-\item generates a mapping between eraseblocks and ubi volumes
+\item Volume manager for FLASH
+\item Full device wear leveling
+\item Non-linear Logical to Physical Eraseblock mapping
+\item Bad block handling
+\item Data integrity mechanisms
 \end{itemize}
+\end{beamerboxesrounded}
 \end{frame}
 
 \begin{frame}
-\frametitle{UBI works on top of MTD}
-\includegraphics[width=8cm]{images/ubi-big-picture.png}
+\frametitle{Layers}
+\begin{beamerboxesrounded}[shadow=true]{UBI works on top of MTD}
+\includegraphics[scale=0.325]{images/ubi-big-picture.png}
+\end{beamerboxesrounded}
 \end{frame}
 
 \begin{frame}
-\frametitle{UBI Volumes}
-\begin{itemize}
-\item something like a partition in common systems
-\item but more flexible
-\item ubi exchanges eraseblocks between volumes (for bad block handling,
-wear-leveling)
-\item non-linear mapping of physical eraseblocks (peb) to logical eraseblocks
-(leb)
-\item e.g. a volume out of 3 blocks could use peb 813, 28, 1017
-\end{itemize}
+\frametitle{UBI Eraseblock mapping}
+\begin{beamerboxesrounded}[shadow=true]{Volume management}
+\begin{center}
+\includegraphics[scale=0.3]{images/ubi.png}
+\end{center}
+\end{beamerboxesrounded}
 \end{frame}
 
 \begin{frame}
-\frametitle{Volume type}
+\frametitle{UBI User interface}
+\begin{beamerboxesrounded}[shadow=true]{Volume type}
 \begin{itemize}
 \item static
 \begin{itemize}
@@ -41,12 +47,277 @@ wear-leveling)
 \item no filesystem
 \item easy readable e.g. by a bootloader
 \end{itemize}
-\pause
 \item dynamic
 \begin{itemize}
 \item used for filesystems
 \end{itemize}
 \end{itemize}
+\end{beamerboxesrounded}
+\end{frame}
+
+\subsubsection{Flash Metadata}
+
+\begin{frame}
+\frametitle{UBI Metadata Storage}
+\begin{center}
+\includegraphics[scale=0.5]{images/ubi-block.png}
+\end{center}
+\end{frame}
+
+\begin{frame}
+\frametitle{UBI Headers}
+\begin{beamerboxesrounded}[shadow=true]{Metadata}
+\begin{itemize}
+\item Erasecount header
+\item Volume information header
+\end{itemize}
+\end{beamerboxesrounded}
+\end{frame}
+
+\begin{frame}
+\frametitle{UBI Headers}
+\begin{beamerboxesrounded}[shadow=true]{Volume information header}
+\begin{itemize}
+\item Volume id
+\item Logical eraseblock number in volume
+\item Version counter
+\end{itemize}
+\end{beamerboxesrounded}
+\end{frame}
+
+\begin{frame}
+\frametitle{UBI Device Scan}
+\begin{beamerboxesrounded}[shadow=true]{Metadata retrieval}
+\begin{center}
+\includegraphics[scale=0.4]{images/ubiscan.png}
+\end{center}
+\end{beamerboxesrounded}
+\end{frame}
+
+\begin{frame}
+\frametitle{UBI}
+\begin{beamerboxesrounded}[shadow=true]{Attach time}
+\begin{itemize}
+\item O(N)
+\item Grows linear with FLASH size
+\end{itemize}
+\end{beamerboxesrounded}
+\end{frame}
+
+\begin{frame}
+\frametitle{UBI}
+\begin{beamerboxesrounded}[shadow=true]{Attach time}
+\begin{semiverbatim}
+N  = number of eraseblocks
+
+Tp = time to read a single flash page
+
+Hp = number of header pages
+
+
+Ta = N * Tp * Hp
+\end{semiverbatim}
+\end{beamerboxesrounded}
+\end{frame}
+
+\begin{frame}
+\frametitle{UBI attach time}
+\begin{beamerboxesrounded}[shadow=true]{Example I: NAND 64MB 1024PEBs 512B
+pagesize}
+\begin{semiverbatim}
+N  = 1024
+
+Tp = 50us
+
+Hp = 1
+
+
+Ta = 1024 * 50us * 1 = 51.2ms
+\end{semiverbatim}
+\end{beamerboxesrounded}
+\end{frame}
+
+\begin{frame}
+\frametitle{UBI attach time}
+\begin{beamerboxesrounded}[shadow=true]{Example II: NAND 4GB 8192PEBs 4K
+pagesize}
+\begin{semiverbatim}
+N  = 8192
+
+Tp = 100us.
+
+Hp = 2
+
+
+\begin{alertenv}
+Ta = 8192 * 100us * 2 = 1.6384s
+\end{alertenv}
+\end{semiverbatim}
+\end{beamerboxesrounded}
+\end{frame}
+
+\subsubsection{UBI Fastmap}
+
+\begin{frame}
+\frametitle{UBI attach time}
+\begin{beamerboxesrounded}[shadow=true]{Can we be smarter?}
+\begin{itemize}
+\item Store metadata in a special volume
+\item but ...
+\pause
+\item Where to store metadata?
+\begin{itemize}
+\item No static storage space on NAND
+\item Metadata update needs to be rare
+\item No violation of UBI robustness
+\end{itemize}
+\end{itemize}
+\end{beamerboxesrounded}
+\end{frame}
+
+\begin{frame}
+\frametitle{UBI metadata volume}
+\begin{beamerboxesrounded}[shadow=true]{How to find it?}
+\begin{itemize}
+\item Split into two volumes
+\begin{itemize}
+\item Reference volume
+\item Data volume
+\end{itemize}
+\end{itemize}
+\end{beamerboxesrounded}
+\end{frame}
+
+\begin{frame}
+\frametitle{UBI metadata volumes}
+\begin{beamerboxesrounded}[shadow=true]{Reference volume}
+\begin{itemize}
+\item contains information about the metadata volume location
+\item is located within the first N physical erase blocks
+\item has to be found by scanning
+\end{itemize}
+\end{beamerboxesrounded}
+\end{frame}
+
+\begin{frame}
+\frametitle{UBI metadata volumes}
+\begin{beamerboxesrounded}[shadow=true]{Data volume}
+\begin{itemize}
+\item contains information about all physical eraseblocks
+\item condenses UBI header data
+\end{itemize}
+\end{beamerboxesrounded}
 \end{frame}
 
+\begin{frame}
+\frametitle{UBI metadata volumes}
+\begin{beamerboxesrounded}[shadow=true]{Avoid fast updates}
+\begin{itemize}
+\item by storing a pool list
+\item by scanning the erase blocks in the pool list
+\item by rewriting metadata only when pool list changes
+\end{itemize}
+\end{beamerboxesrounded}
+\end{frame}
+
+\begin{frame}
+\frametitle{UBI metadata volumes}
+\begin{beamerboxesrounded}[shadow=true]{Pool list}
+\begin{itemize}
+\item Configurable number of erase blocks
+\item Used for current write operations
+\end{itemize}
+\end{beamerboxesrounded}
+\end{frame}
+
+\begin{frame}
+\frametitle{UBI metadata volumes}
+\begin{beamerboxesrounded}[shadow=true]{Pool list changes}
+\begin{itemize}
+\item due to wear leveling
+\item due to client (e.g. UBIFS) requirements
+\end{itemize}
+\end{beamerboxesrounded}
+\end{frame}
+
+\begin{frame}
+\frametitle{UBI metadata volumes}
+\begin{beamerboxesrounded}[shadow=true]{Preserve robustness}
+\begin{itemize}
+\item by preserving the UBI header semantics
+\item by fallback to full scanning mode
+\end{itemize}
+\end{beamerboxesrounded}
+\end{frame}
+
+\begin{frame}
+\frametitle{Device Scan}
+\begin{beamerboxesrounded}[shadow=true]{Attach mode scheme - w/o Fastmap}
+\begin{center}
+\includegraphics[scale=0.4]{images/ubiscan.png}
+\end{center}
+\end{beamerboxesrounded}
+\end{frame}
+
+\begin{frame}
+\frametitle{Device Scan}
+\begin{beamerboxesrounded}[shadow=true]{Attach mode scheme}
+\begin{center}
+\includegraphics[scale=0.4]{images/ubifast.png}
+\end{center}
+\end{beamerboxesrounded}
+\end{frame}
+
+\begin{frame}
+\frametitle{UBI fastmap attach time}
+\begin{beamerboxesrounded}[shadow=true]{Example I: NAND 64MB 1024PEBs 512B
+pagesize}
+\begin{itemize}
+\item 51.2ms (UBI)
+\item 17.6ms (UBI Fastmap)
+\end{itemize}
+\end{beamerboxesrounded}~\\
+\begin{beamerboxesrounded}[shadow=true]{Example II: NAND 4GB 8192PEBs 4K
+pagesize}
+\begin{itemize}
+\item 1.6384s (UBI)
+\item 96.0ms (UBI Fastmap)
+\end{itemize}
+\end{beamerboxesrounded}
+\end{frame}
+
+\begin{frame}
+\frametitle{Conclusion}
+\begin{beamerboxesrounded}[shadow=true]{Summary}
+\begin{itemize}
+\item Fastmap provides significant speedup
+\item Speedup grows with flash size
+\end{itemize}
+\end{beamerboxesrounded}
+\end{frame}
+
+\begin{frame}
+\frametitle{Future directions}
+\begin{beamerboxesrounded}[shadow=true]{Further possible optimizations}
+\begin{itemize}
+\item Compressed fastmap storage
+\item Let the bootloader hand the scan table to the kernel
+\item Implement supplementary NVRAM support
+\end{itemize}
+\end{beamerboxesrounded}
+\end{frame}
+
+\begin{frame}
+\frametitle{Mainline status}
+\begin{beamerboxesrounded}[shadow=true]{Code}
+\begin{itemize}
+\item Merged in Linux 3.7
+\item Sponsored by CE Linux Forum (CELF)
+\item Designed and implemented by linutronix
+\end{itemize}
+\end{beamerboxesrounded}
+\end{frame}
+
+\subsubsection{}
+
 \input{tailpres}
-- 
cgit v1.2.3

