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] Remove the spin on VCPUF_running from context_switch().

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Remove the spin on VCPUF_running from context_switch().
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 17 Jan 2006 14:22:06 +0000
Delivery-date: Tue, 17 Jan 2006 14:29: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 af7e4ce4665399f9468e85839013ce9c441edd53
# Parent  1b7d6c2ae2f7626facde3dc61aa899204ada2da8
Remove the spin on VCPUF_running from context_switch().
It doesn't work because we already set VCPUF_running
locally, and the scheduler should not pick another CPU's
VCPUF_running VCPU anyway, since it mustn't modify the 
processor field.

Instead just add a simple assertion to the scheduler to
ensure the scheduling algorithm is not picking an
inappropriate VCPU.

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

diff -r 1b7d6c2ae2f7 -r af7e4ce46653 xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c     Tue Jan 17 12:25:30 2006
+++ b/xen/arch/x86/domain.c     Tue Jan 17 13:24:42 2006
@@ -738,9 +738,6 @@
     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. */
         if ( !cpus_empty(next->vcpu_dirty_cpumask) )
             flush_tlb_mask(next->vcpu_dirty_cpumask);
diff -r 1b7d6c2ae2f7 -r af7e4ce46653 xen/common/schedule.c
--- a/xen/common/schedule.c     Tue Jan 17 12:25:30 2006
+++ b/xen/common/schedule.c     Tue Jan 17 13:24:42 2006
@@ -420,6 +420,7 @@
     }
 #endif
 
+    ASSERT(!test_bit(_VCPUF_running, &next->vcpu_flags));
     set_bit(_VCPUF_running, &next->vcpu_flags);
 
     spin_unlock_irq(&schedule_data[cpu].schedule_lock);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Remove the spin on VCPUF_running from context_switch()., Xen patchbot -unstable <=