direct-io.hg
changeset 319:e081ed2ebcd0
bitkeeper revision 1.139 (3e746886iIJO2rkDZNBmhpXjOoUrtA)
updated version for schedule()
updated version for schedule()
author | rn@wyvis.research.intel-research.net |
---|---|
date | Sun Mar 16 12:05:26 2003 +0000 (2003-03-16) |
parents | cbf03b1763cf 74019ac2d6ba |
children | e27bfabd1b5a |
files | xen/common/schedule.c |
line diff
1.1 --- a/xen/common/schedule.c Sun Mar 16 11:22:36 2003 +0000 1.2 +++ b/xen/common/schedule.c Sun Mar 16 12:05:26 2003 +0000 1.3 @@ -249,11 +249,16 @@ asmlinkage void schedule(void) 1.4 need_resched_back: 1.5 perfc_incrc(sched_run2); 1.6 1.7 - now = NOW(); 1.8 + 1.9 + prev = current; 1.10 next = NULL; 1.11 - prev = current; 1.12 + 1.13 this_cpu = prev->processor; 1.14 1.15 + spin_lock_irq(&schedule_data[this_cpu].lock); 1.16 + 1.17 + now = NOW(); 1.18 + 1.19 /* remove timer */ 1.20 rem_ac_timer(&schedule_data[this_cpu].s_timer); 1.21 1.22 @@ -261,11 +266,10 @@ asmlinkage void schedule(void) 1.23 * deschedule the current domain 1.24 */ 1.25 1.26 - spin_lock_irq(&schedule_data[this_cpu].lock); 1.27 - 1.28 ASSERT(!in_interrupt()); 1.29 ASSERT(__task_on_runqueue(prev)); 1.30 1.31 + 1.32 if (is_idle_task(prev)) 1.33 goto deschedule_done; 1.34 1.35 @@ -363,7 +367,7 @@ asmlinkage void schedule(void) 1.36 * work out how long 'next' can run till its evt is greater than 1.37 * 'next_prime's evt. Taking context switch allowance into account. 1.38 */ 1.39 - ASSERT(next_prime->evt > next->evt); 1.40 + ASSERT(next_prime->evt >= next->evt); 1.41 r_time = ((next_prime->evt - next->evt)/next->mcu_advance) + ctx_allow; 1.42 1.43 sched_done: 1.44 @@ -389,7 +393,7 @@ asmlinkage void schedule(void) 1.45 timer_redo: 1.46 schedule_data[this_cpu].s_timer.expires = now + r_time; 1.47 if (add_ac_timer(&schedule_data[this_cpu].s_timer) == 1) { 1.48 - printk("SCHED[%02d]: Shit this shouldn't happen %08x\n", 1.49 + printk("SCHED[%02d]: Shit this shouldn't happen r_time=%lu\n", 1.50 this_cpu, r_time); 1.51 now = NOW(); 1.52 goto timer_redo;