Yes, that needs re-work. Peter Zijlstra had detailed review comments for the patch
> - indenting is busted in account_user_time() and account_system_time()
>
> - The use of for_each_possible_cpu() can be grossly inefficient. It
> would be preferred to use for_each_possible_cpu() and add a cpu-hotplug
> notifier.
>
> - The proposed newly-added userspace interfaces are undocumented
>

Yes, we need more documentation
> - The changelogs don't explain why we might want this feature in Linux.
>

We need more accurate utime/stime per cgroup. Summing them in user space is
insufficient, since tasks can move across groups and what we have is accumulated
time per task.
> - Generally: there are a heck of a lot of different ways of accounting
> for things in core kernel and it's really sad to see yet another one
> being added.
>

We thought of summing up stuff in user space, we've look harder. The plan is to
finally send all the data using cgroupstats.
>
> Actually, [patch 2/2] adds new kerenl->user interfaces and doesn't document
> them. But afaict the existing memcgroup stats are secret too.
>

The statistics was added as a part of git commit
d52aa412d43827033a8e2ce4415ef6e8f8d53635. I'll go ahead and try to document
them. These patches piggy back on the statistics patches and add pagein/pageout
counts, which is a useful statistic for the memory controller.

Re: [RFC][-mm] [2/2] Simple stats for memory resource controller

On Mon, 28 Apr 2008 23:33:05 +0530
Balbir Singh wrote:
> The statistics was added as a part of git commit
> d52aa412d43827033a8e2ce4415ef6e8f8d53635. I'll go ahead and try to document
> them. These patches piggy back on the statistics patches and add pagein/pageout
> counts, which is a useful statistic for the memory controller.
>
I'm sorry for lack of documentation.
BTW, when you adds documentation on this pagein/pageout, please make it clear

1. pagein means a new page is newly acconted to this cgrop, doesn't means
a page is read from disk.
2. pageout means a page is dropped from this cgroup, doesn't means a page
is written into disk.

So, pagein/pageout is a bit ambiguous. I'm happy if you find better names.