[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-ia64-devel] [PATCH][3/3] Steal time accounting for PVdomain/IA64 TAKE2



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.