diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-03-14 22:20:01 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-03-15 03:02:50 +0100 |
commit | 27d117266097101dcf79c4576903cdcdd0eabffc (patch) | |
tree | 854e6e824b03385d71d8d7f2feb9311572bb86f2 /kernel/sched.c | |
parent | e89996ae3f9e88d4fd75751a15c10b19d197e702 (diff) | |
download | kernel_samsung_crespo-27d117266097101dcf79c4576903cdcdd0eabffc.zip kernel_samsung_crespo-27d117266097101dcf79c4576903cdcdd0eabffc.tar.gz kernel_samsung_crespo-27d117266097101dcf79c4576903cdcdd0eabffc.tar.bz2 |
sched: fix calc_delta_mine()
lw->weight can be 0 for a short time during bootup.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 3a4ba3d..6b06f23 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -1084,7 +1084,7 @@ calc_delta_mine(unsigned long delta_exec, unsigned long weight, u64 tmp; if (unlikely(!lw->inv_weight)) - lw->inv_weight = (WMULT_CONST - lw->weight/2) / lw->weight + 1; + lw->inv_weight = (WMULT_CONST-lw->weight/2) / (lw->weight+1); tmp = (u64)delta_exec * weight; /* |