aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2007-08-09 05:16:52 -0400
committerIngo Molnar <mingo@elte.hu>2007-08-09 05:16:52 -0400
commita69edb55605117cc0f20aa36c49c20b96590774d (patch)
tree7e06cd9abce45d450ae9ee365dab3901e7193c01 /kernel
parent194081ebfaa8c7d16133e08dd79254910c20c6ff (diff)
sched: fix update_stats_enqueue() reniced codepath
the key has to be rescaled to /weight even if it has a positive value. (this change only affects the scheduling of reniced tasks) Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched_fair.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index b885b3c85bba..7a632c534ce5 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -405,7 +405,8 @@ static void update_stats_enqueue(struct cfs_rq *cfs_rq, struct sched_entity *se)
405 (WMULT_SHIFT - NICE_0_SHIFT); 405 (WMULT_SHIFT - NICE_0_SHIFT);
406 } else { 406 } else {
407 tmp = se->wait_runtime; 407 tmp = se->wait_runtime;
408 key -= (tmp * se->load.weight) >> NICE_0_SHIFT; 408 key -= (tmp * se->load.inv_weight) >>
409 (WMULT_SHIFT - NICE_0_SHIFT);
409 } 410 }
410 } 411 }
411 412