Commit b76b74c5 authored by Tianchen Ding's avatar Tianchen Ding Committed by Ma Wupeng
Browse files

sched/eevdf: Always update V if se->on_rq when reweighting

stable inclusion
from stable-v6.6.30
commit dc21662b5b3430d405fea5bb0d30eda4e85a59af
bugzilla: https://gitee.com/openeuler/kernel/issues/I9MPZ8

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=dc21662b5b3430d405fea5bb0d30eda4e85a59af



--------------------------------

[ Upstream commit 11b1b8bc2b98e21ddf47e08b56c21502c685b2c3 ]

reweight_eevdf() needs the latest V to do accurate calculation for new
ve and vd. So update V unconditionally when se is runnable.

Fixes: eab03c23c2a1 ("sched/eevdf: Fix vruntime adjustment on reweight")
Suggested-by: default avatarAbel Wu <wuyun.abel@bytedance.com>
Signed-off-by: default avatarTianchen Ding <dtcccc@linux.alibaba.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: default avatarAbel Wu <wuyun.abel@bytedance.com>
Tested-by: default avatarK Prateek Nayak <kprateek.nayak@amd.com>
Tested-by: default avatarChen Yu <yu.c.chen@intel.com>
Link: https://lore.kernel.org/r/20240306022133.81008-2-dtcccc@linux.alibaba.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZhangPeng <zhangpeng362@huawei.com>
parent 56c0fee0
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -3891,9 +3891,8 @@ static void reweight_entity(struct cfs_rq *cfs_rq, struct sched_entity *se,

	if (se->on_rq) {
		/* commit outstanding execution time */
		if (curr)
		update_curr(cfs_rq);
		else
		if (!curr)
			__dequeue_entity(cfs_rq, se);
		update_load_sub(&cfs_rq->load, se->load.weight);
	}