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

[Xen-changelog] Rev8517 (Reduce locked critical region in __enter_scheduler()), enable



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID b1b9049c4eb201b7b8a34598d4aae808021e11da
# Parent  806dfeb03d92a895815bf633def4f0306b8852a3
Rev8517 (Reduce locked critical region in __enter_scheduler()), enable
interrupt now before context switch. Then arch specific context_switch
stub needs to disable interrupt itself.

To solve some intermittent corruption.

Signed-off-by: Kevin Tian <kevin.tian@xxxxxxxxx>

diff -r 806dfeb03d92 -r b1b9049c4eb2 xen/arch/ia64/xen/xenmisc.c
--- a/xen/arch/ia64/xen/xenmisc.c       Wed Jan 25 10:12:34 2006
+++ b/xen/arch/ia64/xen/xenmisc.c       Wed Jan 25 10:44:39 2006
@@ -290,13 +290,9 @@
 
 void context_switch(struct vcpu *prev, struct vcpu *next)
 {
-//printk("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n");
-//printk("@@@@@@ context switch from domain %d (%x) to domain %d (%x)\n",
-//prev->domain->domain_id,(long)prev&0xffffff,next->domain->domain_id,(long)next&0xffffff);
-//if (prev->domain->domain_id == 1 && next->domain->domain_id == 0) cs10foo();
-//if (prev->domain->domain_id == 0 && next->domain->domain_id == 1) cs01foo();
-//printk("@@sw%d/%x %d->%d\n",smp_processor_id(), hard_smp_processor_id (),
-//       prev->domain->domain_id,next->domain->domain_id);
+    uint64_t spsr;
+
+    local_irq_save(spsr);
     if(VMX_DOMAIN(prev)){
        vtm_domain_out(prev);
     }
@@ -331,6 +327,7 @@
            if (vcpu_timer_expired(current)) vcpu_pend_timer(current);
     }
 
+    local_irq_restore(spsr);
     context_saved(prev);
 }
 

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