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

Re: [Xen-devel] [PATCH] Add a timer mode that disables pending missed ticks



On 7/11/07 16:23, "Dave Winchell" <dwinchell@xxxxxxxxxxxxxxx> wrote:

> I'm concerned about the way delay is blown off in the final calculation
> 
>             vxtime.last_tsc = tsc -
>                 (((long) offset << 32) / vxtime.tsc_quot) - 1;
> 
> If an interrupt is right on time, and the delay is the same as last time,
> then the offset should be zero in my mind. In the code above, offset will
> equal delay for this example.
> 
> What do you think?

I don't think this code likes the ASYNC method *at all*. The reason is that
it estimates how late the tick interrupt is by reading the PIT counter. It
knows the interrupt should have been triggered when the counter wrapped at
zero. But of course, if we are delivering ticks in ASYNC mode then quickly
the time we deliver an interrupt has *nothing* to do with the current PIT
counter value! Hence the lines that effectively fold max(offset, delay) into
last_tsc are just not going to work properly, because delay is a uniform
random variable, and hence we probably lose time.

Let me see if I can come up with a patch that gets the best of ASYNC and
SYNC in one handy mode...

 -- Keir



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


 


Rackspace

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