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-3.1-testing] domain_shutdown() needs to vcpu_pause_

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.1-testing] domain_shutdown() needs to vcpu_pause_nosync() rather than directly
From: "Xen patchbot-3.1-testing" <patchbot-3.1-testing@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 20 Mar 2008 05:41:59 -0700
Delivery-date: Thu, 20 Mar 2008 05:49:05 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1206015850 0
# Node ID fea5a34271483e8f6be684932e0adbb885991715
# Parent  ccdea325953468a5172f5b9124a050fcbea0a6a3
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-unstable changeset:   17234:b2a3fe7f5591e3358aede7d05a4e8705e49ae13d
xen-unstable date:        Tue Mar 18 15:23:25 2008 +0000
---
 xen/common/domain.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff -r ccdea3259534 -r fea5a3427148 xen/common/domain.c
--- a/xen/common/domain.c       Thu Mar 20 12:23:14 2008 +0000
+++ b/xen/common/domain.c       Thu Mar 20 12:24:10 2008 +0000
@@ -86,10 +86,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);
 }
 
@@ -102,7 +98,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);
@@ -389,7 +385,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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.1-testing] domain_shutdown() needs to vcpu_pause_nosync() rather than directly, Xen patchbot-3.1-testing <=