summaryrefslogtreecommitdiff
path: root/scripts/basic
diff options
context:
space:
mode:
authorHui Su <sh_def@163.com>2026-09-04 11:47:07 +0800
committerPeter Zijlstra <peterz@infradead.org>2026-09-10 10:22:52 +0200
commitc23810313bdf6b02f39a1f2a1464c4b18bd39e31 (patch)
tree5d35514c06c8a00ffe21050b07d9ce6efdaf559d /scripts/basic
parent51b0e68cfa0ac69e3c3ea9d6753af7e15dfaab22 (diff)
downloadlinux-stable-c23810313bdf6b02f39a1f2a1464c4b18bd39e31.tar.gz
linux-stable-c23810313bdf6b02f39a1f2a1464c4b18bd39e31.zip
sched: Account cgroup CPU time to the execution context
Proxy execution separates the scheduling context from the execution context. Commit aa4f74dfd42b ("sched: Fix runtime accounting w/ split exec & sched contexts") made per-task and thread-group runtime accounting follow the task that actually executes, while cgroup CPU usage is charged to the donor. When the donor and execution task belong to different cgroups, this makes a task's execution time count against a different cgroup from the one the task belongs to. Cgroup CPU usage should follow the execution context, matching the per-task, thread-group, and cgroup user/system accounting. Keep scheduling state associated with the donor, but charge cgroup CPU usage to rq->curr. A reproducer with the donor and execution task in separate cgroups showed the execution task accumulating runtime while cgroup CPU usage was charged to the donor's cgroup. With this change, the execution task's cgroup accumulates the CPU usage instead. The same behavior was verified with an RT donor and with legacy cpuacct accounting. Fixes: aa4f74dfd42b ("sched: Fix runtime accounting w/ split exec & sched contexts") Suggested-by: Tejun Heo <tj@kernel.org> Signed-off-by: Hui Su <sh_def@163.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Tejun Heo <tj@kernel.org> Acked-by: John Stultz <jstultz@google.com> Link: https://patch.msgid.link/20260904034707.268416-1-sh_def@163.com
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions