Re: [PATCH v2 12/12] sched: Remove sched_class::balance()
From: Peter Zijlstra
Date: Wed Nov 11 2026 - 10:49:24 EST
On Wed, Nov 11, 2026 at 05:57:01PM +0300, Kayra Cizmeci wrote:
> Hi Peter!
> Let's say a fair task named TA is working in CPU1, a DL task named DA is
> waking up. We enter the normal wakeup path, and call enqueue_task_dl()
> and from there enqueue_dl_entity(). enqueue_dl_entity() sets next_class
> to dl_sched_class. Later enqueue, when we call wakeup_preempt TA does
> not gets preempted because:
>
> void wakeup_preempt(struct rq *rq, struct task_struct *p, int flags)
> {
> struct task_struct *donor = rq->donor;
>
> if (p->sched_class == rq->next_class) {
> rq->next_class->wakeup_preempt(rq, p, flags);
>
Gah, you're right. This don't work right. Let me try again.