Skip to content

Commit

Permalink
manual: improve thread affinity description
Browse files Browse the repository at this point in the history
Signed-off-by: Axel Heider <axelheider@gmx.de>
  • Loading branch information
axel-h authored and lsf37 committed Aug 24, 2023
1 parent 998ed9a commit a58b943
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions manual/parts/threads.tex
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@ \subsection{Thread Creation}
scheduling context object.

In a SMP configuration of the kernel, the thread will resume on the node
corresponding to the affinity of the thread. For the non-MCS configurations of the kernel, this is set using
\apifunc{seL4\_TCB\_SetAffinity}{tcb_setaffinity}, while on the MCS kernel the affinity is
derived from the scheduling context object.
corresponding to the affinity of the thread. For non-MCS configurations, the
default thread affinity is the node the thread's \obj{TCB} object was created
on, and \apifunc{seL4\_TCB\_SetAffinity}{tcb_setaffinity} can be used to
explicitly set the affinity. On MCS configurations, the affinity is derived
from the scheduling context object (see \autoref{sec:sc_creation}).

\subsection{Thread Deactivation}
\label{sec:thread_deactivation}
Expand All @@ -72,6 +74,14 @@ \subsection{Thread Deactivation}
deleted.
% an example of which is demonstrated in \nameref{ex:second_thread}.

\subsection{Affinity}
\label{sec:thread_affinity}

It is architecture and platform specific, how an affinity value maps to a
specific node (core, hart) on a specific platform. There is no guarantee that
affinity values are compatible across different platforms.


\subsection{Scheduling}
\label{sec:sched}

Expand Down

0 comments on commit a58b943

Please sign in to comment.