Skip to content

Commit 627cc25

Browse files
author
Peter Zijlstra
committed
sched/deadline: Use ENQUEUE_MOVE to allow priority change
Pierre reported hitting balance callback warnings for deadline tasks after commit 6455ad5 ("sched: Move sched_class::prio_changed() into the change pattern"). It turns out that DEQUEUE_SAVE+ENQUEUE_RESTORE does not preserve DL priority and subsequently trips a balance pass -- where one was not expected. From discussion with Juri and Luca, the purpose of this clause was to deal with tasks new to DL and all those sites will have MOVE set (as well as CLASS, but MOVE is move conservative at this point). Per the previous patches MOVE is audited to always run the balance callbacks, so switch enqueue_dl_entity() to use MOVE for this case. Fixes: 6455ad5 ("sched: Move sched_class::prio_changed() into the change pattern") Reported-by: Pierre Gondois <pierre.gondois@arm.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by: Pierre Gondois <pierre.gondois@arm.com> Tested-by: Juri Lelli <juri.lelli@redhat.com> Link: https://patch.msgid.link/20260114130528.GB831285@noisy.programming.kicks-ass.net
1 parent e008ec6 commit 627cc25

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kernel/sched/deadline.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2214,7 +2214,7 @@ enqueue_dl_entity(struct sched_dl_entity *dl_se, int flags)
22142214
update_dl_entity(dl_se);
22152215
} else if (flags & ENQUEUE_REPLENISH) {
22162216
replenish_dl_entity(dl_se);
2217-
} else if ((flags & ENQUEUE_RESTORE) &&
2217+
} else if ((flags & ENQUEUE_MOVE) &&
22182218
!is_dl_boosted(dl_se) &&
22192219
dl_time_before(dl_se->deadline, rq_clock(rq_of_dl_se(dl_se)))) {
22202220
setup_new_dl_entity(dl_se);

0 commit comments

Comments
 (0)