WSL2-Linux-Kernel/Documentation/cgroups
KAMEZAWA Hiroyuki cc926f7842 memcg: move charges to root cgroup if use_hierarchy=0
Presently, at removal of cgroup, ->pre_destroy() is called and moves
charges to the parent cgroup.  A major reason for returning -EBUSY from
->pre_destroy() is that the 'moving' hits the parent's resource
limitation.  It happens only when use_hierarchy=0.

Considering use_hierarchy=0, all cgroups should be flat.  So, no one
cannot justify moving charges to parent...parent and children are in flat
configuration, not hierarchical.

This patch modifes the code to move charges to the root cgroup at
rmdir/force_empty if use_hierarchy==0.  This will much simplify rmdir()
and reduce error in ->pre_destroy.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ying Han <yinghan@google.com>
Cc: Glauber Costa <glommer@parallels.com>
Reviewed-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-29 16:22:27 -07:00
..
00-INDEX trivial: fix where cgroup documentation is not correctly referred to 2009-03-30 15:22:02 +02:00
blkio-controller.txt Documentation: Fix multiple typo in Documentation 2012-03-07 16:08:24 +01:00
cgroup_event_listener.c tree-wide: fix comment/printk typos 2010-11-01 15:38:34 -04:00
cgroups.txt cgroup: remove cgroup_subsys argument from callbacks 2012-02-02 09:20:22 -08:00
cpuacct.txt Documentation: fix echo command in cgroups/cpuacct.txt 2011-07-23 10:58:08 -07:00
cpusets.txt documentation: remove references to cpu_*_map. 2012-03-29 15:38:31 +10:30
devices.txt Documentation: update cgroupfs mount point 2011-06-15 21:52:50 -07:00
freezer-subsystem.txt Documentation: Fix typo in freezer-subsystem.txt 2011-11-07 23:02:25 +01:00
memcg_test.txt tree-wide: fix comment/printk typos 2010-11-01 15:38:34 -04:00
memory.txt memcg: move charges to root cgroup if use_hierarchy=0 2012-05-29 16:22:27 -07:00
net_prio.txt net: add documentation for net_prio cgroups (v4) 2011-11-22 15:22:23 -05:00
resource_counter.txt rescounters: add res_counter_uncharge_until() 2012-05-29 16:22:27 -07:00