Skip to content

Commit

Permalink
sched: fix niced_granularity() shift
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ingo Molnar committed Sep 5, 2007
1 parent 7fd0d2d commit a0dc726
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a0dc726

Please sign in to comment.