[bootlin/training-materials updates] master: kernel: interrupts: Rework the workqueue slide (dbf802de)

Miquel Raynal miquel.raynal at bootlin.com
Tue Oct 18 15:52:21 CEST 2022

Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/dbf802de667b3d4c55283b7d1630f33719d8a3f4


commit dbf802de667b3d4c55283b7d1630f33719d8a3f4
Author: Miquel Raynal <miquel.raynal at bootlin.com>
Date:   Tue Oct 18 15:52:21 2022 +0200

    kernel: interrupts: Rework the workqueue slide
    The word worker was missing and there was a confusion between workqueue
    and worker initialization. Clarify all of that.
    Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>


 .../kernel-driver-development-interrupts.tex                | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/slides/kernel-driver-development-interrupts/kernel-driver-development-interrupts.tex b/slides/kernel-driver-development-interrupts/kernel-driver-development-interrupts.tex
index d1b8ecff..c2633b4e 100644
--- a/slides/kernel-driver-development-interrupts/kernel-driver-development-interrupts.tex
+++ b/slides/kernel-driver-development-interrupts/kernel-driver-development-interrupts.tex
@@ -312,18 +312,19 @@ static irqreturn_t atmel_sha_irq(int irq, void *dev_id)
   \item Workqueues are a general mechanism for deferring work. It is
     not limited in usage to handling interrupts. It can typically
     be used for background work which can be scheduled.
-  \item The function registered as workqueue is executed in a thread,
-    which means:
+  \item Workqueues may be created by subsystems or drivers with
+    \kfunc{alloc_workqueue}. The default queue can also be used.
+  \item Functions registered to run in workqueues, called workers, are
+    executed in thread context which means:
     \item All interrupts are enabled
     \item Sleeping is allowed
-  \item A workqueue, usually allocated in a per-device structure,
-    is registered with \kfunc{INIT_WORK} and typically
+  \item A worker is usually allocated in a per-device structure,
+    initialized and registered with \kfunc{INIT_WORK} and typically
     triggered with \kfunc{queue_work} when using a dedicated queue or
     \kfunc{schedule_work} when using the default queue
-  \item The complete API, in \kfile{include/linux/workqueue.h}, provides
-    many other possibilities (creating its own workqueue threads, etc.)
+  \item The complete API is in \kfile{include/linux/workqueue.h}
   \item Example (\kfile{drivers/crypto/atmel-i2c}):
 INIT_WORK(&work_data->work, atmel_i2c_work_handler);

More information about the training-materials-updates mailing list