From: Andi Kleen <andi@firstfloor.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>,
linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Arnaldo Carvalho de Melo <acme@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 4/5] perf, x86: Support full width counting v3
Date: Fri, 22 Feb 2013 16:19:50 +0100 [thread overview]
Message-ID: <20130222151950.GK2928@two.firstfloor.org> (raw)
In-Reply-To: <20130222134630.GA8960@gmail.com>
On Fri, Feb 22, 2013 at 02:46:30PM +0100, Ingo Molnar wrote:
>
> * Andi Kleen <andi@firstfloor.org> wrote:
>
> > From: Andi Kleen <ak@linux.intel.com>
> >
> > Recent Intel CPUs like Haswell and IvyBridge have a new
> > alternative MSR range for perfctrs that allows writing the
> > full counter width. Enable this range if the hardware reports
> > it using a new capability bit.
> >
> > This lowers the overhead of perf stat slightly because it has
> > to do less interrupts to accumulate the counter value. On
> > Haswell it also avoids some problems with TSX aborting when
> > the end of the counter range is reached.
>
> The changelog does not adequately explain why this patch is
> critical for basic Haswell enablement. "Avoids some problems
> with TSX aborting" is not very helpful.
Updated description below. I don't want you from stop reviewing
the rest of the patches, so I'm not posting a new series
for now just for a new description. Please keep reading.
You may make it through to the end.
---
Recent Intel CPUs like Haswell and IvyBridge have a new
alternative MSR range for perfctrs that allows writing the
full counter width. Enable this range if the hardware reports
it using a new capability bit.
This lowers the overhead of perf stat slightly because it has
to do less interrupts to accumulate the counter value. On
Haswell it also avoids some problems with TSX aborting when
the end of the counter range is reached. This can be observed
when the checkpoint flag has been set, which has been enabled
by the basic PMU patch. An overflow will abort the transaction
and set the counter back. If the counter is near the overflow
before the transaction this could happen continuously, forcing
a transaction to continuously abort.
This is a partial fix, but it makes the overflows much less
likely by using a larger counter, to lower the probability of the
event. Additional counter measures are in the additional extended
Haswell patchkit.
next prev parent reply other threads:[~2013-02-22 15:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-18 18:48 Basic perf PMU support for Haswell v8 Andi Kleen
2013-02-18 18:48 ` [PATCH 1/5] perf, x86: Add Haswell PEBS record support v4 Andi Kleen
2013-02-18 18:48 ` [PATCH 2/5] perf, x86: Basic Haswell PMU support v5 Andi Kleen
2013-02-18 18:48 ` [PATCH 3/5] perf, x86: Basic Haswell PEBS support v4 Andi Kleen
2013-02-18 18:48 ` [PATCH 4/5] perf, x86: Support full width counting v3 Andi Kleen
2013-02-22 13:46 ` Ingo Molnar
2013-02-22 15:19 ` Andi Kleen [this message]
2013-02-24 12:07 ` Ingo Molnar
2013-02-18 18:48 ` [PATCH 5/5] perf, x86: Move NMI clearing to end of PMI handler after the counter registers are reset Andi Kleen
-- strict thread matches above, loose matches on Subject: below --
2013-02-13 16:08 Basic perf PMU support for Haswell v7 Andi Kleen
2013-02-13 16:08 ` [PATCH 4/5] perf, x86: Support full width counting v3 Andi Kleen
2013-02-12 22:04 Basic perf PMU support for Haswell v6 Andi Kleen
2013-02-12 22:04 ` [PATCH 4/5] perf, x86: Support full width counting v3 Andi Kleen
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=20130222151950.GK2928@two.firstfloor.org \
--to=andi@firstfloor.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@infradead.org \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/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.