mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
sched/core: add forced idle accounting for cgroups
4feee7d126
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
This commit is contained in:
parent
b812fc9768
commit
1fcf54deb7
5 changed files with 69 additions and 7 deletions
|
@ -28,6 +28,9 @@ enum cpu_usage_stat {
|
|||
CPUTIME_STEAL,
|
||||
CPUTIME_GUEST,
|
||||
CPUTIME_GUEST_NICE,
|
||||
#ifdef CONFIG_SCHED_CORE
|
||||
CPUTIME_FORCEIDLE,
|
||||
#endif
|
||||
NR_STATS,
|
||||
};
|
||||
|
||||
|
@ -115,4 +118,8 @@ extern void account_process_tick(struct task_struct *, int user);
|
|||
|
||||
extern void account_idle_ticks(unsigned long ticks);
|
||||
|
||||
#ifdef CONFIG_SCHED_CORE
|
||||
extern void __account_forceidle_time(struct task_struct *tsk, u64 delta);
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_KERNEL_STAT_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue