aboutsummaryrefslogtreecommitdiff
path: root/kernel/softlockup.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-29 10:19:27 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-29 10:19:27 -0800
commit076d84bbdb396360d16aaa108c55aa1e24ad47a3 (patch)
tree7ea509f9d6160fafa9ed6bdadeae649e204a8337 /kernel/softlockup.c
parentd40e705903397445c6861a0a56c23e5b2e8f9b9a (diff)
parent7be2a03e3174cee3a3cdcdf17db357470f51caff (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched
* git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched: softlockup: fix task state setting rcu: add support for dynamic ticks and preempt rcu
Diffstat (limited to 'kernel/softlockup.c')
-rw-r--r--kernel/softlockup.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/kernel/softlockup.c b/kernel/softlockup.c
index 7c2da88db4e..01b6522fd92 100644
--- a/kernel/softlockup.c
+++ b/kernel/softlockup.c
@@ -216,26 +216,27 @@ static int watchdog(void *__bind_cpu)
/* initialize timestamp */
touch_softlockup_watchdog();
+ set_current_state(TASK_INTERRUPTIBLE);
/*
* Run briefly once per second to reset the softlockup timestamp.
* If this gets delayed for more than 60 seconds then the
* debug-printout triggers in softlockup_tick().
*/
while (!kthread_should_stop()) {
- set_current_state(TASK_INTERRUPTIBLE);
touch_softlockup_watchdog();
schedule();
if (kthread_should_stop())
break;
- if (this_cpu != check_cpu)
- continue;
-
- if (sysctl_hung_task_timeout_secs)
- check_hung_uninterruptible_tasks(this_cpu);
+ if (this_cpu == check_cpu) {
+ if (sysctl_hung_task_timeout_secs)
+ check_hung_uninterruptible_tasks(this_cpu);
+ }
+ set_current_state(TASK_INTERRUPTIBLE);
}
+ __set_current_state(TASK_RUNNING);
return 0;
}