projects
/
platform
/
kernel
/
linux-starfive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'linus' into perf/core, to pick up fixes
[platform/kernel/linux-starfive.git]
/
kernel
/
hung_task.c
diff --git
a/kernel/hung_task.c
b/kernel/hung_task.c
index
cb8e3e8
..
4a91916
100644
(file)
--- a/
kernel/hung_task.c
+++ b/
kernel/hung_task.c
@@
-34,7
+34,7
@@
int __read_mostly sysctl_hung_task_check_count = PID_MAX_LIMIT;
* is disabled during the critical section. It also controls the size of
* the RCU grace period. So it needs to be upper-bound.
*/
* is disabled during the critical section. It also controls the size of
* the RCU grace period. So it needs to be upper-bound.
*/
-#define HUNG_TASK_
BATCHING 1024
+#define HUNG_TASK_
LOCK_BREAK (HZ / 10)
/*
* Zero means infinite timeout - no checking done:
/*
* Zero means infinite timeout - no checking done:
@@
-112,8
+112,11
@@
static void check_hung_task(struct task_struct *t, unsigned long timeout)
trace_sched_process_hang(t);
trace_sched_process_hang(t);
- if (!sysctl_hung_task_warnings && !sysctl_hung_task_panic)
- return;
+ if (sysctl_hung_task_panic) {
+ console_verbose();
+ hung_task_show_lock = true;
+ hung_task_call_panic = true;
+ }
/*
* Ok, the task did not get scheduled for more than 2 minutes,
/*
* Ok, the task did not get scheduled for more than 2 minutes,
@@
-135,11
+138,6
@@
static void check_hung_task(struct task_struct *t, unsigned long timeout)
}
touch_nmi_watchdog();
}
touch_nmi_watchdog();
-
- if (sysctl_hung_task_panic) {
- hung_task_show_lock = true;
- hung_task_call_panic = true;
- }
}
/*
}
/*
@@
-173,7
+171,7
@@
static bool rcu_lock_break(struct task_struct *g, struct task_struct *t)
static void check_hung_uninterruptible_tasks(unsigned long timeout)
{
int max_count = sysctl_hung_task_check_count;
static void check_hung_uninterruptible_tasks(unsigned long timeout)
{
int max_count = sysctl_hung_task_check_count;
-
int batch_count = HUNG_TASK_BATCHING
;
+
unsigned long last_break = jiffies
;
struct task_struct *g, *t;
/*
struct task_struct *g, *t;
/*
@@
-188,10
+186,10
@@
static void check_hung_uninterruptible_tasks(unsigned long timeout)
for_each_process_thread(g, t) {
if (!max_count--)
goto unlock;
for_each_process_thread(g, t) {
if (!max_count--)
goto unlock;
- if (!--batch_count) {
- batch_count = HUNG_TASK_BATCHING;
+ if (time_after(jiffies, last_break + HUNG_TASK_LOCK_BREAK)) {
if (!rcu_lock_break(g, t))
goto unlock;
if (!rcu_lock_break(g, t))
goto unlock;
+ last_break = jiffies;
}
/* use "==" to skip the TASK_KILLABLE tasks waiting on NFS */
if (t->state == TASK_UNINTERRUPTIBLE)
}
/* use "==" to skip the TASK_KILLABLE tasks waiting on NFS */
if (t->state == TASK_UNINTERRUPTIBLE)