xen: use s_time_t for periodic timer deadlines.
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 8 Jul 2010 08:52:34 +0000 (09:52 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 8 Jul 2010 08:52:34 +0000 (09:52 +0100)
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@citrix.com>
xen/common/schedule.c
xen/include/xen/sched.h

index 3ad2167fdf755f5174d1050742238174cfa3347c..40648c37bbf2f2912006edbde22d7e4d6c577e23 100644 (file)
@@ -992,7 +992,7 @@ long sched_adjust_global(struct xen_sysctl_scheduler_op *op)
 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;
index e78a0948b7bfb128d1fc8bf5d11304d60b55765c..0d21cee9f931264554a0b1d9a0ae2059bfebb7ae 100644 (file)
@@ -89,8 +89,8 @@ struct vcpu
 
     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;