]> git.baikalelectronics.ru Git - kernel.git/commit
mm: memcontrol: take a css reference for each charged page
authorJohannes Weiner <hannes@cmpxchg.org>
Wed, 10 Dec 2014 23:42:42 +0000 (15:42 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 11 Dec 2014 01:41:05 +0000 (17:41 -0800)
commit589e82bfa4003055f55181c1fc68357a028d3963
tree8109a731e199928c2fd87d3633a56a3251d85245
parentb90a94364a9693fe3564070bc66efd3300605fd4
mm: memcontrol: take a css reference for each charged page

Charges currently pin the css indirectly by playing tricks during
css_offline(): user pages stall the offlining process until all of them
have been reparented, whereas kmemcg acquires a keep-alive reference if
outstanding kernel pages are detected at that point.

In preparation for removing all this complexity, make the pinning explicit
and acquire a css references for every charged page.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Vladimir Davydov <vdavydov@parallels.com>
Acked-by: Michal Hocko <mhocko@suse.cz>
Cc: David Rientjes <rientjes@google.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/cgroup.h
include/linux/percpu-refcount.h
mm/memcontrol.c