Re: Performance monitoring units and KVM

Balaji Rao
2008-01-30T18:23:19Z

On Wednesday 30 January 2008 11:11:51 pm Avi Kivity wrote:
> Markus Armbruster wrote:
> > System-wide profiling of the *virtual* machine is related to profiling
> > just a process. That's hard. I guess building on Perfmon2 would make
> > sense there, but as long as it's out of tree... Can we wait for it?
> > If not, what then?
>
> Give the guest access to the real PMU. Save them on every exit
> (switching profiling off), and restore them on every entry (switching
> profiling on). The only problem with this is that it is very cpu model
> dependent, losing the hardware independence that virtual machines have.
> If you are satisfied with the architectural performance counters, then
> we even have hardware independence.
But don't the architectural performance counters vary between Intel and AMD
cpus ? AFAIK, they do. And, this would pose problems during migration between
Intel and AMD hosts.

I am not sure how important is it to support migration between Intel and AMD
hosts. If it were not that important, then IMO we could go ahead with exposing
the real PMU. Maybe we could warn users against running profilers in the guest
if they intend it to to be Intel<->AMD migrateable ?

regards,
balaji rao