Messages in this thread | | | Date | Thu, 26 Feb 2009 16:52:36 +0800 | From | Li Zefan <> | Subject | Re: [RFC PATCH 1/2] New cgroup subsystem API (->initialize()) |
| |
> I believe hierarchical accounting is natural. Since the CPU controller > divides its bandwidth as per hierarchy, it makes sense for the > accounting to also be hierarchical. I guess this is a reasonable > compromise. But how do you still check if the group you are accounting > for is the root group or not? (Unless I am missing something obvious) >
As easy as: if (cgrp->parent == NULL) or if (cgrp == cgrp->top_cgroup)
| |