/[pkg-src]/trunk/kernel26-magellan/patches-2.6.16-r12/0003-2.6.16-sched-smpnice-fix-average-load-per-run-queue-calculations.patch |
Contents of /trunk/kernel26-magellan/patches-2.6.16-r12/0003-2.6.16-sched-smpnice-fix-average-load-per-run-queue-calculations.patch
Parent Directory | Revision Log
Revision 72 -
(show annotations)
(download)
Mon Jun 5 09:25:38 2006 UTC (18 years, 3 months ago) by niro
File size: 1530 byte(s)
Mon Jun 5 09:25:38 2006 UTC (18 years, 3 months ago) by niro
File size: 1530 byte(s)
ver bump to 2.6.16-r12: - updated to linux-2.6.16.19 - updated to ck11
1 | |
2 | From: Peter Williams <pwil3058@bigpond.net.au> |
3 | |
4 | The logical value to use for the average load per task on a run queue |
5 | without any runnable tasks is the "default" load for a nice==0 task. |
6 | Failure to do this may lead to anomalies in try_to_wake_up(), etc. |
7 | |
8 | Signed-off-by: Peter Williams <pwil3058@bigpond.com.au> |
9 | Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com> |
10 | Cc: "Chen, Kenneth W" <kenneth.w.chen@intel.com> |
11 | Cc: Ingo Molnar <mingo@elte.hu> |
12 | Cc: Nick Piggin <nickpiggin@yahoo.com.au> |
13 | Cc: Con Kolivas <kernel@kolivas.org> |
14 | Cc: John Hawkes <hawkes@sgi.com> |
15 | Signed-off-by: Andrew Morton <akpm@osdl.org> |
16 | kernel/sched.c | 4 +++- |
17 | 1 files changed, 3 insertions(+), 1 deletion(-) |
18 | |
19 | Index: linux-2.6.16-ck1/kernel/sched.c |
20 | =================================================================== |
21 | --- linux-2.6.16-ck1.orig/kernel/sched.c 2006-03-20 20:46:44.000000000 +1100 |
22 | +++ linux-2.6.16-ck1/kernel/sched.c 2006-03-20 20:46:45.000000000 +1100 |
23 | @@ -1058,7 +1058,7 @@ static inline unsigned long cpu_avg_load |
24 | runqueue_t *rq = cpu_rq(cpu); |
25 | unsigned long n = rq->nr_running; |
26 | |
27 | - return n ? rq->raw_weighted_load / n : rq->raw_weighted_load; |
28 | + return n ? rq->raw_weighted_load / n : SCHED_LOAD_SCALE; |
29 | } |
30 | |
31 | /* |
32 | @@ -2146,6 +2146,8 @@ find_busiest_group(struct sched_domain * |
33 | min(busiest_load_per_task, max_load); |
34 | if (this_nr_running) |
35 | this_load_per_task /= this_nr_running; |
36 | + else |
37 | + this_load_per_task = SCHED_LOAD_SCALE; |
38 | pwr_now += this->cpu_power * |
39 | min(this_load_per_task, this_load); |
40 | pwr_now /= SCHED_LOAD_SCALE; |