Fix one timer range issue
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 4 Dec 2008 14:12:08 +0000 (14:12 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 4 Dec 2008 14:12:08 +0000 (14:12 +0000)
According to the timer sematic, the timer can be executed at any timer
within [expires, expires_end], however, current implementation only allow
timer to be executed after expires_end, which is not conform to the timer
semantics.

This patch fix the the SPECpower score regression (~5% downgrade)
introduced by changeset 18744 "Change timer implementation to allow
variable 'slop'"

Signed-off-by: Yu Ke <ke.yu@intel.com>
xen/common/timer.c

index 97496dc5ac6f2f4f208120da6d4b65d523fcd113..d5f08d370f207ac31142beccf999b3add4769272 100644 (file)
@@ -396,7 +396,7 @@ static void timer_softirq_action(void)
 
     /* Execute ready heap timers. */
     while ( (GET_HEAP_SIZE(heap) != 0) &&
-            ((t = heap[1])->expires_end < now) )
+            ((t = heap[1])->expires < now) )
     {
         remove_from_heap(heap, t);
         t->status = TIMER_STATUS_inactive;
@@ -404,7 +404,7 @@ static void timer_softirq_action(void)
     }
 
     /* Execute ready list timers. */
-    while ( ((t = ts->list) != NULL) && (t->expires_end < now) )
+    while ( ((t = ts->list) != NULL) && (t->expires < now) )
     {
         ts->list = t->list_next;
         t->status = TIMER_STATUS_inactive;