Re: [PATCH 05/12] sched: Move sched_class::prio_changed() into the change pattern

From: Pierre Gondois

Date: Thu Jan 15 2026 - 08:14:57 EST


Hello Peter,

On 1/15/26 10:05, Peter Zijlstra wrote:
On Thu, Jan 15, 2026 at 09:24:31AM +0100, Peter Zijlstra wrote:
On Wed, Jan 14, 2026 at 03:20:48PM +0100, Juri Lelli wrote:

--- a/kernel/sched/syscalls.c
+++ b/kernel/sched/syscalls.c
@@ -639,7 +639,7 @@ int __sched_setscheduler(struct task_str
* itself.
*/
newprio = rt_effective_prio(p, newprio);
- if (newprio == oldprio)
+ if (newprio == oldprio && !dl_prio(newprio))
queue_flags &= ~DEQUEUE_MOVE;
}
We have been using (improperly?) ENQUEUE_SAVE also to know when a new
entity gets setscheduled to DEADLINE (or its parameters are changed) and
it looks like this keeps that happening with DEQUEUE_MOVE. So, from a
quick first look, it does sound good to me.
If this is strictly about tasks coming into SCHED_DEADLINE there are a
number of alternative options:

- there are the sched_class::switch{ing,ed}_to() callbacks;
- there is (the fairly recent) ENQUEUE_CLASS.

Anyway, let me break up this one patch into individual bits and write
changelogs. I'll stick them in queue/sched/urgent for now; hopefully
Pierre can given them a spin and report back if it all sorts his
problem).
Now live at:

https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/log/?h=sched/urgent

Please test.
I don't see the balance_callback or the double clock update warnings anymore.

Thanks for the branch,
Regards,
Pierre