Skip to content

RFC CPU controller statistics - v5

Bharata B Rao lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 11 repliesIn review

Changes for v5 from the cover letter

- Updated to 2.6.29-rc6.
- Separated cgroup modifications into a different patch.
- Changed the prototype of the ->initialize() subsystem API from cgroup_subsys->initialize(int early) to cgroup_subsys->initialize(void) and calling it only from cgroup_init() and not from cgroup_init_early().
- Updated documentation for new API.
- Added guest time metric as another cpu controller statistic.
- Free percpu statistics counters when the cgroup is brought down.
- Account irq and softirq time also as system time for cgroup accounting.
- Separate out stats collection code under CONFIG_CGROUP_SCHED to a helper funtion to reduce ifdefs.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2New cgroup subsystem API (->initialize())Documentation/cgroups/cgroups.txt include/linux/cgroup.h kernel/cgroup.c+9 -07 replies
2/2Add per-cgroup CPU controller statisticskernel/sched.c+106 -04 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [RFC PATCH 0/2] CPU controller statistics - v5

Hi,

Last year, Balaji posted a patch to collect CPU controller statistics. After a few initial versions, I couldn't see any activity. Here I am posting the next version of the patch for review.

Changes for v5:

- Updated to 2.6.29-rc6.
- Separated cgroup modifications into a different patch.
- Changed the prototype of the ->initialize() subsystem API from cgroup_subsys->initialize(int early) to cgroup_subsys->initialize(void) and calling it only from cgroup_init() and not from cgroup_init_early().
- Updated documentation for new API.
- Added guest time metric as another cpu controller statistic.
- Free percpu statistics counters when the cgroup is brought down.
- Account irq and softirq time also as system time for cgroup accounting.
- Separate out stats collection code under CONFIG_CGROUP_SCHED to a helper funtion to reduce ifdefs.

v4:
- http://lkml.org/lkml/2008/5/11/163

I have tried to address most of the comments given for the 4th version of the patch. A few questions still remain:

- percpu counters are used for stats collection. Since percpu counters aren't usable during cgroup_init_early(), we have to allocate percpu stats counter for init_task_group separately later during cgroup_init(). Because of this, in the stats collection code, we end up having a 'is stats counter allocated?' check
- This patch collects per cgroup cpu controller stats. Does it make sense to account stime and utime hierarchially ? If so, we would probably be duplicating what cpuacct controller already does.
- Is steal time a useful per-cgroup metric ? Perhaps in container based virtualized environments ?

Regards,
Bharata.