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

Re: [Xen-devel] Question about hpet calls to set_timer

To: Beth Kon <eak@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Question about hpet calls to set_timer
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Sun, 17 Aug 2008 11:25:22 +0100
Cc:
Delivery-date: Sun, 17 Aug 2008 03:25:49 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1218825702.13649.8.camel@beth-ubuntu>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AckAU43qzD9QlGxGEd24dgAWy6hiGQ==
Thread-topic: [Xen-devel] Question about hpet calls to set_timer
User-agent: Microsoft-Entourage/11.4.0.080122
I might use 'hg anno' to see if anyone changed it to period for good reason,
but it seems to me that your suggested approach would be more accurate,
especially in the long run.

 -- Keir

On 15/8/08 19:41, "Beth Kon" <eak@xxxxxxxxxx> wrote:

> Hello. I'm looking over the Xen hpet.c to see what I can steal for the
> qemu implementation I'm working on. (Thank you kindly :-)
> 
> One thing that doesn't make sense to me is why, in hpet_timer_fn, the
> timer is set with:
> 
> set_timer(&h->timers[tn], NOW() + hpet_tick_to_ns(h, period));
> 
> rather than calculating the difference between the final value of the
> comparator (after the time_after loop) and the current time. This is the
> approach used in hpet_set_timer:
> 
> set_timer(&h->timers[tn], NOW() + hpet_tick_to_ns(h, diff));
> 
> and would seem to be the best way to get as close to the desired expire
> time as possible. Can someone explain why the approaches are different
> in these 2 places?



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

<Prev in Thread] Current Thread [Next in Thread>