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

[Xen-changelog] [xen-unstable] xen: use s_time_t for periodic timer dead

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xen: use s_time_t for periodic timer deadlines.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 08 Jul 2010 02:10:54 -0700
Delivery-date: Thu, 08 Jul 2010 02:17:01 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1278579154 -3600
# Node ID db35740574a5302e535e1268d0e62ffcac95b213
# Parent  8fe12d6816dbf50257c0c62f288aa784f13a6e29
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>
---
 xen/common/schedule.c   |    2 +-
 xen/include/xen/sched.h |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff -r 8fe12d6816db -r db35740574a5 xen/common/schedule.c
--- a/xen/common/schedule.c     Thu Jul 08 09:52:01 2010 +0100
+++ b/xen/common/schedule.c     Thu Jul 08 09:52:34 2010 +0100
@@ -992,7 +992,7 @@ static void vcpu_periodic_timer_work(str
 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 8fe12d6816db -r db35740574a5 xen/include/xen/sched.h
--- a/xen/include/xen/sched.h   Thu Jul 08 09:52:01 2010 +0100
+++ b/xen/include/xen/sched.h   Thu Jul 08 09:52:34 2010 +0100
@@ -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;
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xen: use s_time_t for periodic timer deadlines., Xen patchbot-unstable <=