linux/Documentation/cgroups
Glauber Costa 50bdd430c2 res_counter: return amount of charges after res_counter_uncharge()
It is useful to know how many charges are still left after a call to
res_counter_uncharge.  While it is possible to issue a res_counter_read
after uncharge, this can be racy.

If we need, for instance, to take some action when the counters drop down
to 0, only one of the callers should see it.  This is the same semantics
as the atomic variables in the kernel.

Since the current return value is void, we don't need to worry about
anything breaking due to this change: nobody relied on that, and only
users appearing from now on will be checking this value.

Signed-off-by: Glauber Costa <glommer@parallels.com>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
Acked-by: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Suleiman Souhlal <suleiman@google.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Christoph Lameter <cl@linux.com>
Cc: Frederic Weisbecker <fweisbec@redhat.com>
Cc: Greg Thelen <gthelen@google.com>
Cc: JoonSoo Kim <js1304@gmail.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-12-18 15:02:12 -08:00
..
00-INDEX cgroup: update Documentation/cgroups/00-INDEX 2012-12-09 05:52:58 -08: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, cpuset: remove cgroup_subsys->post_clone() 2012-11-19 08:13:39 -08:00
cpuacct.txt Documentation: fix echo command in cgroups/cpuacct.txt 2011-07-23 10:58:08 -07:00
cpusets.txt cpuset: use N_MEMORY instead N_HIGH_MEMORY 2012-12-12 17:38:32 -08:00
devices.txt Documentation: update cgroupfs mount point 2011-06-15 21:52:50 -07:00
freezer-subsystem.txt cgroup_freezer: implement proper hierarchy support 2012-11-09 10:52:30 -08:00
hugetlb.txt hugetlb/cgroup: add HugeTLB controller documentation 2012-07-31 18:42:41 -07:00
memcg_test.txt tree-wide: fix comment/printk typos 2010-11-01 15:38:34 -04:00
memory.txt Documentation/cgroups/memory.txt: s/mem_cgroup_charge/mem_cgroup_change_common/ 2012-12-11 17:22:24 -08:00
net_prio.txt netprio_cgroup: allow nesting and inherit config on cgroup creation 2012-11-22 07:32:47 -08:00
resource_counter.txt res_counter: return amount of charges after res_counter_uncharge() 2012-12-18 15:02:12 -08:00