From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Performance monitoring units and KVM Date: Wed, 30 Jan 2008 20:14:39 +0200 Message-ID: <47A0BE8F.4090508@qumranet.com> References: <87wsprxmyb.fsf@pike.pond.sub.org> <47A0B6DF.40208@qumranet.com> <200801302353.19872.balajirrao@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Markus Armbruster To: Balaji Rao Return-path: In-Reply-To: <200801302353.19872.balajirrao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Balaji Rao wrote: > 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. > > The also vary between Intel hosts of different models, and likely different AMD hosts as well. The PMU is not architectural (or, in other words, model specific). So migration and PMU pass-through are mutually exclusive unless you have a homogeneous server farm. > 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 ? > We can give the user the option to expose only the architectural PMU (which is quite limited) and have cross-model migration, or to expose the full PMU and lose hardware independence. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- 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/