lkml.org 
[lkml]   [2006]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] sched: smpnice - fix average load per run queue calculations
The logical value to use for the average load per task on a run queue 
without any runnable tasks is the "default" load for a nice==0 task.
Failure to do this may lead to anomalies in try_to_wake_up(), etc.

Signed-off-by: Peter Williams <pwil3058@bigpond.com.au>

Peter
--
Peter Williams pwil3058@bigpond.net.au

"Learning, n. The kind of ignorance distinguishing the studious."
-- Ambrose Bierce
Index: MM-2.6.X/kernel/sched.c
===================================================================
--- MM-2.6.X.orig/kernel/sched.c 2006-02-27 17:18:12.000000000 +1100
+++ MM-2.6.X/kernel/sched.c 2006-02-27 17:19:52.000000000 +1100
@@ -1058,7 +1058,7 @@ static inline unsigned long cpu_avg_load
runqueue_t *rq = cpu_rq(cpu);
unsigned long n = rq->nr_running;

- return n ? rq->raw_weighted_load / n : rq->raw_weighted_load;
+ return n ? rq->raw_weighted_load / n : SCHED_LOAD_SCALE;
}

/*
\
 
 \ /
  Last update: 2006-02-27 07:33    [W:0.029 / U:0.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site