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] Fix smp_processor_id to be linked to correct processor i

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix smp_processor_id to be linked to correct processor id under vcpu, which is
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 21 Dec 2005 20:42:14 +0000
Delivery-date: Wed, 21 Dec 2005 20:46:17 +0000
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 djm@xxxxxxxxxxxxxxx
# Node ID 97d70c793b67fcd93b9f44529c81d8a9e1eaad63
# Parent  ff81b875b1364ad7113f7b2eca26d8052e08dcf4
Fix smp_processor_id to be linked to correct processor id under vcpu, which is
the exact one updated by scheduler. Or else easy to think how things get
messed under SMP environment. One phenomenon observed is about softirq.
Exit path on CPU1 checks pending indicator by local_cpu_data, and then
goto do_softirq if pending true. However do_softirq uses cpu_data(cpu)
to query pending bit again. Cpu index is aquired from smp_processor_id,
with thread_info->cpu not cared by scheduler. Finally do_softirq on CPU1
tries to operate percpu data on CPU0 then.

Also disable several prints within critical path, like sending IPI. Due to
slow serial speed, this will slow down overall performance heavily since
event channels among CPUs are in traffic.

This patch is necessary for host SMP.

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

diff -r ff81b875b136 -r 97d70c793b67 xen/arch/ia64/linux-xen/irq_ia64.c
--- a/xen/arch/ia64/linux-xen/irq_ia64.c        Wed Dec 21 14:36:03 2005
+++ b/xen/arch/ia64/linux-xen/irq_ia64.c        Wed Dec 21 14:40:16 2005
@@ -282,7 +282,7 @@
        ipi_addr = ipi_base_addr + ((phys_cpu_id << 4) | ((redirect & 1) << 3));
 
 #ifdef XEN
-       printf ("send_ipi to %d (%x)\n", cpu, phys_cpu_id);
+       //printf ("send_ipi to %d (%x)\n", cpu, phys_cpu_id);
 #endif
        writeq(ipi_data, ipi_addr);
 }
diff -r ff81b875b136 -r 97d70c793b67 xen/arch/ia64/linux-xen/smp.c
--- a/xen/arch/ia64/linux-xen/smp.c     Wed Dec 21 14:36:03 2005
+++ b/xen/arch/ia64/linux-xen/smp.c     Wed Dec 21 14:40:16 2005
@@ -73,7 +73,7 @@
     if (cpus_empty(mask))
         return;
 
-    printf("smp_send_event_check_mask called\n");
+    //printf("smp_send_event_check_mask called\n");
 
     for (cpu = 0; cpu < NR_CPUS; ++cpu)
         if (cpu_isset(cpu, mask))
diff -r ff81b875b136 -r 97d70c793b67 xen/arch/ia64/vmx/vmx_irq_ia64.c
--- a/xen/arch/ia64/vmx/vmx_irq_ia64.c  Wed Dec 21 14:36:03 2005
+++ b/xen/arch/ia64/vmx/vmx_irq_ia64.c  Wed Dec 21 14:40:16 2005
@@ -117,9 +117,6 @@
                local_irq_disable();
                ia64_setreg(_IA64_REG_CR_TPR, saved_tpr);
            }
-           else {
-                printf("Oops: RESCHEDULE IPI absorbed by HV\n");
-            }
            ia64_eoi();
            vector = ia64_get_ivr();
        }
diff -r ff81b875b136 -r 97d70c793b67 xen/include/asm-ia64/config.h
--- a/xen/include/asm-ia64/config.h     Wed Dec 21 14:36:03 2005
+++ b/xen/include/asm-ia64/config.h     Wed Dec 21 14:40:16 2005
@@ -300,7 +300,7 @@
 
 // needed for include/xen/smp.h
 #ifdef CONFIG_SMP
-#define __smp_processor_id()   current_thread_info()->cpu
+#define __smp_processor_id()   current->processor
 #else
 #define __smp_processor_id()   0
 #endif

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix smp_processor_id to be linked to correct processor id under vcpu, which is, Xen patchbot -unstable <=