\subsection{Linux Mainline Patches Merge}
\begin{frame}
  \frametitle{History}
  \begin{itemize}
  \item The Android Kernel patches were kept for a long time out of
    the official Linux release
  \item They were first integrated in 2.6.29, in
    \code{drivers/staging/android}
  \item They were then removed from the kernel 2.6.35, because Google
    was unwilling to help the mainlining process
  \item They were then added back in 3.3 (around 2 years later) and
    are still there at the time
  \item While Google did a great job at keeping most of their changes
    as isolated from the core as possible, making this easy to merge
    in the staging area, it wasn't true for the wakelocks, due to
    their invasive nature.
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Wakelocks Support}
  \begin{itemize}
  \item The kernel developers were not quite happy about the
    in-kernel APIs used by the wakelocks
  \item Due to the changes in every places of the kernel to state
    wether or not we were allowed to suspend, it was not possible to
    merge the changes as is: either you were getting all of it, or
    none
  \item Since version 3.5, two features were included in the kernel to
    implement opportunistic suspend:
    \begin{description}
    \item[autosleep] is a way to let the kernel trigger suspend or
      hibernate whenever there are no active wakeup sources.
    \item[wake locks] are a way to create and manipulate wakeup
      sources from user space. The interface is compatible with the
      android one.
    \end{description}
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Current State: Merged Patches}
  \begin{itemize}
  \item As of 3.10, the following patches/features are now found in
    the mainline kernel:
    \begin{itemize}
    \item Binder
    \item Alarm Timers (under the name POSIX Alarm Timers introduced
      in 2.6.38)
    \item Ashmem
    \item Klogger
    \item Timed GPIOs
    \item Low Memory Killer
    \item RAM Console (superseded by pstore RAM backend introduced in
      3.5)
    \end{itemize}
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Current State: Missing Patches}
  \begin{itemize}
  \item As of 3.10, the following patches/features are missing from
    the mainline kernel:
    \begin{itemize}
    \item Paranoid Networking
    \item ION Memory Allocator
    \item USB Gadget
    \item FIQ debugger
    \item pmem (removed in 3.3)
    \end{itemize}
  \end{itemize}
\end{frame}
