• Glauber Costa's avatar
    memcg: allow a memcg with kmem charges to be destructed · bea207c8
    Glauber Costa authored
    Because the ultimate goal of the kmem tracking in memcg is to track slab
    pages as well, we can't guarantee that we'll always be able to point a
    page to a particular process, and migrate the charges along with it -
    since in the common case, a page will contain data belonging to multiple
    processes.
    
    Because of that, when we destroy a memcg, we only make sure the
    destruction will succeed by discounting the kmem charges from the user
    charges when we try to empty the cgroup.
    Signed-off-by: default avatarGlauber Costa <glommer@parallels.com>
    Acked-by: default avatarKamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
    Reviewed-by: default avatarMichal Hocko <mhocko@suse.cz>
    Cc: Christoph Lameter <cl@linux.com>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Frederic Weisbecker <fweisbec@redhat.com>
    Cc: Greg Thelen <gthelen@google.com>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    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>
    Cc: Suleiman Souhlal <suleiman@google.com>
    Cc: Tejun Heo <tj@kernel.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    bea207c8
memcontrol.c 159 KB