···89899090 Limits for writes can be put using blkio.write_bps_device file.91919292+Hierarchical Cgroups9393+====================9494+- Currently none of the IO control policy supports hierarhical groups. But9595+ cgroup interface does allow creation of hierarhical cgroups and internally9696+ IO policies treat them as flat hierarchy.9797+9898+ So this patch will allow creation of cgroup hierarhcy but at the backend9999+ everything will be treated as flat. So if somebody created a hierarchy like100100+ as follows.101101+102102+ root103103+ / \104104+ test1 test2105105+ |106106+ test3107107+108108+ CFQ and throttling will practically treat all groups at same level.109109+110110+ pivot111111+ / | \ \112112+ root test1 test2 test3113113+114114+ Down the line we can implement hierarchical accounting/control support115115+ and also introduce a new cgroup file "use_hierarchy" which will control116116+ whether cgroup hierarchy is viewed as flat or hierarchical by the policy..117117+ This is how memory controller also has implemented the things.118118+92119Various user visible config options93120===================================94121CONFIG_BLK_CGROUP
-4
block/blk-cgroup.c
···14521452 goto done;14531453 }1454145414551455- /* Currently we do not support hierarchy deeper than two level (0,1) */14561456- if (parent != cgroup->top_cgroup)14571457- return ERR_PTR(-EPERM);14581458-14591455 blkcg = kzalloc(sizeof(*blkcg), GFP_KERNEL);14601456 if (!blkcg)14611457 return ERR_PTR(-ENOMEM);