aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorGlauber Costa <glommer@gmail.com>2013-07-08 19:00:01 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-09 13:33:21 -0400
commit425c598d583883c33c75780225ba8e0794b43bd9 (patch)
treeea53a3ac5ab9964846605b336304f03ad52633df /mm
parent6d42c232bd1e77288b2660153299b7d12a5c8e15 (diff)
memcg: do not account memory used for cache creation
The memory we used to hold the memcg arrays is currently accounted to the current memcg. But that creates a problem, because that memory can only be freed after the last user is gone. Our only way to know which is the last user, is to hook up to freeing time, but the fact that we still have some in flight kmallocs will prevent freeing to happen. I believe therefore to be just easier to account this memory as global overhead. Signed-off-by: Glauber Costa <glommer@openvz.org> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Michal Hocko <mhocko@suse.cz> Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/memcontrol.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 06a595fd6400..64f726599ff0 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -5232,7 +5232,9 @@ static int memcg_propagate_kmem(struct mem_cgroup *memcg)
5232 static_key_slow_inc(&memcg_kmem_enabled_key); 5232 static_key_slow_inc(&memcg_kmem_enabled_key);
5233 5233
5234 mutex_lock(&set_limit_mutex); 5234 mutex_lock(&set_limit_mutex);
5235 memcg_stop_kmem_account();
5235 ret = memcg_update_cache_sizes(memcg); 5236 ret = memcg_update_cache_sizes(memcg);
5237 memcg_resume_kmem_account();
5236 mutex_unlock(&set_limit_mutex); 5238 mutex_unlock(&set_limit_mutex);
5237out: 5239out:
5238 return ret; 5240 return ret;