|
|
|
|
|
|
|
|
|
|
xen-ia64-devel
Re: [Xen-ia64-devel] [PATCH][3/3] Steal time accounting forPVdomain/IA64
On Wed, May 14, 2008 at 06:24:07PM +0900, Atsushi SAKAI wrote:
> > local_cpu_data->itm_next can be past.
> > i.e. It can be smaller than ia64_get_itc() - local_cpu_data->itm_delta.
>
> As you know, the steal time accounting should count
> the time between previous interrupt to current interrupt.
>
> So I should define 3 time values.
> prev:(Previously accounted time) eq.1
> l->itm_next - l->itm_delta
> last:(Expected Interrupt time) eq.2
> l->itm_next
> current:(Current Interrupt Time) eq.3
> l->itm_next + alpha(=ia64_get_itc())
>
> >From using prev:(eq.1) and current:(eq.3) eq.4
> stolentick( delta_cpu in x86) = l->itm_delta + alpha.
>
> >From eq.3 and subtract l->itm_delta. eq.5
> l->itm_next + alpha - l->itm_delta = ia64_get_itc() - l->itm_delta
>
> In eq.5,
> alpha - l->itm_delta is not guaranteed to positive.
> (it gets the value from - l->itm_delta to positive value.)
>
> l->itm_next can be past as you suggested,
> but It can not be always smaller than ia64_get_itc() -
> local_cpu_data->itm_delta.
> If only one domain is running on one cpu, alpha is very small.
> In this case, alpha - l->itm_delta goes to negative.
At last we're reaching to the point.
I had wanted to claim that the above "alpha" can easily become
larger than l->idm_delta.
You assumed that "If only one domain is running on one cpu",
but clearly this assumption is not always true.
What if many vCPU are running on same pCPU? It would be possible
that alpha can be large.
Even "If only one domain is running on one cpu",
assuming that "alpha is very small" would be a bad idea.
Yes, surely timer interrupt handler shouldn't take so long time,
and interruption shouldn't be masked for so long time.
But I'm not sure on loaded system. timer_interrupt() surely is
coded such that it is tolerable with large "alpha".
Why not with consider_steal_time()?
thanks,
--
yamahata
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
|
|
|
|
|