linux/Documentation/cgroups
Frederic Weisbecker 2bb2ba9d51 rescounters: add res_counter_uncharge_until()
When killing a res_counter which is a child of other counter, we need to
do

	res_counter_uncharge(child, xxx)
	res_counter_charge(parent, xxx)

This is not atomic and wastes CPU.  This patch adds
res_counter_uncharge_until().  This function's uncharge propagates to
ancestors until specified res_counter.

	res_counter_uncharge_until(child, parent, xxx)

Now the operation is atomic and efficient.

Signed-off-by: Frederic Weisbecker <fweisbec@redhat.com>
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: 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: fix/change behavior of shared anon at moving task 2012-05-29 16:22:24 -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