Index: MM-2.6.X/kernel/sched.c =================================================================== --- MM-2.6.X.orig/kernel/sched.c 2006-01-13 14:53:34.000000000 +1100 +++ MM-2.6.X/kernel/sched.c 2006-01-13 15:11:19.000000000 +1100 @@ -1042,7 +1042,8 @@ void kick_process(task_t *p) static unsigned long source_load(int cpu, int type) { runqueue_t *rq = cpu_rq(cpu); - unsigned long load_now = rq->prio_bias * SCHED_LOAD_SCALE; + unsigned long load_now = (rq->prio_bias * SCHED_LOAD_SCALE) / + NICE_TO_BIAS_PRIO(0); if (type == 0) return load_now; @@ -1056,7 +1057,8 @@ static unsigned long source_load(int cpu static inline unsigned long target_load(int cpu, int type) { runqueue_t *rq = cpu_rq(cpu); - unsigned long load_now = rq->prio_bias * SCHED_LOAD_SCALE; + unsigned long load_now = (rq->prio_bias * SCHED_LOAD_SCALE) / + NICE_TO_BIAS_PRIO(0); if (type == 0) return load_now; @@ -1322,7 +1324,8 @@ static int try_to_wake_up(task_t *p, uns * of the current CPU: */ if (sync) - tl -= p->bias_prio * SCHED_LOAD_SCALE; + tl -= (p->bias_prio * SCHED_LOAD_SCALE) / + NICE_TO_BIAS_PRIO(0); if ((tl <= load && tl + target_load(cpu, idx) <= SCHED_LOAD_SCALE) || @@ -2159,7 +2162,7 @@ find_busiest_group(struct sched_domain * } /* Get rid of the scaling factor, rounding down as we divide */ - *imbalance = *imbalance / SCHED_LOAD_SCALE; + *imbalance = (*imbalance * NICE_TO_BIAS_PRIO(0)) / SCHED_LOAD_SCALE; return busiest; out_balanced: @@ -2472,7 +2475,8 @@ static void rebalance_tick(int this_cpu, struct sched_domain *sd; int i; - this_load = this_rq->prio_bias * SCHED_LOAD_SCALE; + this_load = (this_rq->prio_bias * SCHED_LOAD_SCALE) / + NICE_TO_BIAS_PRIO(0); /* Update our load */ for (i = 0; i < 3; i++) { unsigned long new_load = this_load;