From: Ingo Molnar <mingo@elte.hu>
To: Anton Blanchard <anton@samba.org>
Cc: a.p.zijlstra@chello.nl, paulus@samba.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf_counter: Add alignment-faults and emulation-faults sw events
Date: Sat, 18 Jul 2009 11:35:00 +0200 [thread overview]
Message-ID: <20090718093500.GC9142@elte.hu> (raw)
In-Reply-To: <20090715120319.GE9805@kryten>
* Anton Blanchard <anton@samba.org> wrote:
> Hi Ingo,
>
> > Looks useful.
> >
> > I'm wondering about the enumeration space: in other cases when
> > some simple event was further refined we went to add a new
> > perf_type_id and a separate enumeration space, with no limits to
> > extensibility. We'd have a new 'enum perf_sw_fault_id' space.
> >
> > Page faults are special anyway, because they carry a 'data'
> > (faulting address) sample as well.
> >
> > So i'm wondering how a good, generic enumeration of all things
> > page faults would look like. If we extend perf_sw_ids linearly
> > we might lose some structure.
> >
> > For example major versus minor might be a dimension (bit) in the
> > enumeration space, so we'd have:
> >
> > { major | minor } x { native, unaligned, emulated }
> >
> > This provides an advantage already: the current 'all' page
> > faults counter would become the 'major|minor' case in the new
> > enumeration.
> >
> > We could still keep around the old events as well for some time,
> > but the tools would use the new enumeration.
>
> My initial feeling is that emulation and alignment faults
> shouldn't roll up into page faults, because that may cause cause
> someone to think the problem is something to do with translation.
> I don't have a strong opinion on it however :)
I have no strong feelings either so please pick the variant that
feels most natural. I do think we should try to generalize it a bit
and move it into its own enumeration space, out of the generic sw
counters - do you agree with that?
> Since we are talking about SW events, I thought I'd bring up some
> ideas I was discussing with Paul the other day. The hardware guys
> like to build CPI stacks, basically breaking down the CPI into its
> components (CPI due to TLB misses, CPI due to dcache misses etc).
> This offers a great high level view of what needs to be fixed in
> order to improve performance.
>
> Taking a step back, it would be great if we could have enough SW
> events and counters to be able to do this at the kernel level. A
> few events/counters that come to mind are cputime lost due to
> swap, IO initiated by the process, interrupts and other processes
> being scheduled. I wonder if the delay accounting code has
> anything we can reuse for this.
>
> With these events we could simply run perf stat and instantly see
> what needs fixing at both the cpu level (via CPI analysis) and at
> the kernel level (via SW counters).
Yeah, i like this direction.
Mind extending your patch-set in this way, and also do the more
structured pagefault enumeration thing? (unless you have better
suggestions)
Thanks,
Ingo
prev parent reply other threads:[~2009-07-18 9:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-06 12:08 [PATCH] perf_counter: Add alignment-faults and emulation-faults sw events Anton Blanchard
2009-07-10 9:37 ` Ingo Molnar
2009-07-15 12:03 ` Anton Blanchard
2009-07-18 9:35 ` 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=20090718093500.GC9142@elte.hu \
--to=mingo@elte.hu \
--cc=a.p.zijlstra@chello.nl \
--cc=anton@samba.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.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.