aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorMandeep Singh Baines <msb@google.com>2009-01-15 14:08:40 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-16 08:06:04 -0500
commite162b39a368f0401e41b558f430c354d12a85b37 (patch)
tree3fb7e4d48f398d62e5074e7e3dd183cc54f59820 /include/linux/sched.h
parentc903ff837909ccada51243307d4239f86af40179 (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/linux/sched.h')
-rw-r--r--include/linux/sched.h14
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);
299extern unsigned int softlockup_panic; 299extern unsigned int softlockup_panic;
300extern unsigned long sysctl_hung_task_check_count;
301extern unsigned long sysctl_hung_task_timeout_secs;
302extern unsigned long sysctl_hung_task_warnings;
303extern int softlockup_thresh; 300extern int softlockup_thresh;
304#else 301#else
305static inline void softlockup_tick(void) 302static 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
317extern unsigned int sysctl_hung_task_panic;
318extern unsigned long sysctl_hung_task_check_count;
319extern unsigned long sysctl_hung_task_timeout_secs;
320extern unsigned long sysctl_hung_task_warnings;
321extern 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;