From: Ingo Molnar Date: Thu, 9 Aug 2007 09:16:52 +0000 (+0200) Subject: sched: fix update_stats_enqueue() reniced codepath X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a69edb55605117cc0f20aa36c49c20b96590774d;p=linux-beck.git 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 --- 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) (WMULT_SHIFT - NICE_0_SHIFT); } else { tmp = se->wait_runtime; - key -= (tmp * se->load.weight) >> NICE_0_SHIFT; + key -= (tmp * se->load.inv_weight) >> + (WMULT_SHIFT - NICE_0_SHIFT); } }