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] Fix the logic in vcpu_sleep_sync(): we must wait until

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix the logic in vcpu_sleep_sync(): we must wait until
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 13 Sep 2005 19:10:10 +0000
Delivery-date: Tue, 13 Sep 2005 19:08:38 +0000
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 3a34bcb7c28b49877bbcf31fa3985ecb5651eae2
# Parent  fe5b84a24d43cc0f4726be16402e31538edb3a20
Fix the logic in vcpu_sleep_sync(): we must wait until
the running flag is cleared *and* the scheduler lock is
released. Not just one or the other.

Signed-off-by: Ryan Harper <ryanh@xxxxxxxxxx>

diff -r fe5b84a24d43 -r 3a34bcb7c28b xen/common/schedule.c
--- a/xen/common/schedule.c     Tue Sep 13 18:03:04 2005
+++ b/xen/common/schedule.c     Tue Sep 13 19:09:44 2005
@@ -211,11 +211,12 @@
 
     /*
      * We can be sure that the VCPU is finally descheduled after the running
-     * flag is cleared and the scheduler lock is released.
+     * flag is cleared and the scheduler lock is released. We also check that
+     * the domain continues to be unrunnable, in case someone else wakes it.
      */
-    while ( test_bit(_VCPUF_running, &v->vcpu_flags)
-            && !domain_runnable(v)
-            && spin_is_locked(&schedule_data[v->processor].schedule_lock) )
+    while ( !domain_runnable(v) &&
+            (test_bit(_VCPUF_running, &v->vcpu_flags) ||
+             spin_is_locked(&schedule_data[v->processor].schedule_lock)) )
         cpu_relax();
 
     sync_vcpu_execstate(v);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix the logic in vcpu_sleep_sync(): we must wait until, Xen patchbot -unstable <=