All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Anton Blanchard <anton@samba.org>,
	paulus@samba.org, fweisbec@gmail.com, rdreier@cisco.com,
	akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: perf_counter: Track all mmaps, heap and stack extensions
Date: Sun, 2 Aug 2009 21:46:37 +0200	[thread overview]
Message-ID: <20090802194637.GC24486@elte.hu> (raw)
In-Reply-To: <1248778622.6987.2983.camel@twins>


* Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:

> On Tue, 2009-07-28 at 18:46 +1000, Anton Blanchard wrote:
> > Hi,
> > 
> > Right now perf_counter only logs executable mmaps. While this is enough
> > for instruction profiling, at some stage we are also going to want
> > to do data profiling. This will require us to log non-executable mmaps as
> > well as stack and heap extensions.
> > 
> > Why would we care about heap and stack? A few examples:
> > 
> > 1. We can monitor TLB miss rates to suggest what regions of memory should be
> >    put into hugepages.
> >  
> > 2. We can look into various TLB miss issues. On PowerPC a data prefetch
> >    that goes to an unmapped area takes a significant amount of time (it
> >    initiates a tablewalk that may take 40+ cycles). With accurate mapping
> >    data we can catch areas of code with bad prefetch instructions.
> 
> Agreed.
> 
> > Taking it a bit further, since in some sense perf_counter is a channel for
> > getting events out to userspace, I wonder if we could solve Roland's RDMA
> > address space unmap issue with perf_counter:
> > 
> > http://patchwork.kernel.org/patch/37267/
> 
> Yeah, saw some of that, Andrew has some good points there. Haven't had
> time to see the reply yet.
> 
> Not sure its a good match, but if so, very nice.
> 
> > Below is a dodgy hack I've been using to prototype tracking of 
> > all mmaps and heap/stack extensions. Naturally we'd want a 
> > perf_counter feature to turn this on and keep instruction 
> > profiles more compact. We'd also want munmap events.
> 
> I used to have an munmap hook in there at some point. We could 
> restore that.
> 
> > Thoughts?
> 
> Seems like a good direction, go for it ;-)

Seconded! Please submit the full patch once you are happy with it, 
with some tools/perf/ variant/feature that makes use of it and we 
are golden.

	Ingo

      reply	other threads:[~2009-08-02 19:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-28  8:46 perf_counter: Track all mmaps, heap and stack extensions Anton Blanchard
2009-07-28 10:57 ` Peter Zijlstra
2009-08-02 19:46   ` Ingo Molnar [this message]

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=20090802194637.GC24486@elte.hu \
    --to=mingo@elte.hu \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=anton@samba.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulus@samba.org \
    --cc=rdreier@cisco.com \
    /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.