From: Ingo Molnar Date: Fri, 14 Mar 2008 22:48:28 +0000 (+0100) Subject: sched: fix update_load_add()/sub() X-Git-Tag: v2.6.25-rc6~9 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e89996ae3f9e88d4fd75751a15c10b19d197e702;p=linux-2.6 sched: fix update_load_add()/sub() 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 Signed-off-by: Peter Zijlstra --- diff --git a/kernel/sched.c b/kernel/sched.c index 9df9ba73cb..3a4ba3dc0f 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -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; } /*