direct-io.hg
changeset 8625:af7e4ce46653
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@xensource.com>
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@xensource.com>
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Tue Jan 17 14:24:42 2006 +0100 (2006-01-17) |
parents | 1b7d6c2ae2f7 |
children | e745c2e4acc0 |
files | xen/arch/x86/domain.c xen/common/schedule.c |
line diff
1.1 --- a/xen/arch/x86/domain.c Tue Jan 17 13:25:30 2006 +0100 1.2 +++ b/xen/arch/x86/domain.c Tue Jan 17 14:24:42 2006 +0100 1.3 @@ -738,9 +738,6 @@ void context_switch(struct vcpu *prev, s 1.4 ASSERT(cpus_weight(dirty_mask) <= 1); 1.5 if ( unlikely(!cpu_isset(cpu, dirty_mask) && !cpus_empty(dirty_mask)) ) 1.6 { 1.7 - /* Make sure the next VCPU is not in a scheduling tail. */ 1.8 - while ( test_bit(_VCPUF_running, &next->vcpu_flags) ) 1.9 - cpu_relax(); 1.10 /* Other cpus call __sync_lazy_execstate from flush ipi handler. */ 1.11 if ( !cpus_empty(next->vcpu_dirty_cpumask) ) 1.12 flush_tlb_mask(next->vcpu_dirty_cpumask);
2.1 --- a/xen/common/schedule.c Tue Jan 17 13:25:30 2006 +0100 2.2 +++ b/xen/common/schedule.c Tue Jan 17 14:24:42 2006 +0100 2.3 @@ -420,6 +420,7 @@ static void __enter_scheduler(void) 2.4 } 2.5 #endif 2.6 2.7 + ASSERT(!test_bit(_VCPUF_running, &next->vcpu_flags)); 2.8 set_bit(_VCPUF_running, &next->vcpu_flags); 2.9 2.10 spin_unlock_irq(&schedule_data[cpu].schedule_lock);