Re: [PATCH 0/3] sched: Fix proxy-exec use of curr and donor

From: Jemmy Wong

Date: Thu Oct 08 2026 - 23:42:07 EST



Hi Kayra,

Yes. My first patch and Hui's v5 2/4 and 3/4 move the NUMA and cache
ticks onto rq->curr when that task is fair. Hui's 1/4 is the right
shape: task_tick() runs the donor class and, when a proxy crosses
classes, the execution class as well. A fair lock holder whose donor
is RT or deadline still gets those hooks. My patch only changes
task_tick_fair(), so that case stays missing. I'll drop it.

The other two are not in that series.

task_sched_runtime() still flushes only when @p is the donor, through
@p->sched_class->update_curr(). update_se() adds the delta to rq->curr,
so a runtime read of the lock holder drops the open interval. The fix
flushes when @p is rq->curr, through the donor class's update_curr().

sched_can_stop_tick() still passes rq->curr to
cfs_task_bw_constrained(). sched_fair_update_stop_tick() already
passes the donor. The third patch makes those callers match. It does
not change the tick while a proxy is active, because both checks
return unless nr_running == 1.

Thanks,
Jemmy


> On Oct 8, 2026, at 11:33 PM, Kayra Cizmeci <kayracizmeci@xxxxxxxxx> wrote:
>
>> After the split between scheduling and execution context, update_se()
>> charges the open run interval to rq->curr. The tick and the runtime
>> sample still treated the donor as the task on CPU. Under proxy
>> execution the donor is blocked on a kernel mutex and the lock holder
>> is the task that runs.
>
> Please look at here: https://lore.kernel.org/lkml/20260913064722.1534766-1-sh_def@xxxxxxx/
>
> I think y'all are trying to fix the same thing, no? (Or atleast similar in most ways.)
>
> Adding Hui and John to CC.
>
> Thanks,
> Kayra