* [PATCH] softlockup: minor cleanup, don't check task->state twice
@ 2008-08-30 17:08 Oleg Nesterov
2008-09-01 8:43 ` Andi Kleen
0 siblings, 1 reply; 2+ messages in thread
From: Oleg Nesterov @ 2008-08-30 17:08 UTC (permalink / raw)
To: Andi Kleen, Andrew Morton, Linus Torvalds; +Cc: linux-kernel
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>
--- 2.6.27-rc4/kernel/softlockup.c~SOFTLOCKUP 2008-08-30 18:24:40.000000000 +0400
+++ 2.6.27-rc4/kernel/softlockup.c 2008-08-30 21:06:51.000000000 +0400
@@ -180,10 +180,6 @@ static void check_hung_task(struct task_
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_t
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:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] softlockup: minor cleanup, don't check task->state twice
2008-08-30 17:08 [PATCH] softlockup: minor cleanup, don't check task->state twice Oleg Nesterov
@ 2008-09-01 8:43 ` Andi Kleen
0 siblings, 0 replies; 2+ messages in thread
From: Andi Kleen @ 2008-09-01 8:43 UTC (permalink / raw)
To: Oleg Nesterov; +Cc: Andrew Morton, Linus Torvalds, linux-kernel
Oleg Nesterov wrote:
Hi Oleg,
> 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.
Yes makes sense to do it this way. Thanks.
-Andi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-09-01 8:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-30 17:08 [PATCH] softlockup: minor cleanup, don't check task->state twice Oleg Nesterov
2008-09-01 8:43 ` Andi Kleen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox