WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

Re: [XenPPC] Profiling in xen – ppc considerations

To: Christian Ehrhardt <ehrhardt@xxxxxxxxxxxxxxxxxx>
Subject: Re: [XenPPC] Profiling in xen – ppc considerations
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Tue, 20 Mar 2007 10:49:20 -0500
Cc: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>, xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 20 Mar 2007 08:49:28 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <45FEA2BC.6060704@xxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: IBM Linux Technology Center
References: <45F6DB41.4040008@xxxxxxxxxxxxxxxxxx> <547D9AEA-9614-4D5E-9F65-4CEAF6AD6B92@xxxxxxxxxxxxxx> <45FEA2BC.6060704@xxxxxxxxxxxxxxxxxx>
Reply-to: Hollis Blanchard <hollisb@xxxxxxxxxx>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Mon, 2007-03-19 at 15:48 +0100, Christian Ehrhardt wrote:
> Jimi Xenidis wrote:
> > ...
> > There really very little Linux work to do here.  We need:
> >  1. An hcall that turn the performance monitor on for the domain
> >  2. Save and restore the relevant registers for any domain that is has 
> > it turned on.
> >  3. Turn it off for domains that have it disabled.
> >
> > you can see the hcall being setup here:
> >   arch/powerpc/platforms/pseries/setup.c pSeries_setup_arch 322 
> > ppc_md.enable_pmcs = pseries_lpar_enable_pmcs;
> >
> > ...
> 
> I have evaluated all three items you listed above and I think to know 
> now what to do to implement them in detail. I will post a refined 
> version of your list after  I have clarified the last open thing. You 
> suggested to use the hcall to enable performance monitoring and I looked 
> at the definition. The hcall currently contains a lot of information 
> like perf granularity, function pointer, ...

There is no function pointer. There is "high"/"low" granularity. I
haven't really looked into this area so I'm not sure what those
correspond to, but at worst we could ignore them for now.

> Currently I expect to need only to set a interdomain valid flag telling 
> xen "there is some profiling in progress" and optional a per domain flag 
> "this one is currently profiling" via an hcall for the first step of the 
> implementation. Because the guest can write all performance special 
> purpose registers xen needs only this flag to know if it has to 
> store/recover the perfmon registers.
> We will need to restore MSR0/1,MSRA, PMC also for non-profiling guests 
> in context switch from a profiling one to non profiling guests, because 
> of that the easiest first implementation is something like the following 
> in context_switch().
> ...
> if (perf_mon_in_use) {
>    save/restore  MSR0/1,MSRA,PMC's
> }
> ...
> This will become more sophisticated in future but I currently expect 
> that we will not need the function pointer or profiling granularity 
> there for guest sampling. The only thing I currently expect for the 
> function pointer is to tell xen the place where to report hypervisor 
> samples in one of the next implementation steps.
> Should/Can I use this complex hcall to set that simple flag e.g. by 
> skipping all other attributes or do we need a new one?

I think you should use the current H_PERFMON hcall. It's really not
complex...

-- 
Hollis Blanchard
IBM Linux Technology Center


_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel