]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
sched: fix niced_granularity() shift
authorIngo Molnar <mingo@elte.hu>
Wed, 5 Sep 2007 12:32:49 +0000 (14:32 +0200)
committerIngo Molnar <mingo@elte.hu>
Wed, 5 Sep 2007 12:32:49 +0000 (14:32 +0200)
fix niced_granularity(). This resulted in under-scheduling for
CPU-bound negative nice level tasks (and this in turn caused
higher than necessary latencies in nice-0 tasks).

Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched_fair.c

index ce39282d9c0d221205fa793a3a20c77627b90905..810b52d994e082596e342ea6bc18e5d17fed6549 100644 (file)
@@ -291,7 +291,7 @@ niced_granularity(struct sched_entity *curr, unsigned long granularity)
        /*
         * It will always fit into 'long':
         */
-       return (long) (tmp >> WMULT_SHIFT);
+       return (long) (tmp >> (WMULT_SHIFT-NICE_0_SHIFT));
 }
 
 static inline void