16 #include <linux/export.h>
17 #include <linux/sysctl.h>
31 #define HUNG_TASK_BATCHING 1024
49 CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE;
51 static int __init hung_task_panic_setup(
char *
str)
57 __setup(
"hung_task_panic=", hung_task_panic_setup);
68 .notifier_call = hung_task_panic,
71 static void check_hung_task(
struct task_struct *
t,
unsigned long timeout)
90 if (switch_count != t->last_switch_count) {
91 t->last_switch_count = switch_count;
103 "%ld seconds.\n", t->
comm, t->
pid, timeout);
104 printk(
KERN_ERR "\"echo 0 > /proc/sys/kernel/hung_task_timeout_secs\""
105 " disables this message.\n");
112 trigger_all_cpu_backtrace();
113 panic(
"hung_task: blocked tasks");
133 can_cont = pid_alive(g) && pid_alive(t);
145 static void check_hung_uninterruptible_tasks(
unsigned long timeout)
162 if (!--batch_count) {
164 if (!rcu_lock_break(g, t))
169 check_hung_task(t, timeout);
175 static unsigned long timeout_jiffies(
unsigned long timeout)
186 size_t *lenp, loff_t *ppos)
214 check_hung_uninterruptible_tasks(timeout);
220 static int __init hung_task_init(
void)