Re: perf, H/W counters - ESX hosted VM

From: Arun Sharma
Date: Fri May 27 2011 - 18:51:51 EST


On Fri, May 27, 2011 at 01:33:54PM -0600, David Ahern wrote:
>
> Has anyone successfully used perf within an ESX VM? dmesg shows a PMU is
> discovered:

Don't know about ESX. But in general, getting this right requires
virtualizing PMU hardware (eg: save/restore PMU state on exit/entry
from the guest just the way the scheduler does for processes).

Also, the MSR read/writes to event-{select,count} registers must
be properly virtualized. Interrupt delivery (NMIs) is important
as well.

I suspect that MSR writes from the guest to the PMU related registers
are simply ignored in most virtual environments today.

-Arun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/