Re: [PATCH v2 10/10] sched/eevdf: Move to a single runqueue
From: K Prateek Nayak
Date: Wed May 13 2026 - 22:53:39 EST
Hello John,
On 5/14/2026 7:06 AM, John Stultz wrote:
> So looking at the callstack when I see the failure:
> proxy_find_task()
> proxy_force_return()
> proxy_resched_idle() <- sets rq->donor to idle
> attach_one_task()
> wakeup_preempt()
> wakeup_preempt_fair()
After this point, I would have expected we called idle class's
wakeup_preempt() since that is the donor context ...
> update_protect_slice() <- called with the donor's se
> calc_delta_fair()
> __calc_delta() <- div by zero
>
> Basically we end up in wakeup_preempt_fair() with rq->donor ==
> rq->idle because we earlier called proxy_resched_idle().
Could you check if following makes things better:
(Only build tested)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 3ae5f19c1b7e..77f4ebe8f5c7 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6653,6 +6653,7 @@ static inline void proxy_set_task_cpu(struct task_struct *p, int cpu)
static inline struct task_struct *proxy_resched_idle(struct rq *rq)
{
put_prev_set_next_task(rq, rq->donor, rq->idle);
+ rq->next_class = &idle_sched_class;
rq_set_donor(rq, rq->idle);
set_tsk_need_resched(rq->idle);
return rq->idle;
---
I'm just getting started for the day so it'll be a while before I
actually get to test this on top of flat cgroup bits which I haven't yet
run with SCHED_PROXY_EXEC enabled.
--
Thanks and Regards,
Prateek