mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] sched/numa: Use execution context for NUMA task tick
@ 2026-09-02 16:33 Hui Su
  2026-09-02 16:33 ` [PATCH 2/2] sched/cache: Use execution context for cache " Hui Su
  0 siblings, 1 reply; 4+ messages in thread
From: Hui Su @ 2026-09-02 16:33 UTC (permalink / raw)
  To: peterz, mingo, juri.lelli, vincent.guittot
  Cc: dietmar.eggemann, rostedt, bsegall, mgorman, vschneid,
	kprateek.nayak, jstultz, metin.kaya, connoro, tim.c.chen,
	yu.c.chen, linux-kernel, Hui Su

With proxy execution, fair_sched_class::task_tick() receives the
scheduling context in rq->donor, while rq->curr identifies the task
that is actually executing.

NUMA tick handling is tied to the execution context. In particular,
task_tick_numa() uses the task's sum_exec_runtime to drive periodic
scans and queues numa_work against that task and its mm.

Proxy execution runtime accounting deliberately charges sum_exec_runtime
to rq->curr rather than rq->donor. Passing the donor to task_tick_numa()
therefore drives NUMA scanning from a task whose runtime is not being
advanced by proxy execution, while the executing task's NUMA state is
not driven by the tick.

Use rq->curr when invoking task_tick_numa() so the runtime, mm and
task_work all belong to the execution context.

Fixes: af0c8b2bf67b ("sched: Split scheduler and execution contexts")
Signed-off-by: Hui Su <sh_def@163.com>

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 8dff37059faf..09ddb3802c28 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -15043,7 +15043,7 @@ static void task_tick_fair(struct rq *rq, struct task_struct *curr, int queued)
 		return;
 
 	if (static_branch_unlikely(&sched_numa_balancing))
-		task_tick_numa(rq, curr);
+		task_tick_numa(rq, rq->curr);
 
 	task_tick_cache(rq, curr);
 
-- 
2.54.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-09-03  2:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-02 16:33 [PATCH 1/2] sched/numa: Use execution context for NUMA task tick Hui Su
2026-09-02 16:33 ` [PATCH 2/2] sched/cache: Use execution context for cache " Hui Su
2026-09-02 20:12   ` Tim Chen
2026-09-03  2:53     ` Hui Su

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®