Re: [PATCH] sched.c: Be a bit more conservative in SMP

Vincent Pelletier
2006-09-03T17:11:00Z

Forgot the signed-off-by line in previous mail. Reposting same patch just in
case. CC to maintainer as advised in the FAQ.

Signed-off-by: Vincent Pelletier <vincent.plr@wanadoo.fr>

--- linux-2.6-2.6.17/kernel/sched.c 2006-06-18 03:49:35.000000000 +0200
+++ linux-2.6-2.6.17-conservative/kernel/sched.c 2006-09-03
13:18:11.000000000 +0200
@@ -952,7 +952,7 @@ void kick_process(task_t *p)
static inline unsigned long source_load(int cpu, int type)
{
runqueue_t *rq = cpu_rq(cpu);
- unsigned long load_now = rq->nr_running * SCHED_LOAD_SCALE;
+ unsigned long load_now = (max(rq->nr_running - 1, 0)) *
SCHED_LOAD_SCALE;
if (type == 0)
return load_now;

--
VGER BF report: U 0.500348