• Vivek Goyal's avatar
    blk-cgroup: Allow creation of hierarchical cgroups · bdc85df7
    Vivek Goyal authored
    o Allow hierarchical cgroup creation for blkio controller
    
    o Currently we disallow it as both the io controller policies (throttling
      as well as proportion bandwidth) do not support hierarhical accounting
      and control. But the flip side is that blkio controller can not be used with
      libvirt as libvirt creates a cgroup hierarchy deeper than 1 level.
    
      <top-level-cgroup-dir>/<controller>/libvirt/qemu/<virtual-machine-groups>
    
    o So this patch will allow creation of cgroup hierarhcy but at the backend
      everything will be treated as flat. So if somebody created a an hierarchy
      like as follows.
    
    			root
    			/  \
    		     test1 test2
    			|
    		     test3
    
      CFQ and throttling will practically treat all groups at same level.
    
    				pivot
    			     /  |   \  \
    			root  test1 test2  test3
    
    o Once we have actual support for hierarchical accounting and control
      then we can introduce another cgroup tunable file "blkio.use_hierarchy"
      which will be 0 by default but if us...
    bdc85df7
blk-cgroup.c 38.4 KB