Skip to content

Commit

Permalink
sched: fix vslice
Browse files Browse the repository at this point in the history
vslice was missing a factor NICE_0_LOAD, as weight is in
weight*NICE_0_LOAD units.

the effect of this bug was larger initial slices and
thus latency-noisier forks.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Nov 9, 2007
1 parent dbeeb81 commit 10b7772
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ static u64 __sched_vslice(unsigned long rq_weight, unsigned long nr_running)
{
u64 vslice = __sched_period(nr_running);

vslice *= NICE_0_LOAD;
do_div(vslice, rq_weight);

return vslice;
Expand Down

0 comments on commit 10b7772

Please sign in to comment.