[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 08/03/13 15:11, Boris Ostrovsky wrote: ----- george.dunlap@xxxxxxxxxxxxx wrote:On 08/03/13 14:50, Boris Ostrovsky wrote:----- JBeulich@xxxxxxxx wrote:On 04.03.13 at 13:42, George Dunlap<George.Dunlap@xxxxxxxxxxxxx>wrote: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 readbackthe value to check if the MSR is working. This has shown tofailsthe 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, Ifoundthat adding them to the save/restore path added a non-neligible overhead -- something like 5% slow-down. Do you have any reasontobelieve this is no longer the case? Have you done any benchmarks before and after?I was doing some VPMU tracing a couple of weeks ago and by lookingattrace timestamps I think I saw about 4000 cycles on VPMU save and ~9000 cycles on restore. Don't remember what it was percentage-wiseofa whole context switch. This was on Intel.That's a really hefty expense to make all users pay on every context switch, on behalf of a random check in a piece of software that only a handful of people are going to be actually using.I believe Linux uses perf infrastructure to implement the watchdog. Hmm -- well if it is the case that adding performance counters to the vcpu context switch path will add a measurable overhead, then we probably don't want them enabled for typical guests anyway. If people are actually using the performance counters to measure performance, that makes sense; but for watchdogs it seems like Xen should be able to provide something that is useful for a watchdog without the extra overhead of saving and restoring performance counters. Konrad, any thoughts? -George _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |