Re: [PATCH v2 10/10] sched/eevdf: Move to a single runqueue

From: Peter Zijlstra

Date: Wed May 13 2026 - 03:32:53 EST


On Wed, May 13, 2026 at 12:31:05PM +0530, K Prateek Nayak wrote:
> Hello Peter,
>
> On 5/12/2026 4:39 PM, Peter Zijlstra wrote:
> >> @@ -13819,6 +13831,12 @@ static void set_next_task_fair(struct rq *rq, struct task_struct *p, bool first)
> >> if (on_rq)
> >> weight = __calc_prop_weight(cfs_rq, se, weight);
> >> }
> >> + /*
> >> + * Add throttle work if the bandwidth allocation above failed
> >> + * to grab any runtime and throttled the task's hierarchy.
> >> + */
> >> + if (throttled_hierarchy(task_cfs_rq(p)))
> >> + task_throttle_setup_work(p);
> >
> > We already call into account_cfs_rq_runtime(); which basically does all
> > we need.
> >
> > I think the distinction between account_cfs_rq_runtime() and
> > check_cfs_rq_runtime() no longer makes sense. We can throttle a cfs_rq
> > at any point now, since we no longer remove the cfs_rq, but rather we
> > make the tasks suspend themselves until the cfs_rq naturally dequeues
> > for being empty.
> >
> > Something like so perhaps?
>
> That makes sense! The task should naturally execute the task work when
> exiting out of the kernel / IRQ handler into the userspace so we should
> be good.
>
> I'll rebase the below diff on tip, test it a bit, add a commit log, and
> send it your way if you don't mind or would you like to keep it with the
> flat_cg bits?

Nah, this seems like something that can be done independent. And thus is
should be. That flat patch is big enough as is.