summaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-09-16 21:09:13 +0200
committerIngo Molnar <mingo@elte.hu>2009-09-17 09:51:20 +0200
commiteb24073bc1fe3e569a855cf38d529fb650c35524 (patch)
tree1dfc4a556f5b78c59cb1accf96666d3105a1cd78 /kernel/sched.c
parent182a85f8a119c789610a9d464f4129ded9f3c107 (diff)
downloadlinux-eb24073bc1fe3e569a855cf38d529fb650c35524.tar.bz2
sched: Fix TASK_WAKING & loadaverage breakage
Fix this: top - 21:54:00 up 2:59, 1 user, load average: 432512.33, 426421.74, 417432.74 Which happens because we now set TASK_WAKING before activate_task(). Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 5049d959bb26..969dfaef2465 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2343,7 +2343,11 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state,
/*
* In order to handle concurrent wakeups and release the rq->lock
* we put the task in TASK_WAKING state.
+ *
+ * First fix up the nr_uninterruptible count:
*/
+ if (task_contributes_to_load(p))
+ rq->nr_uninterruptible--;
p->state = TASK_WAKING;
task_rq_unlock(rq, &flags);