]> git.baikalelectronics.ru Git - kernel.git/commit
sched: Separate the scheduler entry for preemption
authorThomas Gleixner <tglx@linutronix.de>
Wed, 22 Jun 2011 17:47:00 +0000 (19:47 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 29 Aug 2011 10:26:57 +0000 (12:26 +0200)
commitb3cb2abffbdded97ef1f025dd7c1e0e58e4da395
treedc5910233294b735fd389e0b0aab79cbb03c70a2
parent8ad95c648ce15cc2a0e2109c6e08773949bae72f
sched: Separate the scheduler entry for preemption

Block-IO and workqueues call into notifier functions from the
scheduler core code with interrupts and preemption disabled. These
calls should be made before entering the scheduler core.

To simplify this, separate the scheduler core code into
__schedule(). __schedule() is directly called from the places which
set PREEMPT_ACTIVE and from schedule(). This allows us to add the work
checks into schedule(), so they are only called when a task voluntary
goes to sleep.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: stable@kernel.org # 2.6.39+
Link: http://lkml.kernel.org/r/20110622174918.813258321@linutronix.de
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched.c