]> err.no Git - linux-2.6/commitdiff
sched: fix update_load_add()/sub()
authorIngo Molnar <mingo@elte.hu>
Fri, 14 Mar 2008 22:48:28 +0000 (23:48 +0100)
committerIngo Molnar <mingo@elte.hu>
Sat, 15 Mar 2008 02:02:49 +0000 (03:02 +0100)
Clear the cached inverse value when updating load. This is needed for
calc_delta_mine() to work correctly when using the rq load.

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

index 9df9ba73cb7a941ea7a8feb18a58b35e726b26a4..3a4ba3dc0f498fe71d04d7b33b8cfe086695d4a5 100644 (file)
@@ -1108,11 +1108,13 @@ calc_delta_fair(unsigned long delta_exec, struct load_weight *lw)
 static inline void update_load_add(struct load_weight *lw, unsigned long inc)
 {
        lw->weight += inc;
+       lw->inv_weight = 0;
 }
 
 static inline void update_load_sub(struct load_weight *lw, unsigned long dec)
 {
        lw->weight -= dec;
+       lw->inv_weight = 0;
 }
 
 /*