bug in sched.c:activate_task()

From: Chen, Kenneth W
Date: Mon Oct 04 2004 - 21:18:36 EST


Update p->timestamp to "now" in activate_task() doesn't look right
to me at all. p->timestamp records last time it was running on a
cpu. activate_task shouldn't update that variable when it queues
a task on the runqueue.

This bug (and combined with others) triggers improper load balancing.

Patch against linux-2.6.9-rc3. Didn't diff it against 2.6.9-rc3-mm2
because mm tree has so many change in sched.c.

Signed-off-by: Ken Chen <kenneth.w.chen@xxxxxxxxx>


--- linux-2.6.9-rc3/kernel/sched.c.orig 2004-10-04 19:11:21.000000000 -0700
+++ linux-2.6.9-rc3/kernel/sched.c 2004-10-04 19:11:35.000000000 -0700
@@ -888,7 +888,6 @@ static void activate_task(task_t *p, run
p->activated = 1;
}
}
- p->timestamp = now;

__activate_task(p, rq);
}


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/