diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-03-14 18:48:28 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-03-14 22:02:49 -0400 |
commit | e89996ae3f9e88d4fd75751a15c10b19d197e702 (patch) | |
tree | b4b754697995e3ebff4e987b46167263e86ff0d8 /kernel/sched.c | |
parent | 3fe69747dab906cd6a8523230276a9820d6a514f (diff) |
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 <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, 2 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 9df9ba73cb7a..3a4ba3dc0f49 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -1108,11 +1108,13 @@ calc_delta_fair(unsigned long delta_exec, struct load_weight *lw) | |||
1108 | static inline void update_load_add(struct load_weight *lw, unsigned long inc) | 1108 | static inline void update_load_add(struct load_weight *lw, unsigned long inc) |
1109 | { | 1109 | { |
1110 | lw->weight += inc; | 1110 | lw->weight += inc; |
1111 | lw->inv_weight = 0; | ||
1111 | } | 1112 | } |
1112 | 1113 | ||
1113 | static inline void update_load_sub(struct load_weight *lw, unsigned long dec) | 1114 | static inline void update_load_sub(struct load_weight *lw, unsigned long dec) |
1114 | { | 1115 | { |
1115 | lw->weight -= dec; | 1116 | lw->weight -= dec; |
1117 | lw->inv_weight = 0; | ||
1116 | } | 1118 | } |
1117 | 1119 | ||
1118 | /* | 1120 | /* |