Staging
v0.8.1
https://github.com/torvalds/linux
Revision 98d8256739f2c6c636fa2da359f5949c739ae839 authored by Thomas Gleixner on 23 May 2007, 20:58:18 UTC, committed by Linus Torvalds on 24 May 2007, 03:14:15 UTC
The NOHZ patch contains a check for softirqs pending when a CPU goes idle.
The BUG is unrelated to NOHZ, it just was made visible by the NOHZ patch.
The BUG showed up mainly on P4 / hyperthreading enabled machines which lead
the investigations into the wrong direction in the first place.  The real
cause is in cond_resched_softirq():

cond_resched_softirq() is enabling softirqs without invoking the softirq
daemon when softirqs are pending.  This leads to the warning message in the
NOHZ idle code:

t1 runs softirq disabled code on CPU#0
interrupt happens, softirq is raised, but deferred (softirqs disabled)
t1 calls cond_resched_softirq()
	enables softirqs via _local_bh_enable()
	calls schedule()
t2 runs
t1 is migrated to CPU#1
t2 is done and invokes idle()
NOHZ detects the pending softirq

Fix: change _local_bh_enable() to local_bh_enable() so the softirq
daemon is invoked.

Thanks to Anant Nitya for debugging this with great patience !

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 40acc09
History
Tip revision: 98d8256739f2c6c636fa2da359f5949c739ae839 authored by Thomas Gleixner on 23 May 2007, 20:58:18 UTC
Prevent going idle with softirq pending
Tip revision: 98d8256
File Mode Size
Kconfig -rw-r--r-- 8.4 KB
Makefile -rw-r--r-- 823 bytes
aztcd.c -rw-r--r-- 68.5 KB
aztcd.h -rw-r--r-- 6.1 KB
cdrom.c -rw-r--r-- 96.1 KB
cdu31a.c -rw-r--r-- 84.7 KB
cdu31a.h -rw-r--r-- 13.7 KB
cm206.c -rw-r--r-- 45.1 KB
cm206.h -rw-r--r-- 4.4 KB
gscd.c -rw-r--r-- 19.1 KB
gscd.h -rw-r--r-- 2.4 KB
isp16.c -rw-r--r-- 9.6 KB
isp16.h -rw-r--r-- 2.6 KB
mcdx.c -rw-r--r-- 48.8 KB
mcdx.h -rw-r--r-- 5.5 KB
optcd.c -rw-r--r-- 50.4 KB
optcd.h -rw-r--r-- 1.7 KB
sbpcd.c -rw-r--r-- 166.7 KB
sbpcd.h -rw-r--r-- 24.9 KB
sjcd.c -rw-r--r-- 42.2 KB
sjcd.h -rw-r--r-- 4.9 KB
sonycd535.c -rw-r--r-- 47.8 KB
sonycd535.h -rw-r--r-- 5.1 KB
viocd.c -rw-r--r-- 21.8 KB

back to top