[PATCH] requeue at granularity intervals

From: Con Kolivas
Date: Tue Nov 02 2004 - 09:28:22 EST


requeue at granularity intervals

Change the granularity code to requeue tasks at their best priority
instead of changing priority while they're running. This keeps tasks at
their top interactive level during their whole timeslice.

Signed-off-by: Con Kolivas <kernel@xxxxxxxxxxx>

Index: linux-2.6.10-rc1-mm2/kernel/sched.c
===================================================================
--- linux-2.6.10-rc1-mm2.orig/kernel/sched.c 2004-11-03 00:55:48.638171430 +1100
+++ linux-2.6.10-rc1-mm2/kernel/sched.c 2004-11-03 00:57:50.863711719 +1100
@@ -2476,10 +2476,8 @@ void scheduler_tick(void)
(p->time_slice >= TIMESLICE_GRANULARITY(p)) &&
(p->array == rq->active)) {

- dequeue_task(p, rq->active);
+ requeue_task(p, rq->active);
set_tsk_need_resched(p);
- p->prio = effective_prio(p);
- enqueue_task(p, rq->active);
}
}
out_unlock:

Attachment: signature.asc
Description: OpenPGP digital signature