--- linux-2.6.0-test2-mm1/kernel/sched.c 2003-07-30 10:54:54.000000000 +1000 +++ linux-2.6.0-test2mm1O11/kernel/sched.c 2003-07-30 10:46:43.000000000 +1000 @@ -310,14 +310,6 @@ static inline void enqueue_task(struct t p->array = array; } -static inline void enqueue_head_task(struct task_struct *p, prio_array_t *array) -{ - list_add(&p->run_list, array->queue + p->prio); - __set_bit(p->prio, array->bitmap); - array->nr_active++; - p->array = array; -} - /* * effective_prio - return the priority that is based on the static * priority but is modified by bonuses/penalties. @@ -1305,13 +1297,10 @@ void scheduler_tick(int user_ticks, int * run out of sleep_avg to be expired, and when they * do they are put at the start of the expired array */ - if (unlikely(p->interactive_credit)){ - if (p->sleep_avg){ - enqueue_task(p, rq->active); - goto out_unlock; - } - enqueue_head_task(p, rq->expired); - } else + if (unlikely(p->interactive_credit && p->sleep_avg)){ + enqueue_task(p, rq->active); + goto out_unlock; + } enqueue_task(p, rq->expired); } else enqueue_task(p, rq->active);