]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
cgroup: Distinguish base resource stat implementation from rstat
authorTejun Heo <tj@kernel.org>
Thu, 26 Apr 2018 21:29:04 +0000 (14:29 -0700)
committerTejun Heo <tj@kernel.org>
Thu, 26 Apr 2018 21:29:04 +0000 (14:29 -0700)
commitd4ff749b5e0f1e2d4d69a3e4ea81cdeaeb4904d2
tree99a922407a9aa00dbd7441e26969e18120a027e5
parentc58632b3631cb222da41d9dc0dd39e106c1eafd0
cgroup: Distinguish base resource stat implementation from rstat

Base resource stat accounts universial (not specific to any
controller) resource consumptions on top of rstat.  Currently, its
implementation is intermixed with rstat implementation making the code
confusing to follow.

This patch clarifies the distintion by doing the followings.

* Encapsulate base resource stat counters, currently only cputime, in
  struct cgroup_base_stat.

* Move prev_cputime into struct cgroup and initialize it with cgroup.

* Rename the related functions so that they start with cgroup_base_stat.

* Prefix the related variables and field names with b.

This patch doesn't make any functional changes.

Signed-off-by: Tejun Heo <tj@kernel.org>
include/linux/cgroup-defs.h
kernel/cgroup/cgroup-internal.h
kernel/cgroup/cgroup.c
kernel/cgroup/rstat.c