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

[Xen-changelog] [xen-3.2-testing] pv-on-hvm: Avoid rwlock livelock on save/restore.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1224587271 -3600
# Node ID bc01dd9f9da170d1c976ffc7bda288f498b6f0be
# Parent  99a1f08f997d8e3d49364f2b0800180997d0e29b
pv-on-hvm: Avoid rwlock livelock on save/restore.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
xen-unstable changeset:   18669:459f7ca6cf2abefab955945cd2c3eeace10be2a9
xen-unstable date:        Tue Oct 21 10:04:40 2008 +0100
---
 unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c |   14 -------------
 1 files changed, 1 insertion(+), 13 deletions(-)

diff -r 99a1f08f997d -r bc01dd9f9da1 
unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c
--- a/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c        Tue Oct 
21 12:07:22 2008 +0100
+++ b/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c        Tue Oct 
21 12:07:51 2008 +0100
@@ -10,12 +10,6 @@ struct ap_suspend_info {
        int      do_spin;
        atomic_t nr_spinning;
 };
-
-/*
- * Use a rwlock to protect the hypercall page from being executed in AP context
- * while the BSP is re-initializing it after restore.
- */
-static DEFINE_RWLOCK(suspend_lock);
 
 #ifdef CONFIG_SMP
 
@@ -33,12 +27,8 @@ static void ap_suspend(void *_info)
        atomic_inc(&info->nr_spinning);
        mb();
 
-       while (info->do_spin) {
+       while (info->do_spin)
                cpu_relax();
-               read_lock(&suspend_lock);
-               HYPERVISOR_yield();
-               read_unlock(&suspend_lock);
-       }
 
        mb();
        atomic_dec(&info->nr_spinning);
@@ -61,9 +51,7 @@ static int bp_suspend(void)
        suspend_cancelled = HYPERVISOR_suspend(0);
 
        if (!suspend_cancelled) {
-               write_lock(&suspend_lock);
                platform_pci_resume();
-               write_unlock(&suspend_lock);
                gnttab_resume();
                irq_resume();
        }

_______________________________________________
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®.