diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-06-22 19:47:03 +0200 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2012-03-07 16:14:43 -0600 |
commit | b424748220d368e0dc24171eb8410193a3014f90 (patch) | |
tree | 00597f9abed907d7312cfbd571e9781d149c3447 /kernel/workqueue_sched.h | |
parent | dfedbe6b8e1cf20e37a4732965c65022b66f4feb (diff) |
sched: Distangle worker accounting from rq-%3Elock
The worker accounting for cpu bound workers is plugged into the core
scheduler code and the wakeup code. This is not a hard requirement and
can be avoided by keeping track of the state in the workqueue code
itself.
Keep track of the sleeping state in the worker itself and call the
notifier before entering the core scheduler. There might be false
positives when the task is woken between that call and actually
scheduling, but that's not really different from scheduling and being
woken immediately after switching away. There is also no harm from
updating nr_running when the task returns from scheduling instead of
accounting it in the wakeup code.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/20110622174919.135236139@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/workqueue_sched.h')
-rw-r--r-- | kernel/workqueue_sched.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/workqueue_sched.h b/kernel/workqueue_sched.h index 2d10fc98dc79..3bf73e24e1ea 100644 --- a/kernel/workqueue_sched.h +++ b/kernel/workqueue_sched.h @@ -4,6 +4,5 @@ * Scheduler hooks for concurrency managed workqueue. Only to be * included from sched.c and workqueue.c. */ -void wq_worker_waking_up(struct task_struct *task, unsigned int cpu); -struct task_struct *wq_worker_sleeping(struct task_struct *task, - unsigned int cpu); +void wq_worker_running(struct task_struct *task); +void wq_worker_sleeping(struct task_struct *task); |