aboutsummaryrefslogtreecommitdiffstats
path: root/xen
diff options
context:
space:
mode:
authormwilli2@equilibrium.research.intel-research.net <mwilli2@equilibrium.research.intel-research.net>2004-05-21 10:08:22 +0000
committermwilli2@equilibrium.research.intel-research.net <mwilli2@equilibrium.research.intel-research.net>2004-05-21 10:08:22 +0000
commit68daa78a0de26bd75ae39d91adf1b93513ab1624 (patch)
treee7d3e72925bb79d8b7da519532d8ee30e980742e /xen
parentc5d63dfc853a34d5af27b54d4456fbff11bf9cd8 (diff)
downloadxen-68daa78a0de26bd75ae39d91adf1b93513ab1624.tar.gz
xen-68daa78a0de26bd75ae39d91adf1b93513ab1624.tar.bz2
xen-68daa78a0de26bd75ae39d91adf1b93513ab1624.zip
bitkeeper revision 1.916.1.1 (40add516MWMX6XyHleHPhDU0Xn3ZHg)
Tweak to fix unblocking warping - this change has only been tested with BVT!!!
Diffstat (limited to 'xen')
-rw-r--r--xen/common/sched_bvt.c4
-rw-r--r--xen/common/schedule.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/xen/common/sched_bvt.c b/xen/common/sched_bvt.c
index cfd1bc9656..fd5f4945d0 100644
--- a/xen/common/sched_bvt.c
+++ b/xen/common/sched_bvt.c
@@ -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);
diff --git a/xen/common/schedule.c b/xen/common/schedule.c
index 5aa12bf8cb..2eb50309b5 100644
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -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;