Hi, Isaku

  Thank you for your comments.
I comment with inline.

> 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.

> But what about stolen and blocked?

For blocked, 

The Hypervisor accounted blocked time is stored on
runstate->time[RUNSTATE_blocked]
The accounting of blocked time on PV is done on
per_cpu(processed_blocked_time, cpu).
And above difference is the time which should count on as blocked.

For stolen, 

The Hypervisor accounting stolen time is stored on
runstate->time[RUNSTATE_runnable] and
runstate->time[RUNSTATE_offline]
The accounting of stolen time on PV is done on
per_cpu(processed_stolen_time, cpu).
And above difference is the time which should count on as stolen.

===Additional Comment===
Of course, stolentick(delta_cpu) and processed_times are
 tracked by nanosecond.
But steal time account TICK is different (1/HZ).
So In some cases, stolentick = blocked + stolen (in TICK)


Thanks
Atsushi SAKAI


Isaku Yamahata <[EMAIL PROTECTED]> wrote:

> On Tue, May 13, 2008 at 08:24:33PM +0900, Atsushi SAKAI wrote:
> > The stolentick is composed of blocked, stolen and truely running time.
> > The consider_steal_time() only treats above blocked and stolen value.
> > So it does not need to add itm_delta more.
> 
> I understand what stolentick is.
> But what about stolen and blocked?
> local_cpu_data->itm_next can be past.
> i.e. It can be smaller than ia64_get_itc() - local_cpu_data->itm_delta.



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

Reply via email to