]> rtime.felk.cvut.cz Git - zynq/linux.git/commit
sched: Distangle worker accounting from rqlock
authorThomas Gleixner <tglx@linutronix.de>
Wed, 22 Jun 2011 17:47:03 +0000 (19:47 +0200)
committerMichal Sojka <sojka@merica.cz>
Sun, 13 Sep 2015 07:47:31 +0000 (09:47 +0200)
commit2a10c12d2709aa05d2378c38b4a5f460722ca64d
treefc49e52c4f3f8d0b52ad71c21b0e7b5fe1c77f69
parenteff4dea5dee637ae8fc4d6fde963e668872ec87f
sched: Distangle worker accounting from rqlock

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>
kernel/sched/core.c
kernel/workqueue.c
kernel/workqueue_internal.h