Este bit explica a finalidade de PF_WQ_WORKER
.
trecho
Concurrency managed workqueue needs to know when workers are going to sleep and waking up, and, when a worker goes to sleep, be able to wake up another worker to maintain adequate concurrency. This patch introduces
PF_WQ_WORKER
to identify workqueue workers and adds the following two hooks.
wq_worker_waking_up()
: called when a worker is woken up.
wq_worker_sleeping()
: called when a worker is going to sleep and may return a pointer to a local task which should be woken up. The returned task is woken up usingtry_to_wake_up_local()
which is simplifiedttwu
which is called underrq lock
and can only wake up local tasks.Both hooks are currently defined as
noop
inkernel/workqueue_sched.h
. Latercmwq
implementation will replace them with proper implementation.These hooks are hard coded as they'll always be enabled.
Fonte: [PATCH 4/4] sched : adicione ganchos para a fila de trabalho