aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2005-09-06 18:16:27 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-07 19:57:17 -0400
commit8446f1d391f3d27e6bf9c43d4cbcdac0ca720417 (patch)
tree738853af877c9a391b4f2db467e7f90c6e2e38ed /include/linux
parent4732efbeb997189d9f9b04708dc26bf8613ed721 (diff)
[PATCH] detect soft lockups
This patch adds a new kernel debug feature: CONFIG_DETECT_SOFTLOCKUP. When enabled then per-CPU watchdog threads are started, which try to run once per second. If they get delayed for more than 10 seconds then a callback from the timer interrupt detects this condition and prints out a warning message and a stack dump (once per lockup incident). The feature is otherwise non-intrusive, it doesnt try to unlock the box in any way, it only gets the debug info out, automatically, and on all CPUs affected by the lockup. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de> Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/sched.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index dec5827c7742..5fb31bede103 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -176,6 +176,23 @@ extern void trap_init(void);
176extern void update_process_times(int user); 176extern void update_process_times(int user);
177extern void scheduler_tick(void); 177extern void scheduler_tick(void);
178 178
179#ifdef CONFIG_DETECT_SOFTLOCKUP
180extern void softlockup_tick(struct pt_regs *regs);
181extern void spawn_softlockup_task(void);
182extern void touch_softlockup_watchdog(void);
183#else
184static inline void softlockup_tick(struct pt_regs *regs)
185{
186}
187static inline void spawn_softlockup_task(void)
188{
189}
190static inline void touch_softlockup_watchdog(void)
191{
192}
193#endif
194
195
179/* Attach to any functions which should be ignored in wchan output. */ 196/* Attach to any functions which should be ignored in wchan output. */
180#define __sched __attribute__((__section__(".sched.text"))) 197#define __sched __attribute__((__section__(".sched.text")))
181/* Is this address in the __sched functions? */ 198/* Is this address in the __sched functions? */