From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Vince Weaver <vweaver1@eecs.utk.edu>
Cc: linux-kernel@vger.kernel.org,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@elte.hu>,
Corey Ashford <cjashfor@linux.vnet.ibm.com>,
Stephane Eranian <eranian@google.com>
Subject: Re: perf: kernel memory leak when inherit enabled
Date: Mon, 14 Mar 2011 19:32:24 -0300 [thread overview]
Message-ID: <20110314223224.GD9388@ghostprotocols.net> (raw)
In-Reply-To: <alpine.DEB.2.00.1103141824190.13179@cl320.eecs.utk.edu>
Em Mon, Mar 14, 2011 at 06:27:19PM -0400, Vince Weaver escreveu:
> On Fri, 11 Mar 2011, Vince Weaver wrote:
> >
> > While trying to use perf events with inherit enabled to profile some
> > multi-threaded BLAS routines (using PAPI) I ended up out-of-memorying my
> > machine. It turns out you can quickly leak gigabytes of kernel memory
> > that isn't freed when the process exits.
>
> I've bisected this. There's a whole day I'll never see again. binutils
> 2.21 and gcc-4.5 for the lose :(
>
> Anyway this memory leak with inherit was introduced in
> 4fd38e4595e
commit 4fd38e4595e2f6c9d27732c042a0e16b2753049c
Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
Date: Thu May 6 17:31:38 2010 +0200
perf: Fix exit() vs PERF_FORMAT_GROUP
Both Stephane and Corey reported that PERF_FORMAT_GROUP didn't work
as expected if the task the counters were attached to quit before
the read() call.
The cause is that we unconditionally destroy the grouping when we
remove counters from their context. Fix this by only doing this when
we free the counter itself.
Reported-by: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Reported-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1273160566.5605.404.camel@twins>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
- Arnaldo
next prev parent reply other threads:[~2011-03-14 22:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-11 22:54 perf: kernel memory leak when inherit enabled Vince Weaver
2011-03-14 22:27 ` Vince Weaver
2011-03-14 22:32 ` Arnaldo Carvalho de Melo [this message]
2011-03-15 0:27 ` Vince Weaver
2011-03-15 2:26 ` Vince Weaver
2011-03-15 13:41 ` [PATCH] perf: Fix tear-down of inherited group events Peter Zijlstra
2011-03-15 16:09 ` Vince Weaver
2011-03-15 16:41 ` Peter Zijlstra
2011-03-16 13:59 ` [tip:perf/urgent] " tip-bot for Peter Zijlstra
2011-03-15 9:07 ` perf: kernel memory leak when inherit enabled Peter Zijlstra
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=20110314223224.GD9388@ghostprotocols.net \
--to=acme@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=cjashfor@linux.vnet.ibm.com \
--cc=eranian@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=vweaver1@eecs.utk.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox