From: Ingo Molnar Date: Wed, 16 Sep 2009 19:09:13 +0000 (+0200) Subject: sched: Fix TASK_WAKING & loadaverage breakage X-Git-Tag: v2.6.32-rc1~652^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eb24073bc1fe3e569a855cf38d529fb650c35524;p=profile%2Fivi%2Fkernel-x86-ivi.git 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 Cc: Mike Galbraith LKML-Reference: Signed-off-by: Ingo Molnar --- diff --git a/kernel/sched.c b/kernel/sched.c index 5049d95..969dfae 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);