memcg: debugging facility to access dangling memcgs.

If memcg is tracking anything other than plain user memory (swap, tcp
buf mem, or slab memory), it is possible that a reference will be held
by the group after it is dead.

This patch provides a debugging facility in the root memcg, so we can
inspect which memcgs still have pending objects, and what is the cause
of this state.

Signed-off-by: Glauber Costa <>
Cc: Michal Hocko <>
Cc: Kamezawa Hiroyuki <>
Cc: Johannes Weiner <>
1 file changed