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

K Prateek Nayak
2026-03-18T18:02:39Z

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@infradead.org
>
> 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