Index: linux-2.6.8-rc3-mm1/kernel/sched.c
===================================================================
--- linux-2.6.8-rc3-mm1.orig/kernel/sched.c	2004-08-07 01:11:09.000000000 +1000
+++ linux-2.6.8-rc3-mm1/kernel/sched.c	2004-08-08 00:08:12.000000000 +1000
@@ -734,9 +734,11 @@
 	unsigned long sleep_time = now - p->timestamp;
 	unsigned long ns_totalrun = p->totalrun + p->runtime;
 	unsigned long total_run = NS_TO_JIFFIES(ns_totalrun);
-	if (p->flags & PF_FORKED || ((!(NS_TO_JIFFIES(p->runtime)) ||
-		!sched_interactive || sched_compute) &&
-		NS_TO_JIFFIES(p->runtime + sleep_time) < rr_interval(p))) {
+	if (p->flags & PF_FORKED || 
+		(NS_TO_JIFFIES(p->runtime + sleep_time) < 
+		rr_interval(p) / 2 || ((!sched_interactive || 
+		sched_compute) && NS_TO_JIFFIES(p->runtime + sleep_time) < 
+		rr_interval(p)))) {
 			p->flags &= ~PF_FORKED;
 			if (p->slice - total_run < 1) {
 				p->totalrun = 0;
@@ -998,7 +1000,7 @@
 {
 	if (p->prio > rq->curr->prio)
 		return 0;
-	if (p->prio == rq->curr->prio && (p->slice < slice(p) ||
+	if (p->prio == rq->curr->prio && (p->totalrun ||
 		rt_task(rq->curr)))
 			return 0;
 	if (!sched_compute || rq->cache_ticks >= cache_delay ||
