]> git.baikalelectronics.ru Git - kernel.git/commit
sched: remove do_div() from __sched_slice()
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Fri, 25 Jan 2008 20:08:21 +0000 (21:08 +0100)
committerIngo Molnar <mingo@elte.hu>
Fri, 25 Jan 2008 20:08:21 +0000 (21:08 +0100)
commit4ed30c9345ce4703dd97bf544d1398d4180ad239
treed2500b882a4ed7e9a97e8633120a6e6aeccfa0c3
parentdb32806efd1e860779754febb7fa36e506d00607
sched: remove do_div() from __sched_slice()

Yanmin Zhang noticed a nice optimization:

  p = l * nr / nl, nl = l/g -> p = g * nr

which eliminates a do_div() from __sched_period().

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched_fair.c