Skip to content

per-cgroup /proc/stat statistics

Glauber Costa lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 34 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9Change cpustat fields to an array.fs/proc/stat.c fs/proc/uptime.c include/linux/kernel_stat.h +1 more+87 -699 replies
2/9Move /proc/stat logic inside sched.cfs/proc/stat.c include/linux/sched.h kernel/sched.c+141 -1160 replies
3/9Display /proc/stat information per cgroupinclude/linux/kernel_stat.h kernel/sched.c+73 -209 replies
4/9Make total_forks per-cgroupinclude/linux/sched.h kernel/fork.c kernel/sched.c+38 -713 replies
5/9per-cgroup boot timekernel/sched.c+5 -00 replies
6/9Report steal time for cgroupkernel/sched.c+28 -00 replies
7/9provide a version of cpuacct statistics inside cpu cgroupkernel/sched.c+37 -50 replies
8/9provide a version of cpuusage statistics inside cpu cgroupkernel/sched.c kernel/sched_fair.c kernel/sched_rt.c+155 -690 replies
9/9Change CPUACCT to default ninit/Kconfig+1 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFD 0/9] per-cgroup /proc/stat statistics

Hi,

Since I've sent already a RFC about it, I am sending now a RFD. If you eager for meaning, this can then be a "Request for Doctors", since Peter is likely to have a heart attack now.

So here's the deal:

* My main goal here was to demonstrate that we can avoid double accounting in a lot of places. So what I did was getting rid of the original and first kstat mechanism, and use only cgroups accounting for that. Since the parent is always updated, the original stats are the one for the root cgroup.
* I believe that all those cpu cgroups are confusing and should be unified. Not that we can simply get rid of it, but my goal here is to provide all the information they do, in cpu cgroup. If the set of tasks needed for accounting is not independent of the ones in cpu cgroup, we can avoid double accounting for that. I default cpuacct to n, but leave it to people that wants to use it alone.
* Well, I'm also doing what I was doing originally: Providing a per-cgroup version of the /proc/stat file.

Glauber Costa (9):
Change cpustat fields to an array.
Move /proc/stat logic inside sched.c
Display /proc/stat information per cgroup
Make total_forks per-cgroup
per-cgroup boot time
Report steal time for cgroup
provide a version of cpuacct statistics inside cpu cgroup provide a version of cpuusage statistics inside cpu cgroup Change CPUACCT to default n

 fs/proc/stat.c              |  117 +---------
 fs/proc/uptime.c            |    2 +-
 include/linux/kernel_stat.h |   48 +++--
 include/linux/sched.h       |    5 +
 init/Kconfig                |    1 +
 kernel/fork.c               |    9 +-
 kernel/sched.c              |  595 +++++++++++++++++++++++++++++++++++--------
 kernel/sched_fair.c         |    2 +-
 kernel/sched_rt.c           |    2 +-
 9 files changed, 530 insertions(+), 251 deletions(-)
Signature · 1 line
1.7.6