From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>, Andy Lutomirski <luto@kernel.org>
Cc: kvm list <kvm@vger.kernel.org>
Subject: Re: Non-exiting rdpmc on KVM guests?
Date: Tue, 21 Apr 2015 18:32:54 +0200 [thread overview]
Message-ID: <55367BB6.3050103@redhat.com> (raw)
In-Reply-To: <20150421150514.GC3182@worktop.meeting.verilan.com>
On 21/04/2015 17:05, Peter Zijlstra wrote:
> On Mon, Apr 20, 2015 at 05:47:23PM -0700, Andy Lutomirski wrote:
>> I just wrote a little perf self-monitoring tool that uses rdpmc to
>> count cycles. Performance sucks under KVM (VMX).
>>
>> How hard would it be to avoid rdpmc exits in cases where the host and
>> guest pmu configurations are compatible as seen by rdpmc? I'm mostly
>> ignorant of how the PMU counter offsets and such work.
>
> I'm not sure how all the VMX stuff works. how is rdpmc seem? It it at
> all possible to not trap that?
Yes, it is. RDPMC is just yet another "exit reason" and you can avoid
exiting. However, if you take into account that RDPMC can also be used
to read an inactive counter, and that multiple guests "fight" for the
same host counters, it's even harder to ensure that the guest counter
indices match those on the host.
Paolo
next prev parent reply other threads:[~2015-04-21 16:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-21 0:47 Non-exiting rdpmc on KVM guests? Andy Lutomirski
2015-04-21 15:05 ` Peter Zijlstra
2015-04-21 16:32 ` Paolo Bonzini [this message]
2015-04-21 20:51 ` Peter Zijlstra
2015-04-21 21:10 ` Andy Lutomirski
2015-04-22 15:26 ` Peter Zijlstra
2015-04-22 21:05 ` Paolo Bonzini
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=55367BB6.3050103@redhat.com \
--to=pbonzini@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=luto@kernel.org \
--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