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>
This commit is contained in:
@@ -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)
|
static inline void update_load_add(struct load_weight *lw, unsigned long inc)
|
||||||
{
|
{
|
||||||
lw->weight += inc;
|
lw->weight += inc;
|
||||||
|
lw->inv_weight = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void update_load_sub(struct load_weight *lw, unsigned long dec)
|
static inline void update_load_sub(struct load_weight *lw, unsigned long dec)
|
||||||
{
|
{
|
||||||
lw->weight -= dec;
|
lw->weight -= dec;
|
||||||
|
lw->inv_weight = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user