From: Ingo Molnar <mingo@kernel.org>
To: Andi Kleen <andi@firstfloor.org>
Cc: 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: Sun, 24 Feb 2013 13:07:26 +0100 [thread overview]
Message-ID: <20130224120726.GB20905@gmail.com> (raw)
In-Reply-To: <20130222151950.GK2928@two.firstfloor.org>
* Andi Kleen <andi@firstfloor.org> wrote:
> 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.
It would actually be _much_ more useful to first try to fix that
condition - then extend the counter range. As you say it in the
changelog it can happen anyway: and it's much more testable if
the counter width is narrower initially.
Mind restructuring the basic patches thusly, putting the fix
first and moving the counter extension to the later patches?
(If you don't have the time for that we can delay it all to
v3.10, it's pretty late already even for v3.9.)
Thanks,
Ingo
next prev parent reply other threads:[~2013-02-24 12:07 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
2013-02-24 12:07 ` Ingo Molnar [this message]
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=20130224120726.GB20905@gmail.com \
--to=mingo@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@infradead.org \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=linux-kernel@vger.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.