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] x86: time_calibration_rendezvous must be

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: time_calibration_rendezvous must be invoked with @wait=1.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 29 Aug 2008 08:30:21 -0700
Delivery-date: Fri, 29 Aug 2008 08:31:12 -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 1219926709 -3600
# Node ID a37902923a67ca9c251cfff4038f01f48dd21558
# Parent  b674d71595497d85a19508664f8d4b442481b0ab
x86: time_calibration_rendezvous must be invoked with @wait=1.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/time.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)

diff -r b674d7159549 -r a37902923a67 xen/arch/x86/time.c
--- a/xen/arch/x86/time.c       Thu Aug 28 13:09:02 2008 +0100
+++ b/xen/arch/x86/time.c       Thu Aug 28 13:31:49 2008 +0100
@@ -1008,6 +1008,7 @@ static void time_calibration_rendezvous(
         while ( atomic_read(&r->nr_cpus) != (total_cpus - 1) )
             cpu_relax();
         r->master_stime = read_platform_stime();
+        mb(); /* write r->master_stime /then/ signal */
         atomic_inc(&r->nr_cpus);
     }
     else
@@ -1015,6 +1016,7 @@ static void time_calibration_rendezvous(
         atomic_inc(&r->nr_cpus);
         while ( atomic_read(&r->nr_cpus) != total_cpus )
             cpu_relax();
+        mb(); /* receive signal /then/ read r->master_stime */
     }
 
     rdtscll(c->local_tsc_stamp);
@@ -1030,7 +1032,8 @@ static void time_calibration(void *unuse
         .nr_cpus = ATOMIC_INIT(0)
     };
 
-    on_each_cpu(time_calibration_rendezvous, &r, 0, 0);
+    /* @wait=1 because we must wait for all cpus before freeing @r. */
+    on_each_cpu(time_calibration_rendezvous, &r, 0, 1);
 }
 
 void init_percpu_time(void)

_______________________________________________
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] x86: time_calibration_rendezvous must be invoked with @wait=1., Xen patchbot-unstable <=