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

Re: [Xen-devel] [PATCH] Always save/restore performance counters when HVM guest switching VCPU

On Fri, Mar 1, 2013 at 8:49 PM,  <suravee.suthikulpanit@xxxxxxx> wrote:
> From: Suravee Suthikulpanit <suravee.suthikulpanit@xxxxxxx>
> Currently, the performance counter registers are saved/restores
> when the HVM guest switchs VCPUs only if they are running.
> However, PERF has one check where it writes the MSR and read back
> the value to check if the MSR is working.  This has shown to fails
> the check if the VCPU is moved in between rdmsr and wrmsr and
> resulting in the values are different.

Many moons ago (circa 2005) when I used performance counters, I found
that adding them to the save/restore path added a non-neligible
overhead -- something like 5% slow-down.  Do you have any reason to
believe this is no longer the case?  Have you done any benchmarks
before and after?

If there is a performance slow-down, you may have to implement
something like the "lazy FPU" save/restore, where you remove access to
the VPMU MSRs to detect that the guest is accessing them.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.