mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vince Weaver <vincent.weaver@maine.edu>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>
Subject: Re: perf: rdpmc and PERF_EVENT_IOC_RESET
Date: Thu, 18 Aug 2016 00:32:25 -0400 (EDT)	[thread overview]
Message-ID: <alpine.DEB.2.20.1608180025420.8191@macbook-air> (raw)
In-Reply-To: <20160817152616.GT30192@twins.programming.kicks-ass.net>

On Wed, 17 Aug 2016, Peter Zijlstra wrote:

> Hurm.. I never considered using RESET with rdpmc(). The typical usage of
> rdpmc() I considered is something like:

I'm finally trying to hook up PAPI to properly use rdpmc and PAPI likes to 
use IOC_RESET in various places.  I can just special case to not do so 
when in rdpmc mode, but I got curious if RESET was expected to work.

> But the rdpmc user function should:
> ...
> 
> Which sign-extends the RDPMC result and adds it to userpg->offset,
> resulting in a positive number again.

I will have to check to see if PAPI is using the proper code.
What happens is the procesed result has bit 49 set for some reason, so the 
results are 2^49 too big.  I've been trying to track it down, but the PAPI 
code is a bit of a mess (to put it mildly).

Vince

      reply	other threads:[~2016-08-18  4:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-17  4:53 Vince Weaver
2016-08-17 15:26 ` Peter Zijlstra
2016-08-18  4:32   ` Vince Weaver [this message]

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.1608180025420.8191@macbook-air \
    --to=vincent.weaver@maine.edu \
    --cc=acme@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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®