From: Ingo Molnar <mingo@elte.hu>
To: Paul Mundt <lethal@linux-sh.org>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: register_timer_hook use in arch/sh/oprofile
Date: Wed, 24 Jun 2009 15:24:47 +0200 [thread overview]
Message-ID: <20090624132447.GD6224@elte.hu> (raw)
In-Reply-To: <20090624131440.GA9700@linux-sh.org>
* Paul Mundt <lethal@linux-sh.org> wrote:
> > The main complication that such counters bring is that in their
> > 'own metric' they do interrupt periods in an 'irregular' way
> > (because they interrupt in the nanosec metric - being hrtimers)
> > - but both the tools can deal with uneven periods just fine and
> > the auto-freq code can auto-balance based on this just fine too.
>
> How we have mostly handled these counters in the past have been
> for long-term workload analysis. A given user wants to measure
> certain events across the lifetime of their workload to get an
> idea of where the hot spots are, and then send us numbers later.
> 64-bit hardware counters give them quite a bit of time to
> accumulate results, and in these cases precision is not so
> important as continuous non-interactive monitoring.
Note that if i understand the constraints correctly, SH's counters
will be _exactly_ as precise as x86 counters or PowerPC counters.
Even if SH uses a hrtimer to drive the sampling of them. [*]
The reason is that perfcounters are designed to be 'sampling
frequency/precision invariant'. We deal with
[delta_count,delta_time] pairs in the histograms, etc. and nothing
assumes that periods are static.
[ And long-term analysis ('perf stat' type of runs) dont need IRQs
anyway - perfcounters reads outs the counts and summarizes them
across the measured workload. ]
Furthermore, -F (auto-freq) counters are by design variable-period
and self-adjusting, even on x86 and PowerPC.
[ Btw., we plan to switch over the tools to use a 10 KHz auto-freq
sampling by default - as that gives us meaningful samples all the
time, regardless of how rare the underlying hardware event is. ]
Ingo
[*] The only tradeoff is that you wont have NMI sampling. But if you
have _some_ sort of NMI source in SH (regardless of whether it's
the PMU that drives it), you can still expose that and drive
your perfcounter sampling via that.
next prev parent reply other threads:[~2009-06-24 13:24 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-24 11:11 register_timer_hook use in arch/sh/oprofile Martin Schwidefsky
2009-06-24 11:29 ` Paul Mundt
2009-06-24 12:17 ` Ingo Molnar
2009-06-24 12:25 ` Paul Mundt
2009-06-24 12:37 ` Ingo Molnar
2009-06-24 12:40 ` Paul Mackerras
2009-06-24 12:47 ` Ingo Molnar
2009-06-24 12:28 ` Martin Schwidefsky
2009-06-24 12:34 ` Paul Mundt
2009-06-24 12:45 ` Ingo Molnar
2009-06-24 13:14 ` Paul Mundt
2009-06-24 13:24 ` Ingo Molnar [this message]
2009-06-26 7:01 ` Peter Zijlstra
2009-06-26 7:23 ` Ingo Molnar
2009-06-26 7:26 ` Paul Mundt
2009-06-26 7:36 ` Peter Zijlstra
2009-06-24 12:54 ` Martin Schwidefsky
2009-12-16 4:52 ` Paul Mundt
2009-12-16 7:21 ` Ingo Molnar
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=20090624132447.GD6224@elte.hu \
--to=mingo@elte.hu \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=schwidefsky@de.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox