From: Andrew Morton <akpm@linux-foundation.org>
To: Glauber Costa <glommer@parallels.com>
Cc: cgroups@vger.kernel.org, linux-mm@kvack.org,
Tejun Heo <tj@kernel.org>, Michal Hocko <mhocko@suse.cz>,
kamezawa.hiroyu@jp.fujitsu.com,
Johannes Weiner <hannes@cmpxchg.org>
Subject: Re: [PATCH v2] memcg: debugging facility to access dangling memcgs.
Date: Mon, 3 Dec 2012 15:44:20 -0800 [thread overview]
Message-ID: <20121203154420.661f8e28.akpm@linux-foundation.org> (raw)
In-Reply-To: <1354541048-12597-1-git-send-email-glommer@parallels.com>
On Mon, 3 Dec 2012 17:24:08 +0400
Glauber Costa <glommer@parallels.com> wrote:
> If memcg is tracking anything other than plain user memory (swap, tcp
> buf mem, or slab memory), it is possible - and normal - that a reference
> will be held by the group after it is dead. Still, for developers, it
> would be extremely useful to be able to query about those states during
> debugging.
>
> 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.
As this is a developer-only thing, I suggest that we should avoid
burdening mainline with it. How about we maintain this in -mm (and
hence in -next and mhocko's memcg tree) until we no longer see a need
for it?
> +config MEMCG_DEBUG_ASYNC_DESTROY
> + bool "Memory Resource Controller Debug assynchronous object destruction"
> + depends on MEMCG_KMEM || MEMCG_SWAP
Could also depend on DEBUG_VM, I guess.
> + default n
> + help
> + When a memcg is destroyed, the memory
> + consumed by it may not be immediately freed. This is because when some
> + extensions are used, such as swap or kernel memory, objects can
> + outlive the group and hold a reference to it.
> +
> + If this is the case, the dangling_memcgs file will show information
> + about what are the memcgs still alive, and which references are still
> + preventing it to be freed. There is nothing wrong with that, but it is
> + very useful when debugging, to know where this memory is being held.
> + This is a developer-oriented debugging facility only, and no
> + guarantees of interface stability will be given.
> +
fixlets:
--- a/init/Kconfig~memcg-debugging-facility-to-access-dangling-memcgs-fix
+++ a/init/Kconfig
@@ -897,14 +897,14 @@ config MEMCG_KMEM
will ever exhaust kernel resources alone.
config MEMCG_DEBUG_ASYNC_DESTROY
- bool "Memory Resource Controller Debug assynchronous object destruction"
+ bool "Memory Resource Controller Debug asynchronous object destruction"
depends on MEMCG_KMEM || MEMCG_SWAP
default n
help
- When a memcg is destroyed, the memory
- consumed by it may not be immediately freed. This is because when some
- extensions are used, such as swap or kernel memory, objects can
- outlive the group and hold a reference to it.
+ When a memcg is destroyed, the memory consumed by it may not be
+ immediately freed. This is because when some extensions are used, such
+ as swap or kernel memory, objects can outlive the group and hold a
+ reference to it.
If this is the case, the dangling_memcgs file will show information
about what are the memcgs still alive, and which references are still
_
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2012-12-03 23:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-03 13:24 [PATCH v2] memcg: debugging facility to access dangling memcgs Glauber Costa
2012-12-03 13:24 ` Glauber Costa
2012-12-03 23:44 ` Andrew Morton [this message]
[not found] ` <20121203154420.661f8e28.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2012-12-04 7:40 ` Glauber Costa
2012-12-04 7:40 ` Glauber Costa
2012-12-04 9:00 ` Michal Hocko
2012-12-04 9:00 ` Michal Hocko
2012-12-04 8:59 ` Michal Hocko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121203154420.661f8e28.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=glommer@parallels.com \
--cc=hannes@cmpxchg.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.cz \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.