linux/Documentation/cgroups
Vivek Goyal bdc85df7a8 blk-cgroup: Allow creation of hierarchical cgroups
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 user wants to enforce hierarhical
  control then it can be set to 1. This way there should not be any
  ABI problems down the line.

o The only not so pretty part is introduction of extra file "use_hierarchy"
  down the line. Kame-san had mentioned that hierarhical accounting is
  expensive in memory controller hence they keep it off by default. I
  suspect same will be the case for IO controller also as for each IO
  completion we shall have to account IO through hierarchy up to the root.
  if yes, then it probably is not a very bad idea to introduce this extra
  file so that it will be used only when somebody needs it and some people
  might enable hierarchy only in part of the hierarchy.

o This is how basically memory controller also uses "use_hierarhcy" and
  they also allowed creation of hierarchies when actual backend support
  was not available.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Reviewed-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
Reviewed-by: Ciju Rajan K <ciju@linux.vnet.ibm.com>
Tested-by: Ciju Rajan K <ciju@linux.vnet.ibm.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2010-11-15 19:37:36 +01:00
..
00-INDEX trivial: fix where cgroup documentation is not correctly referred to 2009-03-30 15:22:02 +02:00
blkio-controller.txt blk-cgroup: Allow creation of hierarchical cgroups 2010-11-15 19:37:36 +01:00
cgroup_event_listener.c cgroups: add simple listener of cgroup events to documentation 2010-03-12 15:52:37 -08:00
cgroups.txt cgroup: add clone_children control file 2010-10-27 18:03:09 -07:00
cpuacct.txt cpuacct: add per-cgroup utime/stime statistics 2009-04-01 16:49:38 +02:00
cpusets.txt Documentation: update broken web addresses. 2010-08-04 15:21:40 +02:00
devices.txt trivial: cgroups: documentation typo and spelling corrections 2009-03-30 15:21:58 +02:00
freezer-subsystem.txt
memcg_test.txt Documentation/: it's -> its where appropriate 2010-04-23 02:09:52 +02:00
memory.txt memcg: update documentation 2010-05-27 09:12:43 -07:00
resource_counter.txt res_counter: update documentation 2009-04-13 15:04:30 -07:00