]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
sched: improve preempt debugging
authorNick Piggin <nickpiggin@yahoo.com.au>
Tue, 30 Sep 2008 10:50:27 +0000 (20:50 +1000)
committerIngo Molnar <mingo@elte.hu>
Tue, 30 Sep 2008 10:56:25 +0000 (12:56 +0200)
commit7317d7b87edb41a9135e30be1ec3f7ef817c53dd
treee8375c49cbeb8012e55967f325be99b01ab66648
parent6918bc5c830e890681eabb3c6cb6b8d117a52d14
sched: improve preempt debugging

This patch helped me out with a problem I recently had....

Basically, when the kernel lock is held, then preempt_count underflow does not
get detected until it is released which may be a long time (and arbitrarily,
eg at different points it may be rescheduled). If the bkl is released at
schedule, the resulting output is actually fairly cryptic...

With any other lock that elevates preempt_count, it is illegal to schedule
under it (which would get found pretty quickly). bkl allows scheduling with
preempt_count elevated, which makes underflows hard to debug.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched.c