diff options
| author | Zhan Xusheng <zhanxusheng1024@gmail.com> | 2026-09-18 21:29:15 +0800 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2026-09-24 10:32:50 +0200 |
| commit | a0bb6fac53fa7cf1cadb487b43d4c9276a6b82e3 (patch) | |
| tree | 0b9f06060c2ba3e753b6e0d16b4734b0140dbe14 /tools/perf/scripts/python/bin/stackcollapse-record | |
| parent | 3cb0243767fd033bdce95f4f1b5882172a2f8119 (diff) | |
| download | linux-a0bb6fac53fa7cf1cadb487b43d4c9276a6b82e3.tar.gz linux-a0bb6fac53fa7cf1cadb487b43d4c9276a6b82e3.zip | |
sched/core: Account PSI IRQ time to the execution context, not the scheduling context
psi_account_irqtime() has two callers which share rq->psi_irq_time, and
they disagree about the context: __schedule() passes the outgoing rq->curr,
sched_tick() passes rq->donor. Under proxy execution the donor is blocked
on a mutex while rq->curr burns the CPU.
The tick charges PSI_IRQ_FULL to the donor's cgroup and advances the
timestamp, so the call from __schedule() then finds delta <= 0 and charges
nothing. The delta is not counted twice, it lands on the wrong cgroup.
Pass rq->curr, which is what the call read before commit af0c8b2bf67b
("sched: Split scheduler and execution contexts") renamed 'curr' to
'donor' across sched_tick(). Without CONFIG_SCHED_PROXY_EXEC the two rq
members are a union, so this only changes anything where that option is set,
and it depends on EXPERT.
Fixes: af0c8b2bf67b ("sched: Split scheduler and execution contexts")
Signed-off-by: Zhan Xusheng <zhanxusheng@xiaomi.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://patch.msgid.link/20260918132915.1236312-1-zhanxusheng@xiaomi.com
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions
