Re: [RFC PATCH 1/2] New cgroup subsystem API (->initialize())

From: Li Zefan
Date: Thu Feb 26 2009 - 03:52:31 EST


> 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)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/