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-ia64-devel

Re: [Xen-ia64-devel] [PATCH][3/3] Steal time accounting forPVdomain/IA64

To: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Subject: Re: [Xen-ia64-devel] [PATCH][3/3] Steal time accounting forPVdomain/IA64 TAKE2
From: Atsushi SAKAI <sakaia@xxxxxxxxxxxxxx>
Date: Wed, 14 May 2008 18:24:07 +0900
Cc: Aron Griffis <aron@xxxxxx>, xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 14 May 2008 02:24:56 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20080514020728.GC17693%yamahata@xxxxxxxxxxxxx>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20080514020728.GC17693%yamahata@xxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
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 <yamahata@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel