From: Vince Weaver <vincent.weaver@maine.edu>
To: Peter Zijlstra <peterz@infradead.org>
Cc: "Odzioba, Lukasz" <lukasz.odzioba@intel.com>,
"Liang, Kan" <kan.liang@intel.com>,
Stephane Eranian <eranian@google.com>,
"mingo@redhat.com" <mingo@redhat.com>,
LKML <linux-kernel@vger.kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
"ak@linux.intel.com" <ak@linux.intel.com>
Subject: Re: [PATCH] perf/x86: fix event counter update issue
Date: Wed, 22 Feb 2017 09:49:51 -0500 (EST) [thread overview]
Message-ID: <alpine.DEB.2.20.1702220941570.24020@macbook-air> (raw)
In-Reply-To: <20161205102509.GH3124@twins.programming.kicks-ass.net>
On Mon, 5 Dec 2016, Peter Zijlstra wrote:
> ---
> Subject: perf,x86: Fix full width counter, counter overflow
> Date: Tue, 29 Nov 2016 20:33:28 +0000
>
> Lukasz reported that perf stat counters overflow is broken on KNL/SLM.
>
> Both these parts have full_width_write set, and that does indeed have
> a problem. In order to deal with counter wrap, we must sample the
> counter at at least half the counter period (see also the sampling
> theorem) such that we can unambiguously reconstruct the count.
I know I'm a bit late to this issue, but I suddenly have PAPI users being
very worried that their results are going to be wrong ad I hadn't heard
about this until recently.
I'm trying to make a reproducer test and want to make sure I understand
the issue. (And I don't have any of the easy trigger hardware either.
And what is SLM? Silvermont? Are we really that short on Changelog space
that we can't spell out the abbreviations to make things clear for
non-Intel employees?)
So from what I understand, the issue is if we have an architecture with
full-width counters and we trigger a x86_perf_event_update() when bit
47 is set?
So if I have a test that runs in a loop for 2^48 retired instructions
(which takes ~12 hours on a recent machine) and then reads the results,
they might be wrong?
It sounds like this can also be triggered by a sampling event with a
really long period, but I couldn't puzzle out from the Changelog exactly
how to reproduce this (or even how serious the issue is).
Vince
next prev parent reply other threads:[~2017-02-22 14:50 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-28 19:26 kan.liang
2016-11-28 19:41 ` Stephane Eranian
2016-11-28 19:59 ` Liang, Kan
2016-11-28 20:18 ` Stephane Eranian
2016-11-28 20:23 ` Liang, Kan
2016-11-29 9:25 ` Peter Zijlstra
2016-11-29 14:46 ` Liang, Kan
2016-11-29 16:58 ` Peter Zijlstra
2016-11-29 17:06 ` Liang, Kan
2016-11-29 17:17 ` Peter Zijlstra
2016-11-29 17:20 ` Stephane Eranian
2016-11-29 17:30 ` Peter Zijlstra
2016-11-29 18:11 ` Stephane Eranian
2016-11-29 18:37 ` Andi Kleen
2016-11-29 19:07 ` Liang, Kan
2016-11-29 19:32 ` Peter Zijlstra
2016-11-29 20:33 ` Liang, Kan
2016-11-29 20:37 ` Stephane Eranian
2016-12-02 12:58 ` Odzioba, Lukasz
2016-12-05 10:25 ` Peter Zijlstra
2016-12-05 11:21 ` Odzioba, Lukasz
2017-02-22 14:49 ` Vince Weaver [this message]
2017-02-22 15:28 ` Liang, Kan
2017-02-22 19:18 ` Andi Kleen
2017-02-23 15:07 ` Vince Weaver
2017-02-23 16:14 ` Liang, Kan
2016-11-29 19:08 ` Odzioba, Lukasz
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=alpine.DEB.2.20.1702220941570.24020@macbook-air \
--to=vincent.weaver@maine.edu \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=eranian@google.com \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lukasz.odzioba@intel.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.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
all inboxes | Powered by JetHome®