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

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



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1224579880 -3600
# Node ID 459f7ca6cf2abefab955945cd2c3eeace10be2a9
# Parent  dacc54242a6361418139ceb336d8741b51d7872b
pv-on-hvm: Avoid rwlock livelock on save/restore.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c |   14 -------------
 1 files changed, 1 insertion(+), 13 deletions(-)

diff -r dacc54242a63 -r 459f7ca6cf2a 
unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c
--- a/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c        Tue Oct 
21 09:53:34 2008 +0100
+++ b/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c        Tue Oct 
21 10:04:40 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®.