
From: Con Kolivas <kernel@kolivas.org>

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@kolivas.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/kernel/sched.c |    4 +---
 1 files changed, 1 insertion(+), 3 deletions(-)

diff -puN kernel/sched.c~requeue_granularity kernel/sched.c
--- 25/kernel/sched.c~requeue_granularity	2004-12-03 20:56:31.735935592 -0800
+++ 25-akpm/kernel/sched.c	2004-12-03 20:56:31.743934376 -0800
@@ -2399,10 +2399,8 @@ void scheduler_tick(int user_ticks, int 
 			(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:
_
