lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 22 Feb 2013 16:19:50 +0100
From:	Andi Kleen <andi@...stfloor.org>
To:	Ingo Molnar <mingo@...nel.org>
Cc:	Andi Kleen <andi@...stfloor.org>, linux-kernel@...r.kernel.org,
	Andi Kleen <ak@...ux.intel.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Arnaldo Carvalho de Melo <acme@...radead.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 4/5] perf, x86: Support full width counting v3

On Fri, Feb 22, 2013 at 02:46:30PM +0100, Ingo Molnar wrote:
> 
> * Andi Kleen <andi@...stfloor.org> wrote:
> 
> > From: Andi Kleen <ak@...ux.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.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ