Skip to content

Commit 0337d8d

Browse files
committed
Clarify the status of tasklet
1 parent 0314b60 commit 0337d8d

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

lkmpg.tex

+9-6
Original file line numberDiff line numberDiff line change
@@ -1900,17 +1900,20 @@ \section{Scheduling Tasks}
19001900
\label{sec:scheduling_tasks}
19011901
There are two main ways of running tasks: tasklets and work queues.
19021902
Tasklets are a quick and easy way of scheduling a single function to be run.
1903-
For example, when triggered from an interrupt, whereas work queues are more complicated but also better suited to running multiple things in a sequence.
1903+
For example, when triggered from an interrupt,
1904+
whereas work queues are more complicated but also better suited to running multiple things in a sequence.
19041905

1905-
It is possible that in future tasklets may be replaced by \textit{threaded irqs}.
1906-
However, discussion about that has been ongoing since 2007 (\href{https://lwn.net/Articles/239633}{Eliminating tasklets}), so do not hold your breath.
1907-
See the section \ref{sec:irq} if you wish to avoid the tasklet debate.
1906+
It is possible that in future tasklets may be replaced by \textit{threaded IRQs}.
1907+
However, discussion about that has been ongoing since 2007 (\href{https://lwn.net/Articles/239633}{Eliminating tasklets} and \href{https://lwn.net/Articles/960041/}{The end of tasklets}),
1908+
so expecting immediate changes would be unwise.
1909+
See the section \ref{sec:irq} for alternatives that avoid the tasklet debate.
19081910

19091911
\subsection{Tasklets}
19101912
\label{sec:tasklet}
19111913
Here is an example tasklet module.
19121914
The \cpp|tasklet_fn| function runs for a few seconds.
1913-
In the meantime, execution of the \cpp|example_tasklet_init| function may continue to the exit point, depending on whether it is interrupted by \textbf{softirq}.
1915+
In the meantime, execution of the \cpp|example_tasklet_init| function may continue to the exit point,
1916+
depending on whether it is interrupted by \textbf{softirq}.
19141917

19151918
\samplec{examples/example_tasklet.c}
19161919

@@ -2014,7 +2017,7 @@ \subsection{Bottom Half}
20142017
\samplec{examples/bottomhalf.c}
20152018

20162019
\subsection{Threaded IRQ}
2017-
2020+
\label{sec:threaded_irq}
20182021
Threaded IRQ is a mechanism to organize both top-half and bottom-half of an IRQ at once.
20192022
A threaded IRQ splits the one handler in \cpp|request_irq()| into two: one for the top-half, the other for the bottom-half.
20202023
The \cpp|request_threaded_irq()| is the function for using threaded IRQs.

0 commit comments

Comments
 (0)