Skip to contentSkip to conversation

sched: remove on runqueue requeueing

PATCH New Con Kolivas 1 participant 1 message Feb 15, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched: remove on runqueue requeueing

Andrew please apply. Thanks Mike.

Cheers,
Con
---
On runqueue time is used to elevate priority in schedule().

In the code it currently requeues tasks even if their priority is not elevated, which would end up placing them at the end of their runqueue array effectively delaying them instead of improving their priority.

Bug spotted by Mike Galbraith <[email protected]>

This patch removes this requeueing.

 kernel/sched.c |    3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)
kernel/sched.c +1 -2
Index: linux-2.6.16-rc3-mm1/kernel/sched.c
===================================================================
@@ -3107,8 +3107,7 @@ go_idle:
 			dequeue_task(next, array);
 			next->prio = new_prio;
 			enqueue_task(next, array);
-		} else
-			requeue_task(next, array);
+		}
 	}
 	next->sleep_type = SLEEP_NORMAL;
 switch_tasks: