bitkeeper revision 1.916.1.1 (40add516MWMX6XyHleHPhDU0Xn3ZHg)
authormwilli2@equilibrium.research.intel-research.net <mwilli2@equilibrium.research.intel-research.net>
Fri, 21 May 2004 10:08:22 +0000 (10:08 +0000)
committermwilli2@equilibrium.research.intel-research.net <mwilli2@equilibrium.research.intel-research.net>
Fri, 21 May 2004 10:08:22 +0000 (10:08 +0000)
Tweak to fix unblocking warping - this change has only been tested with BVT!!!

xen/common/sched_bvt.c
xen/common/schedule.c

index cfd1bc96565f56939df17ee0100c27574d93ee02..fd5f4945d04a7a3682f1ac7fb8f3a37432687fc2 100644 (file)
@@ -170,6 +170,7 @@ void bvt_wake_up(struct task_struct *p)
 static void bvt_do_block(struct task_struct *p)
 {
     BVT_INFO(p)->warpback = 0; 
+       __del_from_runqueue(p);
 }
 
 /* Control the scheduler. */
@@ -266,7 +267,8 @@ static task_slice_t bvt_do_schedule(s_time_t now)
         
         __calc_evt(prev_inf);
         
-        __del_from_runqueue(prev);
+        if( __task_on_runqueue(prev))
+                       __del_from_runqueue(prev);
         
         if ( likely(prev->state == TASK_RUNNING) )
             __add_to_runqueue_tail(prev);
index 5aa12bf8cb170b7f694597d8d22fca0a80c13ef7..2eb50309b5176afef00bf7fb96b0b88366ccd457 100644 (file)
@@ -221,6 +221,7 @@ static long do_block(void)
     ASSERT(current->domain != IDLE_DOMAIN_ID);
     current->shared_info->vcpu_data[0].evtchn_upcall_mask = 0;
     current->state = TASK_INTERRUPTIBLE;
+    SCHED_OP(do_block, current);
     TRACE_2D(TRC_SCHED_BLOCK, current->domain, current);
     __enter_scheduler();
     return 0;
@@ -458,9 +459,10 @@ asmlinkage void __enter_scheduler(void)
     {
         /* this check is needed to avoid a race condition */
         if ( signal_pending(prev) )
+        {
             prev->state = TASK_RUNNING;
-        else
-            SCHED_OP(do_block, prev);
+            SCHED_OP(wake_up, prev);
+        }
     }
 
     prev->cpu_time += now - prev->lastschd;