mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
sched: optimize vruntime based scheduling
optimize vruntime based scheduling. Signed-off-by: Ingo Molnar <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> Signed-off-by: Mike Galbraith <[email protected]> Reviewed-by: Thomas Gleixner <[email protected]>
This commit is contained in:
parent
bf5c91ba8c
commit
6cb5819514
2 changed files with 6 additions and 2 deletions
|
|
@ -732,13 +732,14 @@ 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 = WMULT_CONST / lw->weight;
|
||||
if (sched_feat(FAIR_SLEEPERS))
|
||||
lw->inv_weight = WMULT_CONST / lw->weight;
|
||||
}
|
||||
|
||||
static inline void update_load_sub(struct load_weight *lw, unsigned long dec)
|
||||
{
|
||||
lw->weight -= dec;
|
||||
if (likely(lw->weight))
|
||||
if (sched_feat(FAIR_SLEEPERS) && likely(lw->weight))
|
||||
lw->inv_weight = WMULT_CONST / lw->weight;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue