aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/cgroups/blkio-controller.txt27
-rw-r--r--block/blk-cgroup.c4
2 files changed, 27 insertions, 4 deletions
diff --git a/Documentation/cgroups/blkio-controller.txt b/Documentation/cgroups/blkio-controller.txt
index d6da611f8f63..4ed7b5ceeed2 100644
--- a/Documentation/cgroups/blkio-controller.txt
+++ b/Documentation/cgroups/blkio-controller.txt
@@ -89,6 +89,33 @@ Throttling/Upper Limit policy
89 89
90 Limits for writes can be put using blkio.write_bps_device file. 90 Limits for writes can be put using blkio.write_bps_device file.
91 91
92Hierarchical Cgroups
93====================
94- Currently none of the IO control policy supports hierarhical groups. But
95 cgroup interface does allow creation of hierarhical cgroups and internally
96 IO policies treat them as flat hierarchy.
97
98 So this patch will allow creation of cgroup hierarhcy but at the backend
99 everything will be treated as flat. So if somebody created a hierarchy like
100 as follows.
101
102 root
103 / \
104 test1 test2
105 |
106 test3
107
108 CFQ and throttling will practically treat all groups at same level.
109
110 pivot
111 / | \ \
112 root test1 test2 test3
113
114 Down the line we can implement hierarchical accounting/control support
115 and also introduce a new cgroup file "use_hierarchy" which will control
116 whether cgroup hierarchy is viewed as flat or hierarchical by the policy..
117 This is how memory controller also has implemented the things.
118
92Various user visible config options 119Various user visible config options
93=================================== 120===================================
94CONFIG_BLK_CGROUP 121CONFIG_BLK_CGROUP
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index b1febd0f6d2a..455768a3eb9e 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -1452,10 +1452,6 @@ blkiocg_create(struct cgroup_subsys *subsys, struct cgroup *cgroup)
1452 goto done; 1452 goto done;
1453 } 1453 }
1454 1454
1455 /* Currently we do not support hierarchy deeper than two level (0,1) */
1456 if (parent != cgroup->top_cgroup)
1457 return ERR_PTR(-EPERM);
1458
1459 blkcg = kzalloc(sizeof(*blkcg), GFP_KERNEL); 1455 blkcg = kzalloc(sizeof(*blkcg), GFP_KERNEL);
1460 if (!blkcg) 1456 if (!blkcg)
1461 return ERR_PTR(-ENOMEM); 1457 return ERR_PTR(-ENOMEM);