]> git.baikalelectronics.ru Git - kernel.git/commit
sched/core: add forced idle accounting for cgroups
authorJosh Don <joshdon@google.com>
Wed, 29 Jun 2022 21:14:26 +0000 (14:14 -0700)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 4 Jul 2022 07:23:07 +0000 (09:23 +0200)
commitfaa15b1608344c58889907ee7b1326d73c92a1d6
tree5f7d7572e4750a90f8c2a97deb74f159d65373b7
parent7afc4b6922415d34347bdd39ef8e074932b471e6
sched/core: add forced idle accounting for cgroups

e51fca93496 previously added per-task forced idle accounting. This patch
extends this to also include cgroups.

rstat is used for cgroup accounting, except for the root, which uses
kcpustat in order to bypass the need for doing an rstat flush when
reading root stats.

Only cgroup v2 is supported. Similar to the task accounting, the cgroup
accounting requires that schedstats is enabled.

Signed-off-by: Josh Don <joshdon@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Tejun Heo <tj@kernel.org>
Link: https://lkml.kernel.org/r/20220629211426.3329954-1-joshdon@google.com
include/linux/cgroup-defs.h
include/linux/kernel_stat.h
kernel/cgroup/rstat.c
kernel/sched/core_sched.c
kernel/sched/cputime.c