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 for PVdomain/IA6

To: Atsushi SAKAI <sakaia@xxxxxxxxxxxxxx>
Subject: Re: [Xen-ia64-devel] [PATCH][3/3] Steal time accounting for PVdomain/IA64 TAKE2
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Thu, 8 May 2008 20:48:46 +0900
Cc: Aron Griffis <aron@xxxxxx>, xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 08 May 2008 04:48:59 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200805081103.m48B38gS029200@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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: <20080507034538.GI16718%yamahata@xxxxxxxxxxxxx> <200805081103.m48B38gS029200@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6i
On Thu, May 08, 2008 at 08:03:02PM +0900, Atsushi SAKAI wrote:
> stolen time and blocked time are counted on Xen Hypervisor.
> PV kernel just use these information.
> The timer interrupt checks 
> both (stolen and blocked) time difference
> from previous interrupt.
> 
> For this reason,
> PV kernel does not need to know the time
> when the timer interrupt handler was invoked.

I see.


> static unsigned long 
> consider_steal_time(unsigned long new_itm, struct pt_regs *regs)
...
>        unsigned long delta_itm = 0, stolentick = 0;
...
>        if (!time_after(delta_itm + new_itm, ia64_get_itc()))
>                stolentick = ia64_get_itc() - delta_itm - new_itm;

Why do you set 
stolentick = ia64_get_itc() - delta_itm - new_itm
with delat_itm = 0 here?
'- delta_itm' doesn't make sense.

>         do_div(stolentick, NS_PER_TICK);
>         stolentick++;
> 
>         do_div(stolen, NS_PER_TICK);
> 
>         if (stolen > stolentick)
>                 stolen = stolentick;
> 
>         stolentick -= stolen;
>         do_div(blocked, NS_PER_TICK);
> 
>         if (blocked > stolentick)
>                 blocked = stolentick;

Could you please explain the above logic?
I guess that stolentick should be
ia64_get_itc() - (the itc of the last time 
                  the timer interrupt handler was invoked)
or something like that.
What is your intention with stolentick, stolen and blocked?

-- 
yamahata

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