cgroup: document how cgroup IDs are assigned
[cascardo/linux.git] / include / linux / cgroup.h
index cca570e..4dfcd0e 100644 (file)
@@ -161,7 +161,13 @@ struct cgroup_name {
 struct cgroup {
        unsigned long flags;            /* "unsigned long" so bitops work */
 
-       int id;                         /* idr allocated in-hierarchy ID */
+       /*
+        * idr allocated in-hierarchy ID.
+        *
+        * The ID of the root cgroup is always 0, and a new cgroup
+        * will be assigned with a smallest available ID.
+        */
+       int id;
 
        /*
         * We link our 'sibling' struct into our parent's 'children'.