cgroup, sched: Move basic cpu stats from cgroup.stat to cpu.stat
authorTejun Heo <tj@kernel.org>
Mon, 23 Oct 2017 23:18:27 +0000 (16:18 -0700)
committerTejun Heo <tj@kernel.org>
Thu, 26 Oct 2017 17:56:33 +0000 (10:56 -0700)
commitd41bf8c9deaed1a90b18d3ffc5639d4c19f0259a
tree38573de8fb3d037a30430bd16af6806031c2036c
parent0d5936344f30aba0f6ddb92b030cb6a05168efe6
cgroup, sched: Move basic cpu stats from cgroup.stat to cpu.stat

The basic cpu stat is currently shown with "cpu." prefix in
cgroup.stat, and the same information is duplicated in cpu.stat when
cpu controller is enabled.  This is ugly and not very scalable as we
want to expand the coverage of stat information which is always
available.

This patch makes cgroup core always create "cpu.stat" file and show
the basic cpu stat there and calls the cpu controller to show the
extra stats when enabled.  This ensures that the same information
isn't presented in multiple places and makes future expansion of basic
stats easier.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Documentation/cgroup-v2.txt
include/linux/cgroup-defs.h
include/linux/cgroup.h
kernel/cgroup/cgroup-internal.h
kernel/cgroup/cgroup.c
kernel/cgroup/stat.c
kernel/sched/core.c