From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [RFC] Performance monitoring units and KVM Date: Sat, 16 Feb 2008 16:04:43 -0600 Message-ID: <47B75DFB.1030901@codemonkey.ws> References: <200802162304.43141.balajirrao@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel@lists.sourceforge.net, balbir@in.ibm.com To: Balaji Rao Return-path: In-Reply-To: <200802162304.43141.balajirrao@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org Balaji Rao wrote: > Hi all! > > Earlier it was suggested that we go ahead with emulating Perf Mon Events in > exposing it to the guest. The serious limitation in this approach is that we > end up exposing only a small number of events to the guest, even though the > host hardware is capable of much more. The only benefit this approach offers is > that, it doesn't break live migration. > I think performance monitors are no different than anything else in KVM. We should virtualize as much as possible and by default provide only the common subset to the guest supported by the majority of hardware. Then we can use mechanisms like QEMU's CPU support to enable additional features that may be available and unique to the underlying hardware. It's then up to the management tools to deal with migratability since they've explicitly enabled the feature. Regards, Anthony Liguori > The other option is to pass through the real PMU to the guest. I believe this > approach is far better in the sense that, > > 1. All the available events in the host hardware can be passed on to the guest, > which can be used by oprofile to profile the guest and trackdown slowdowns > introduced due to virtualization. > > 2. Its much cleaner and easier to pass through the PMU. > > Yes, this approach breaks live migration. Migration should not be possible > *only* when the PMU is being used by oprofile. We can mark the guest as > unmigratable in such situations. Once the PMU is not being used, migration can > be performed normally. > > Note, this requires a small change to oprofile source. Upon migration, oprofile > should be made to re-identify the CPU and use the perf mon events appropriate > to that CPU. I think this could be done by having a migrate_notifier, or > something like that.. > > Please provide comments on this. > > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/