ia64/xen-unstable

changeset 1414:35bd92e934cb

bitkeeper revision 1.916.1.1 (40add516MWMX6XyHleHPhDU0Xn3ZHg)

Tweak to fix unblocking warping - this change has only been tested with BVT!!!
author mwilli2@equilibrium.research.intel-research.net
date Fri May 21 10:08:22 2004 +0000 (2004-05-21)
parents ba2029aefdd6
children 0681a064d114
files xen/common/sched_bvt.c xen/common/schedule.c
line diff
     1.1 --- a/xen/common/sched_bvt.c	Thu May 20 17:18:28 2004 +0000
     1.2 +++ b/xen/common/sched_bvt.c	Fri May 21 10:08:22 2004 +0000
     1.3 @@ -170,6 +170,7 @@ void bvt_wake_up(struct task_struct *p)
     1.4  static void bvt_do_block(struct task_struct *p)
     1.5  {
     1.6      BVT_INFO(p)->warpback = 0; 
     1.7 +	__del_from_runqueue(p);
     1.8  }
     1.9  
    1.10  /* Control the scheduler. */
    1.11 @@ -266,7 +267,8 @@ static task_slice_t bvt_do_schedule(s_ti
    1.12          
    1.13          __calc_evt(prev_inf);
    1.14          
    1.15 -        __del_from_runqueue(prev);
    1.16 +        if( __task_on_runqueue(prev))
    1.17 +			__del_from_runqueue(prev);
    1.18          
    1.19          if ( likely(prev->state == TASK_RUNNING) )
    1.20              __add_to_runqueue_tail(prev);
     2.1 --- a/xen/common/schedule.c	Thu May 20 17:18:28 2004 +0000
     2.2 +++ b/xen/common/schedule.c	Fri May 21 10:08:22 2004 +0000
     2.3 @@ -221,6 +221,7 @@ static long do_block(void)
     2.4      ASSERT(current->domain != IDLE_DOMAIN_ID);
     2.5      current->shared_info->vcpu_data[0].evtchn_upcall_mask = 0;
     2.6      current->state = TASK_INTERRUPTIBLE;
     2.7 +    SCHED_OP(do_block, current);
     2.8      TRACE_2D(TRC_SCHED_BLOCK, current->domain, current);
     2.9      __enter_scheduler();
    2.10      return 0;
    2.11 @@ -458,9 +459,10 @@ asmlinkage void __enter_scheduler(void)
    2.12      {
    2.13          /* this check is needed to avoid a race condition */
    2.14          if ( signal_pending(prev) )
    2.15 +        {
    2.16              prev->state = TASK_RUNNING;
    2.17 -        else
    2.18 -            SCHED_OP(do_block, prev);
    2.19 +            SCHED_OP(wake_up, prev);
    2.20 +        }
    2.21      }
    2.22  
    2.23      prev->cpu_time += now - prev->lastschd;