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>
このコミットが含まれているのは:
Tejun Heo
2018-04-26 14:29:04 -07:00
コミット d4ff749b5e
4個のファイルの変更52行の追加50行の削除

ファイルの表示

@@ -206,7 +206,7 @@ int cgroup_task_count(const struct cgroup *cgrp);
void cgroup_rstat_flush(struct cgroup *cgrp);
int cgroup_rstat_init(struct cgroup *cgrp);
void cgroup_rstat_exit(struct cgroup *cgrp);
void cgroup_stat_show_cputime(struct seq_file *seq);
void cgroup_base_stat_cputime_show(struct seq_file *seq);
void cgroup_rstat_boot(void);
/*