|
Driver / Subsystem |
— |
Creates and queues work items via INIT_WORK() + queue_work() |
Handler function runs in process context when work executes |
|
Work Item |
struct work_struct |
Unit of deferred work — a function pointer + metadata |
data (pool/pwq + PENDING bit), entry (list linkage), func (handler) |
|
Workqueue |
struct workqueue_struct |
Named channel for submitting work — does NOT own threads |
cpu_pwq (per-CPU pwq array), flags (WQ_UNBOUND, WQ_HIGHPRI, etc.), name |
|
Pool Workqueue (pwq) |
struct pool_workqueue |
Bridge connecting a workqueue to a worker_pool — holds per-wq-per-pool accounting |
pool, wq, nr_active, inactive_works, max_active |
|
Worker Pool |
struct worker_pool |
Pool of kworker threads that execute work items — 2 per CPU (normal + highpri) + unbound pools |
worklist, nr_running, nr_idle, busy_hash, idle_list, cpu |
|
Worker (kworker) |
struct worker |
Kernel thread that picks work from pool→worklist and calls work→func(work) |
current_work, current_func, task, pool, flags (IDLE/BUSY/DIE) |