Subject: Re: Collecting hypervisor call stats

From: Benjamin Herrenschmidt <[email-masked]>
Date: Fri, 02 Jun 2006 07:57:23 +1000

On Thu, 2006-06-01 at 20:14 +0200, Arnd Bergmann wrote:
> On Thursday 01 June 2006 07:26, Benjamin Herrenschmidt wrote:
> > 
> > > We need to get a timestamp before and after the call.  mftb should do
> > > the trick.  Also, I'd prefer to have the code that stuffs the values
> > > into the array be C.  So, the decision is to have the assembly code
> > > call out to the C routine -OR- create wrappers for the assembly routines.
> > > I much prefer C wrappers to touching the assembly.
> > 
> > Argh... yet another use of mftb for which I'll need a cell specific
> > workaround 
> 
> I guess for statistics, we should rather avoid that overhead (and
> document the fact that we did on purpose).

Well.. if we can at one point "detect" the totally bogus value (the
timestamp going massively backward) and fix it up there, ok. Might be an
option.

> How fast is mftb really? Would that be significant compared to the
> time spent in a fast hcall?

Not sure, I would expect a few dozens cycles at least though... 

Ben.