]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/res_counter.h
cgroups: consolidate cgroup documents
[linux-2.6-omap-h63xx.git] / include / linux / res_counter.h
index 271c1c2c9f6f741016f0917c360469ae5ee872a5..4c5bcf6ca7e8b0457bf1b25f2922221fb92985ac 100644 (file)
@@ -9,7 +9,7 @@
  *
  * Author: Pavel Emelianov <xemul@openvz.org>
  *
- * See Documentation/controllers/resource_counter.txt for more
+ * See Documentation/cgroups/resource_counter.txt for more
  * info about what this counter is.
  */
 
@@ -43,6 +43,10 @@ struct res_counter {
         * the routines below consider this to be IRQ-safe
         */
        spinlock_t lock;
+       /*
+        * Parent counter, used for hierarchial resource accounting
+        */
+       struct res_counter *parent;
 };
 
 /**
@@ -87,7 +91,7 @@ enum {
  * helpers for accounting
  */
 
-void res_counter_init(struct res_counter *counter);
+void res_counter_init(struct res_counter *counter, struct res_counter *parent);
 
 /*
  * charge - try to consume more resource.
@@ -103,7 +107,7 @@ void res_counter_init(struct res_counter *counter);
 int __must_check res_counter_charge_locked(struct res_counter *counter,
                unsigned long val);
 int __must_check res_counter_charge(struct res_counter *counter,
-               unsigned long val);
+               unsigned long val, struct res_counter **limit_fail_at);
 
 /*
  * uncharge - tell that some portion of the resource is released