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
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to