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] Sync against scheduler tail on other CPUs when context

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Sync against scheduler tail on other CPUs when context
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 17 Jan 2006 13:24:06 +0000
Delivery-date: Tue, 17 Jan 2006 13:31:56 +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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 1b7d6c2ae2f7626facde3dc61aa899204ada2da8
# Parent  6ce7c026320e4d27c4782168bfddbb10254b18c7
Sync against scheduler tail on other CPUs when context
switching to a new VCPU. Otherwise we cannot pull the 
VCPU's state off the other CPU.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 6ce7c026320e -r 1b7d6c2ae2f7 xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c     Mon Jan 16 23:54:24 2006
+++ b/xen/arch/x86/domain.c     Tue Jan 17 12:25:30 2006
@@ -738,8 +738,12 @@
     ASSERT(cpus_weight(dirty_mask) <= 1);
     if ( unlikely(!cpu_isset(cpu, dirty_mask) && !cpus_empty(dirty_mask)) )
     {
+        /* Make sure the next VCPU is not in a scheduling tail. */
+        while ( test_bit(_VCPUF_running, &next->vcpu_flags) )
+            cpu_relax();
         /* Other cpus call __sync_lazy_execstate from flush ipi handler. */
-        flush_tlb_mask(dirty_mask);
+        if ( !cpus_empty(next->vcpu_dirty_cpumask) )
+            flush_tlb_mask(next->vcpu_dirty_cpumask);
     }
 
     local_irq_disable();

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Sync against scheduler tail on other CPUs when context, Xen patchbot -unstable <=