diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2008-06-27 13:41:32 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-06-27 14:31:43 +0200 |
commit | cb5ef42a03a13f95a9ea94e6cda4f7a47497871f (patch) | |
tree | 4c94df72d2889ecce52bf74b141ae06d85d4708a /kernel/sched_features.h | |
parent | 051c67640e771fd6ad1b676fc0c16c379b3c6f80 (diff) | |
download | kernel_samsung_espresso10-cb5ef42a03a13f95a9ea94e6cda4f7a47497871f.zip kernel_samsung_espresso10-cb5ef42a03a13f95a9ea94e6cda4f7a47497871f.tar.gz kernel_samsung_espresso10-cb5ef42a03a13f95a9ea94e6cda4f7a47497871f.tar.bz2 |
sched: optimize effective_load()
s_i = S * rw_i / \Sum_j rw_j
-> \Sum_j rw_j = S * rw_i / s_i
-> s'_i = S * (rw_i + w) / (\Sum_j rw_j + w)
delta s = s' - s = S * (rw + w) / ((S * rw / s) + w)
= s * (S * (rw + w) / (S * rw + s * w) - 1)
a = S*(rw+w), b = S*rw + s*w
delta s = s * (a-b) / b
IOW, trade one divide for two multiplies
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Cc: Mike Galbraith <efault@gmx.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_features.h')
0 files changed, 0 insertions, 0 deletions