From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Vince Weaver <vweaver1@eecs.utk.edu>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu,
Paul Mackerras <paulus@samba.org>,
Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
Stephane Eranian <eranian@gmail.com>
Subject: Re: [PATCH] perf_event use rdpmc rather than rdmsr when possible in kernel
Date: Mon, 27 Feb 2012 17:18:38 +0100 [thread overview]
Message-ID: <1330359518.11248.72.camel@twins> (raw)
In-Reply-To: <alpine.DEB.2.00.1202271051330.1902@cl320.eecs.utk.edu>
On Mon, 2012-02-27 at 11:06 -0500, Vince Weaver wrote:
> > > + new_raw_count=native_read_pmc(hwc->event_base_rdpmc);
> >
> > That really wants to be rdpmc(), bypassing paravirt like that isn't
> > nice.
>
> I couldn't find another usable rdpmc() call in the kernel. Should I add
> one? I admit I hadn't thought that this might break VMs not expecting
> rdpmc calls from the kernel.
arch/x86/include/asm/msr.h
#define rdpmc(counter, low, high) \
do { \
u64 _l = native_read_pmc((counter)); \
(low) = (u32)_l; \
(high) = (u32)(_l >> 32); \
} while (0)
next prev parent reply other threads:[~2012-02-27 16:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-20 22:38 [PATCH] perf_event use rdpmc rather than rdmsr when possible in kernel Vince Weaver
2012-02-27 11:39 ` Peter Zijlstra
2012-02-27 16:06 ` Vince Weaver
2012-02-27 16:18 ` Peter Zijlstra [this message]
2012-02-27 17:04 ` Vince Weaver
-- strict thread matches above, loose matches on Subject: below --
2012-03-01 22:28 Vince Weaver
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=1330359518.11248.72.camel@twins \
--to=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=eranian@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=vweaver1@eecs.utk.edu \
/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