From: Ingo Molnar <mingo@elte.hu>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH 0/4] perf: Precise task / softirq / hardirq filtered stats/profiles
Date: Fri, 21 May 2010 20:36:49 +0200 [thread overview]
Message-ID: <20100521183649.GA9685@elte.hu> (raw)
In-Reply-To: <1274458513.1674.1714.camel@laptop>
* Peter Zijlstra <peterz@infradead.org> wrote:
> On Fri, 2010-05-21 at 17:12 +0200, Ingo Molnar wrote:
> > 'exclusion' is the ABI detail. The feature your patches
> > implement are to allow 'softirq limited' or 'task-context
> > limited' or 'hardirq profiling' - which is way cool.
> >
> > One thing i'd like to see in this feature is for it to
> > work on pure event counting - i.e. 'perf stat' as well.
>
> Its not really exclusion, all it does is discard samples
> when in the wrong context (which happens to work
> reasonably well for all the swevents, except for the
> timer ones).
>
> If you really want to do exclusion you have to
> disable/enable on *IRQ entry/exit, but I guess that gets
> to be prohibitive on costs.
Yeah, i know - this is what i tried to allude to in my
other part of my reply:
> > If we extended your feature to perf stat, we might be
> > able to get a lot more precise measurements in terms
> > of kernel optimizations (and kernel bloat).
Right, so there's two ways to do it, one is the
disable/enable what you mention, the other would be to
save the count and then read again and subtract the delta.
( the RDPMC based delta method can be made to work for
sampling as well, even if the NMI hits in the middle of
the softirq or hardirq. )
Two reads might be cheaper than a disable+enable.
Especially if it's done using RDPMC.
We should do it like that, not by discarding samples, and
overhead should be OK as long as we dont do the
disable/enable (or delta read) if the feature is off.
If a simple enable/disable or read/read costs too much
then we need to prod hw makers about it. But it should be
OK i think.
Ingo
prev parent reply other threads:[~2010-05-21 18:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-21 14:05 [PATCH 0/4] perf: Tasks and irq exclusion Frederic Weisbecker
2010-05-21 14:05 ` [PATCH 1/4] irq: Support to compute context on top of a given preempt_count offset Frederic Weisbecker
2010-05-21 14:05 ` [PATCH 2/4] perf: Add exclude_task perf event attribute Frederic Weisbecker
2010-05-25 1:43 ` Paul Mackerras
2010-05-25 6:58 ` Peter Zijlstra
2010-05-25 10:06 ` Frederic Weisbecker
2010-06-07 1:38 ` Frederic Weisbecker
2010-06-08 18:59 ` Ingo Molnar
2010-06-08 19:02 ` Frederic Weisbecker
2010-05-21 14:05 ` [PATCH 3/4] perf: Support for irq exclusion Frederic Weisbecker
2010-05-21 14:06 ` Frederic Weisbecker
2010-05-21 14:05 ` [PATCH 4/4] perf: Support for task/softirq/hardirq exclusion on tools Frederic Weisbecker
2010-05-21 15:12 ` [PATCH 0/4] perf: Precise task / softirq / hardirq filtered stats/profiles Ingo Molnar
2010-05-21 16:15 ` Peter Zijlstra
2010-05-21 18:36 ` 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=20100521183649.GA9685@elte.hu \
--to=mingo@elte.hu \
--cc=acme@redhat.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.org \
--cc=peterz@infradead.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.