Re: [PATCH v25 1/9] sched: Make class_schedulers avoid pushing current, and get rid of proxy_tag_curr()

From: K Prateek Nayak

Date: Wed Mar 18 2026 - 14:06:52 EST


On 3/18/2026 6:25 PM, Peter Zijlstra wrote:
> On Tue, Mar 17, 2026 at 11:11:20AM +0530, K Prateek Nayak wrote:
>
>> Also, deadline, RT, fair, and idle don't really care about the "next"
>> argument of put_prev_task() and the only one that does care is
>> put_prev_task_scx() to call switch_class() callback so putting it as
>> either NULL or "rq->donor" should be safe.
>
> https://lkml.kernel.org/r/20260317104343.225156112@xxxxxxxxxxxxx
>
> Makes fair care about the @next argument to put_prev_task_fair().

Ack! In this case, using "rq->donor" is better since we skip traversing
the entire cgroup hierarchy and bail-out at the common parent which is
the immediate next entity.

--
Thanks and Regards,
Prateek