sched: Update time before requeueing delayed entities

In order to compute the right lag, it is required to update time to 'now'.
Without this, the delayed entity might appear younger than it really is and
receive less compensation for having waited.

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
This commit is contained in:
Vincent Guittot
2026-08-14 15:52:41 +02:00
committed by Peter Zijlstra
parent db2ddb8714
commit 333238da9a

View File

@@ -7779,6 +7779,8 @@ requeue_delayed_entity(struct sched_entity *se)
WARN_ON_ONCE(!se->sched_delayed);
WARN_ON_ONCE(!se->on_rq);
update_curr(cfs_rq);
if (update_entity_lag(cfs_rq, se)) {
cfs_rq->nr_queued--;
if (se != cfs_rq->curr)