Skip to content

Commit 11b1b8b

Browse files
dtccccPeter Zijlstra
authored andcommitted
sched/eevdf: Always update V if se->on_rq when reweighting
reweight_eevdf() needs the latest V to do accurate calculation for new ve and vd. So update V unconditionally when se is runnable. Fixes: eab03c2 ("sched/eevdf: Fix vruntime adjustment on reweight") Suggested-by: Abel Wu <[email protected]> Signed-off-by: Tianchen Ding <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Abel Wu <[email protected]> Tested-by: K Prateek Nayak <[email protected]> Tested-by: Chen Yu <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent ed30a4a commit 11b1b8b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

kernel/sched/fair.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3790,9 +3790,8 @@ static void reweight_entity(struct cfs_rq *cfs_rq, struct sched_entity *se,
37903790

37913791
if (se->on_rq) {
37923792
/* commit outstanding execution time */
3793-
if (curr)
3794-
update_curr(cfs_rq);
3795-
else
3793+
update_curr(cfs_rq);
3794+
if (!curr)
37963795
__dequeue_entity(cfs_rq, se);
37973796
update_load_sub(&cfs_rq->load, se->load.weight);
37983797
}

0 commit comments

Comments
 (0)