[PATCH 0/3] sched: Fix proxy-exec use of curr and donor
From: Jemmy Wong
Date: Thu Oct 08 2026 - 09:31:37 EST
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.
The NUMA and cache tick hooks move to rq->curr, and only when that
task is fair, matching account_mm_sched(). task_sched_runtime()
flushes when the sampled task is rq->curr, through the donor class's
update_curr(), because that reads the donor's exec_start and
update_se() then adds the delta to rq->curr.
The single-task CFS bandwidth check is pointed at the donor, matching
sched_fair_update_stop_tick(). Both return before the bandwidth test
unless one task is queued, so the tick decision does not change during
a proxy and the third patch has no Fixes: tag.
Without CONFIG_SCHED_PROXY_EXEC, curr and donor are a union and these
are the same task.
Jemmy Wong (3):
sched/fair: Drive NUMA and cache tick work from the execution context
sched/core: Flush pending runtime for the execution context
sched/core: Check CFS bandwidth against the donor for NOHZ
kernel/sched/core.c | 18 ++++++++++++------
kernel/sched/fair.c | 28 ++++++++++++++++++----------
2 files changed, 30 insertions(+), 16 deletions(-)
--
2.54.0 (Apple Git-157)