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: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
Subject: Re: [XenPPC] Profiling in xen – ppc considerations
From: Christian Ehrhardt <ehrhardt@xxxxxxxxxxxxxxxxxx>
Date: Mon, 19 Mar 2007 15:48:28 +0100
Cc: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 19 Mar 2007 07:47:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <547D9AEA-9614-4D5E-9F65-4CEAF6AD6B92@xxxxxxxxxxxxxx>
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>
References: <45F6DB41.4040008@xxxxxxxxxxxxxxxxxx> <547D9AEA-9614-4D5E-9F65-4CEAF6AD6B92@xxxxxxxxxxxxxx>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.10 (X11/20070301)
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, ... 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?


--

Grüsse / regards, Christian Ehrhardt

IBM Linux Technology Center, Open Virtualization
+49 7031/16-3385
Ehrhardt@xxxxxxxxxxxxxxxxxxx
Ehrhardt@xxxxxxxxxx

IBM Deutschland Entwicklung GmbH
Vorsitzender des Aufsichtsrats: Johann Weihen Geschäftsführung: Herbert Kircher Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294


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