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

[Xen-devel] [PATCH] xen: use s_time_t for periodic timer deadlines

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] xen: use s_time_t for periodic timer deadlines
From: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Date: Wed, 7 Jul 2010 14:39:13 +0100
Delivery-date: Wed, 07 Jul 2010 06:40:04 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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
User-agent: Mutt/1.5.18 (2008-05-17)
xen: use s_time_t for periodic timer deadlines.  
Otherwise vcpu_periodic_timer_work() can think the next timer is in the
future (and re-issue it unchanged) while timer_softirq_action() thinks 
it's in the past (and fires it immediately), leading to livelock.

Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>

diff -r e316ad18de3c xen/common/schedule.c
--- a/xen/common/schedule.c     Wed Jul 07 11:27:36 2010 +0100
+++ b/xen/common/schedule.c     Wed Jul 07 14:33:39 2010 +0100
@@ -992,7 +992,7 @@
 static void vcpu_periodic_timer_work(struct vcpu *v)
 {
     s_time_t now = NOW();
-    uint64_t periodic_next_event;
+    s_time_t periodic_next_event;
 
     if ( v->periodic_period == 0 )
         return;
diff -r e316ad18de3c xen/include/xen/sched.h
--- a/xen/include/xen/sched.h   Wed Jul 07 11:27:36 2010 +0100
+++ b/xen/include/xen/sched.h   Wed Jul 07 14:33:39 2010 +0100
@@ -89,8 +89,8 @@
 
     struct vcpu     *next_in_list;
 
-    uint64_t         periodic_period;
-    uint64_t         periodic_last_event;
+    s_time_t         periodic_period;
+    s_time_t         periodic_last_event;
     struct timer     periodic_timer;
     struct timer     singleshot_timer;
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] xen: use s_time_t for periodic timer deadlines, Tim Deegan <=