Re: Non-exiting rdpmc on KVM guests?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux