summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2008-08-30 21:08:40 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-09-02 10:49:51 -0700
commitcbaed698f37494b30b2449b51c728ae48630cb2b (patch)
tree470908bdfe0a5f6e5321c0e1010e80ebced701a4
parent6781f4ae30bbb8ebf31187b3c9304be16966f5a0 (diff)
softlockup: minor cleanup, don't check task->state twice
The recent commit 16d9679f33caf7e683471647d1472bfe133d858 changed check_hung_task() to filter out the TASK_KILLABLE tasks. We can move this check to the caller which has to test t->state anyway. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Acked-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--kernel/softlockup.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/kernel/softlockup.c b/kernel/softlockup.c
index 1a07f8ca4b92..cb838ee93a82 100644
--- a/kernel/softlockup.c
+++ b/kernel/softlockup.c
@@ -180,10 +180,6 @@ static void check_hung_task(struct task_struct *t, unsigned long now)
if (t->flags & PF_FROZEN)
return;
- /* Don't check for tasks waiting on network file systems like NFS */
- if (t->state & TASK_KILLABLE)
- return;
-
if (switch_count != t->last_switch_count || !t->last_switch_timestamp) {
t->last_switch_count = switch_count;
t->last_switch_timestamp = now;
@@ -237,7 +233,8 @@ static void check_hung_uninterruptible_tasks(int this_cpu)
do_each_thread(g, t) {
if (!--max_count)
goto unlock;
- if (t->state & TASK_UNINTERRUPTIBLE)
+ /* use "==" to skip the TASK_KILLABLE tasks waiting on NFS */
+ if (t->state == TASK_UNINTERRUPTIBLE)
check_hung_task(t, now);
} while_each_thread(g, t);
unlock: