[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Remove the spin on VCPUF_running from context_switch().
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |