From: Peter Zijlstra <peterz@infradead.org>
To: Andi Kleen <andi@firstfloor.org>
Cc: "Liang, Kan" <kan.liang@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"mingo@kernel.org" <mingo@kernel.org>,
"acme@infradead.org" <acme@infradead.org>,
"eranian@google.com" <eranian@google.com>
Subject: Re: [PATCH V6 4/6] perf, x86: handle multiple records in PEBS buffer
Date: Fri, 17 Apr 2015 20:25:45 +0200 [thread overview]
Message-ID: <20150417182545.GN23123@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20150417182037.GZ2366@two.firstfloor.org>
On Fri, Apr 17, 2015 at 08:20:37PM +0200, Andi Kleen wrote:
> On Fri, Apr 17, 2015 at 04:44:07PM +0200, Peter Zijlstra wrote:
> > On Fri, Apr 17, 2015 at 02:19:58PM +0000, Liang, Kan wrote:
> >
> > > > But that brings us to patch 1 of this series, how is that correct in the face of
> > > > this? There is an arbitrary delay (A->B) added to the period.
> > > > And the Changelog of course never did bother to make that clear.
>
> That's how perf and other profilers always behaved. The PMI
> is not part of the period. The automatic PEBS reload is not in any way
> different. It's much faster than a PMI, but it's also not zero cost.
>
> This is not a gap in measurement though -- there is no other code
> running during that time on that CPU. It's simply overhead from the
> measurement mechanism.
>
> > >
> > > OK. I will update the changelog for patch 1 as below.
> > > ---
> > > When a fixed period is specified, this patch make perf use the PEBS
> > > auto reload mechanism. This makes normal profiling faster, because
> > > it avoids one costly MSR write in the PMI handler.
> >
> > > However, the reset value will be loaded by hardware assist. There is
> > > a little bit delay compared to previous non-auto-reload mechanism.
> > > The delay is arbitrary but very small.
> >
> > What is very small? And doesn't that mean its significant at exactly the
> > point this patch series is aimed at, namely very short period.
>
> The assist cost is 400-800 cycles, assuming common cases with everything
> cached. The minimum period the patch currently uses is 10000. In that
> extreme case it can be ~10% if cycles are used.
Thanks, please include all this information.
next prev parent reply other threads:[~2015-04-17 18:25 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-09 16:37 [PATCH V6 0/6] large PEBS interrupt threshold Kan Liang
2015-04-09 16:37 ` [PATCH V6 1/6] perf, x86: use the PEBS auto reload mechanism when possible Kan Liang
2015-04-09 16:37 ` [PATCH V6 2/6] perf, x86: introduce setup_pebs_sample_data() Kan Liang
2015-04-09 16:37 ` [PATCH V6 3/6] perf, x86: large PEBS interrupt threshold Kan Liang
2015-04-15 17:14 ` Peter Zijlstra
2015-04-15 17:48 ` Liang, Kan
2015-04-15 18:10 ` Peter Zijlstra
2015-04-15 18:05 ` Peter Zijlstra
2015-04-15 18:35 ` Liang, Kan
2015-04-15 18:41 ` Peter Zijlstra
2015-04-16 18:45 ` Peter Zijlstra
2015-04-09 16:37 ` [PATCH V6 4/6] perf, x86: handle multiple records in PEBS buffer Kan Liang
2015-04-09 21:01 ` Andi Kleen
2015-04-15 18:28 ` Peter Zijlstra
2015-04-15 18:36 ` Peter Zijlstra
2015-04-16 12:53 ` Peter Zijlstra
2015-04-17 8:11 ` Peter Zijlstra
2015-04-17 12:50 ` Liang, Kan
2015-04-17 13:12 ` Peter Zijlstra
2015-04-17 14:19 ` Liang, Kan
2015-04-17 14:44 ` Peter Zijlstra
2015-04-17 18:20 ` Andi Kleen
2015-04-17 18:25 ` Peter Zijlstra [this message]
2015-04-09 16:37 ` [PATCH V6 5/6] perf, x86: drain PEBS buffer during context switch Kan Liang
2015-04-09 16:37 ` [PATCH V6 6/6] perf, x86: enlarge PEBS buffer Kan Liang
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=20150417182545.GN23123@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=acme@infradead.org \
--cc=andi@firstfloor.org \
--cc=eranian@google.com \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox