projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
[firefly-linux-kernel-4.4.55.git]
/
kernel
/
hung_task.c
diff --git
a/kernel/hung_task.c
b/kernel/hung_task.c
index 3e97fb126e6b9255a852887923f39230cd52c513..9328b80eaf14c347bb188bee856154ea07b86168 100644
(file)
--- a/
kernel/hung_task.c
+++ b/
kernel/hung_task.c
@@
-16,11
+16,12
@@
#include <linux/export.h>
#include <linux/sysctl.h>
#include <linux/utsname.h>
#include <linux/export.h>
#include <linux/sysctl.h>
#include <linux/utsname.h>
+#include <trace/events/sched.h>
/*
* The number of tasks checked:
*/
/*
* The number of tasks checked:
*/
-
unsigned long
__read_mostly sysctl_hung_task_check_count = PID_MAX_LIMIT;
+
int
__read_mostly sysctl_hung_task_check_count = PID_MAX_LIMIT;
/*
* Limit number of tasks checked in a batch.
/*
* Limit number of tasks checked in a batch.
@@
-92,6
+93,9
@@
static void check_hung_task(struct task_struct *t, unsigned long timeout)
t->last_switch_count = switch_count;
return;
}
t->last_switch_count = switch_count;
return;
}
+
+ trace_sched_process_hang(t);
+
if (!sysctl_hung_task_warnings)
return;
sysctl_hung_task_warnings--;
if (!sysctl_hung_task_warnings)
return;
sysctl_hung_task_warnings--;
@@
-203,6
+207,14
@@
int proc_dohung_task_timeout_secs(struct ctl_table *table, int write,
return ret;
}
return ret;
}
+static atomic_t reset_hung_task = ATOMIC_INIT(0);
+
+void reset_hung_task_detector(void)
+{
+ atomic_set(&reset_hung_task, 1);
+}
+EXPORT_SYMBOL_GPL(reset_hung_task_detector);
+
/*
* kthread which checks for tasks stuck in D state
*/
/*
* kthread which checks for tasks stuck in D state
*/
@@
-216,6
+228,9
@@
static int watchdog(void *dummy)
while (schedule_timeout_interruptible(timeout_jiffies(timeout)))
timeout = sysctl_hung_task_timeout_secs;
while (schedule_timeout_interruptible(timeout_jiffies(timeout)))
timeout = sysctl_hung_task_timeout_secs;
+ if (atomic_xchg(&reset_hung_task, 0))
+ continue;
+
check_hung_uninterruptible_tasks(timeout);
}
check_hung_uninterruptible_tasks(timeout);
}