[PATCH v2 0/2] sched: Fix execution-context tick handling under proxy execution

From: Hui Su

Date: Thu Sep 03 2026 - 00:14:28 EST


Proxy execution separates the scheduling context in rq->donor from the
execution context in rq->curr. sched_tick() dispatches the scheduling-class
task tick through rq->donor, while NUMA and cache task ticks consume state
belonging to the task actually executing.

Move both execution-context ticks to the scheduler core and run them when
rq->curr is a fair task. Keep the corresponding handling in
sched_tick_remote() for full-dynticks CPUs.

Changes in v2:
- Move NUMA and cache execution-context tick handling from task_tick_fair()
to sched_tick().
- Invoke the hooks when rq->curr is a fair task, allowing them to run when
the donor belongs to another scheduling class.
- Add the corresponding calls to sched_tick_remote() to preserve
full-dynticks behavior.

Tested with a QEMU topology providing two NUMA nodes and two LLCs. With
an RT donor and a fair mutex owner, task_tick_numa() and
task_tick_cache() were observed with p == rq->curr while rq->donor was
a different RT task. The proxy test completed three episodes without
warnings or errors.

Also runtime-tested a QEMU guest with nohz_full=1. sched_tick_remote()
ran approximately once per second on the full-dynticks CPU and entered
the fair execution-context tick path. The relevant configurations,
including NUMA/cache feature combinations and CONFIG_NO_HZ_FULL=y, were
build-tested; the affected objects also passed a W=1 build.

Link: https://lore.kernel.org/r/20260902163336.1552840-1-sh_def@xxxxxxx

Hui Su (2):
sched/numa: Drive NUMA task tick from execution context
sched/cache: Drive cache task tick from execution context

kernel/sched/core.c | 13 +++++++++++++
kernel/sched/fair.c | 13 ++++---------
kernel/sched/sched.h | 2 ++
3 files changed, 19 insertions(+), 9 deletions(-)

--
2.54.0