[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] domain_shutdown() needs to vcpu_pause_nosync() rather than directly



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1205853805 0
# Node ID b2a3fe7f5591e3358aede7d05a4e8705e49ae13d
# Parent  64b19db801b6ab63588e8fc767aa9c57bfc5a4aa
domain_shutdown() needs to vcpu_pause_nosync() rather than directly
incrementing the pause_count field. The latter ensures that the VCPU
gets descheduled --- synchronously in the case of the
currently-running VCPU.

Based on a bug report and proposed patch by Ben Guthro and Robert
Phillips of Virtual Iron.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/common/domain.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff -r 64b19db801b6 -r b2a3fe7f5591 xen/common/domain.c
--- a/xen/common/domain.c       Tue Mar 18 15:03:43 2008 +0000
+++ b/xen/common/domain.c       Tue Mar 18 15:23:25 2008 +0000
@@ -110,10 +110,6 @@ static void __domain_finalise_shutdown(s
             return;
 
     d->is_shut_down = 1;
-
-    for_each_vcpu ( d, v )
-        vcpu_sleep_nosync(v);
-
     send_guest_global_virq(dom0, VIRQ_DOM_EXC);
 }
 
@@ -126,7 +122,7 @@ static void vcpu_check_shutdown(struct v
     if ( d->is_shutting_down )
     {
         if ( !v->paused_for_shutdown )
-            atomic_inc(&v->pause_count);
+            vcpu_pause_nosync(v);
         v->paused_for_shutdown = 1;
         v->defer_shutdown = 0;
         __domain_finalise_shutdown(d);
@@ -426,7 +422,7 @@ void domain_shutdown(struct domain *d, u
     {
         if ( v->defer_shutdown )
             continue;
-        atomic_inc(&v->pause_count);
+        vcpu_pause_nosync(v);
         v->paused_for_shutdown = 1;
     }
 

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.