diff options
author | Mandeep Singh Baines <msb@google.com> | 2009-01-15 14:08:40 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-16 08:06:04 -0500 |
commit | e162b39a368f0401e41b558f430c354d12a85b37 (patch) | |
tree | 3fb7e4d48f398d62e5074e7e3dd183cc54f59820 /include | |
parent | c903ff837909ccada51243307d4239f86af40179 (diff) |
softlockup: decouple hung tasks check from softlockup detection
Decoupling allows:
* hung tasks check to happen at very low priority
* hung tasks check and softlockup to be enabled/disabled independently
at compile and/or run-time
* individual panic settings to be enabled disabled independently
at compile and/or run-time
* softlockup threshold to be reduced without increasing hung tasks
poll frequency (hung task check is expensive relative to softlock watchdog)
* hung task check to be zero over-head when disabled at run-time
Signed-off-by: Mandeep Singh Baines <msb@google.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sched.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 54cbabf3b871..f2f94d532302 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -297,9 +297,6 @@ extern int proc_dosoftlockup_thresh(struct ctl_table *table, int write, | |||
297 | struct file *filp, void __user *buffer, | 297 | struct file *filp, void __user *buffer, |
298 | size_t *lenp, loff_t *ppos); | 298 | size_t *lenp, loff_t *ppos); |
299 | extern unsigned int softlockup_panic; | 299 | extern unsigned int softlockup_panic; |
300 | extern unsigned long sysctl_hung_task_check_count; | ||
301 | extern unsigned long sysctl_hung_task_timeout_secs; | ||
302 | extern unsigned long sysctl_hung_task_warnings; | ||
303 | extern int softlockup_thresh; | 300 | extern int softlockup_thresh; |
304 | #else | 301 | #else |
305 | static inline void softlockup_tick(void) | 302 | static inline void softlockup_tick(void) |
@@ -316,6 +313,15 @@ static inline void touch_all_softlockup_watchdogs(void) | |||
316 | } | 313 | } |
317 | #endif | 314 | #endif |
318 | 315 | ||
316 | #ifdef CONFIG_DETECT_HUNG_TASK | ||
317 | extern unsigned int sysctl_hung_task_panic; | ||
318 | extern unsigned long sysctl_hung_task_check_count; | ||
319 | extern unsigned long sysctl_hung_task_timeout_secs; | ||
320 | extern unsigned long sysctl_hung_task_warnings; | ||
321 | extern int proc_dohung_task_timeout_secs(struct ctl_table *table, int write, | ||
322 | struct file *filp, void __user *buffer, | ||
323 | size_t *lenp, loff_t *ppos); | ||
324 | #endif | ||
319 | 325 | ||
320 | /* Attach to any functions which should be ignored in wchan output. */ | 326 | /* Attach to any functions which should be ignored in wchan output. */ |
321 | #define __sched __attribute__((__section__(".sched.text"))) | 327 | #define __sched __attribute__((__section__(".sched.text"))) |
@@ -1236,7 +1242,7 @@ struct task_struct { | |||
1236 | /* ipc stuff */ | 1242 | /* ipc stuff */ |
1237 | struct sysv_sem sysvsem; | 1243 | struct sysv_sem sysvsem; |
1238 | #endif | 1244 | #endif |
1239 | #ifdef CONFIG_DETECT_SOFTLOCKUP | 1245 | #ifdef CONFIG_DETECT_HUNG_TASK |
1240 | /* hung task detection */ | 1246 | /* hung task detection */ |
1241 | unsigned long last_switch_timestamp; | 1247 | unsigned long last_switch_timestamp; |
1242 | unsigned long last_switch_count; | 1248 | unsigned long last_switch_count; |