diff options
author | Tejun Heo <tj@kernel.org> | 2013-01-18 01:16:24 (GMT) |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-01-18 01:19:58 (GMT) |
commit | 111c225a5f8d872bc9327ada18d13b75edaa34be (patch) | |
tree | 8bb9e31b8345f67c50f5370e6ba03f613afd5b65 /include/media/v4l2-ctrls.h | |
parent | 023f27d3d6fcc9048754d879fe5e7d63402a5b16 (diff) | |
download | linux-fsl-qoriq-111c225a5f8d872bc9327ada18d13b75edaa34be.tar.xz |
workqueue: set PF_WQ_WORKER on rescuers
PF_WQ_WORKER is used to tell scheduler that the task is a workqueue
worker and needs wq_worker_sleeping/waking_up() invoked on it for
concurrency management. As rescuers never participate in concurrency
management, PF_WQ_WORKER wasn't set on them.
There's a need for an interface which can query whether %current is
executing a work item and if so which. Such interface requires a way
to identify all tasks which may execute work items and PF_WQ_WORKER
will be used for that. As all normal workers always have PF_WQ_WORKER
set, we only need to add it to rescuers.
As rescuers start with WORKER_PREP but never clear it, it's always
NOT_RUNNING and there's no need to worry about it interfering with
concurrency management even if PF_WQ_WORKER is set; however, unlike
normal workers, rescuers currently don't have its worker struct as
kthread_data(). It uses the associated workqueue_struct instead.
This is problematic as wq_worker_sleeping/waking_up() expect struct
worker at kthread_data().
This patch adds worker->rescue_wq and start rescuer kthreads with
worker struct as kthread_data and sets PF_WQ_WORKER on rescuers.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/media/v4l2-ctrls.h')
0 files changed, 0 insertions, 0 deletions