Skip to content
Commit 2fb25655 authored by Tianchen Ding's avatar Tianchen Ding Committed by Greg Kroah-Hartman
Browse files

sched/eevdf: Fix miscalculation in reweight_entity() when se is not curr

[ Upstream commit afae8002 ]

reweight_eevdf() only keeps V unchanged inside itself. When se !=
cfs_rq->curr, it would be dequeued from rb tree first. So that V is
changed and the result is wrong. Pass the original V to reweight_eevdf()
to fix this issue.

Fixes: eab03c23

 ("sched/eevdf: Fix vruntime adjustment on reweight")
Signed-off-by: default avatarTianchen Ding <dtcccc@linux.alibaba.com>
[peterz: flip if() condition for clarity]
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: default avatarAbel Wu <wuyun.abel@bytedance.com>
Link: https://lkml.kernel.org/r/20240306022133.81008-3-dtcccc@linux.alibaba.com
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 5154b1e3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment