|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] acpi sleep: domain_freeze() pauses all vc
# 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 <=
|
|
|
|
|