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] acpi sleep: domain_freeze() pauses all vc

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] acpi sleep: domain_freeze() pauses all vcpus, but does not sync the
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 16 Apr 2010 21:50:21 -0700
Delivery-date: Sun, 18 Apr 2010 11:07:46 -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 1271330460 -3600
# Node ID 9d5ecf79f1b51bbf2979b6f2830868e50acd3419
# Parent  11423ce78ee0ff314351c10842dcac9af6e11d1e
acpi sleep: domain_freeze() pauses all vcpus, but does not sync the
current vcpu (since that would obviously deadlock).

This simplifies thaw_domains() which is required now that thawing can
happen in deifferent context to freeze_domains().

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/acpi/power.c |   27 +++++++--------------------
 1 files changed, 7 insertions(+), 20 deletions(-)

diff -r 11423ce78ee0 -r 9d5ecf79f1b5 xen/arch/x86/acpi/power.c
--- a/xen/arch/x86/acpi/power.c Thu Apr 15 11:36:20 2010 +0100
+++ b/xen/arch/x86/acpi/power.c Thu Apr 15 12:21:00 2010 +0100
@@ -82,16 +82,12 @@ static void freeze_domains(void)
     rcu_read_lock(&domlist_read_lock);
     for_each_domain ( d )
     {
-        switch ( d->domain_id )
+        for_each_vcpu ( d, v )
         {
-        case 0:
-            for_each_vcpu ( d, v )
-                if ( v != current )
-                    vcpu_pause(v);
-            break;
-        default:
-            domain_pause(d);
-            break;
+            if ( v != current )
+                vcpu_pause(v);
+            else
+                vcpu_pause_nosync(v);
         }
     }
     rcu_read_unlock(&domlist_read_lock);
@@ -105,17 +101,8 @@ static void thaw_domains(void)
     rcu_read_lock(&domlist_read_lock);
     for_each_domain ( d )
     {
-        switch ( d->domain_id )
-        {
-        case 0:
-            for_each_vcpu ( d, v )
-                if ( v != current )
-                    vcpu_unpause(v);
-            break;
-        default:
-            domain_unpause(d);
-            break;
-        }
+        for_each_vcpu ( d, v )
+            vcpu_unpause(v);
     }
     rcu_read_unlock(&domlist_read_lock);
 }

_______________________________________________
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] acpi sleep: domain_freeze() pauses all vcpus, but does not sync the, Xen patchbot-unstable <=