--- linux-2.6.3-ck2/kernel/sched.c 2004-02-24 00:14:28.000000000 +1100 +++ linux-2.6.3-ck3pre/kernel/sched.c 2004-02-26 00:42:51.587726208 +1100 @@ -1770,6 +1770,7 @@ need_resched: array = rq->active; if (unlikely(!array->nr_active)) { +array_swap: /* * Switch the active and expired arrays. */ @@ -1815,6 +1816,14 @@ need_resched: ((next->static_prio > smt_curr->static_prio && (smt_curr->time_slice * SMT_SIBLING_IMPACT / 100) > task_timeslice(next)) || rt_task(smt_curr))) { + if (unlikely(rq->best_expired_prio < + next->static_prio )) + /* + * Check we're not going to peg + * higher priority tasks on the + * expired array + */ + goto array_swap; next = rq->idle; goto switch_tasks; }