]> git.baikalelectronics.ru Git - kernel.git/commit
cgroup: make sure memcg margin is 0 when over limit
authorGlauber Costa <glommer@parallels.com>
Fri, 20 Jan 2012 04:57:15 +0000 (04:57 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 Jan 2012 20:08:45 +0000 (15:08 -0500)
commit56da09f37d28004c466d6a975ed50b1a240822bb
tree5c526f7ced428e65db025ba7af29ca114031c302
parentc9ed9dbd2e6d456e430eb3d14be99cbc52eaf04a
cgroup: make sure memcg margin is 0 when over limit

For the memcg sock code, we'll need to register allocations
that are temporarily over limit. Let's make sure that margin
is 0 in this case.

I am keeping this as a separate patch, so that if any weirdness
interaction appears in the future, we can now exactly what caused
it.

Suggested by Johannes Weiner

Signed-off-by: Glauber Costa <glommer@parallels.com>
CC: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
CC: Johannes Weiner <hannes@cmpxchg.org>
CC: Michal Hocko <mhocko@suse.cz>
CC: Tejun Heo <tj@kernel.org>
CC: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/res_counter.h