Index: linux-2.6.11-ck7/kernel/sched.c
===================================================================
--- linux-2.6.11-ck7.orig/kernel/sched.c	2005-05-01 10:36:06.000000000 +1000
+++ linux-2.6.11-ck7/kernel/sched.c	2005-05-01 10:36:06.000000000 +1000
@@ -1197,6 +1197,13 @@ void fastcall wake_up_new_task(task_t * 
 	if (likely(cpu == this_cpu)) {
 		current->flags |= PF_FORKED;
 		activate_task(p, rq, 1);
+		if (!(clone_flags & CLONE_VM))
+			/*
+			 * The VM isn't cloned, so we're in a good position to
+			 * do child-runs-first in anticipation of an exec. This
+			 * usually avoids a lot of COW overhead.
+			 */
+			set_need_resched();
 		/*
 		 * We skip the following code due to cpu == this_cpu
 	 	 *
@@ -2082,15 +2089,13 @@ static void rebalance_tick(int this_cpu,
 			continue;
 
 		interval = sd->balance_interval;
-		if (idle != SCHED_IDLE)
-			interval *= sd->busy_factor;
 
 		/* scale ms to jiffies */
 		interval = msecs_to_jiffies(interval);
 		if (unlikely(!interval))
 			interval = 1;
 
-		if (j - sd->last_balance >= interval) {
+		if (idle != SCHED_IDLE || j - sd->last_balance >= interval) {
 			if (load_balance(this_cpu, this_rq, sd, idle)) {
 				/* We've pulled tasks over so no longer idle */
 				idle = NOT_IDLE;
@@ -2300,7 +2305,7 @@ void scheduler_tick(void)
 	int cpu = smp_processor_id();
 	runqueue_t *rq = this_rq();
 	task_t *p = current;
-	unsigned long debit;
+	unsigned long debit, expired_balance = rq->nr_running;
 
 	rq->timestamp_last_tick = sched_clock();
 
@@ -2322,8 +2327,10 @@ void scheduler_tick(void)
 	/*
 	 * SCHED_FIFO tasks never run out of timeslice.
 	 */
-	if (unlikely(p->policy == SCHED_FIFO))
+	if (unlikely(p->policy == SCHED_FIFO)) {
+		expired_balance = 0;
 		goto out;
+	}
 
 	spin_lock(&rq->lock);
 	debit = ns_diff(rq->timestamp_last_tick, p->timestamp);
@@ -2350,12 +2357,16 @@ void scheduler_tick(void)
 		goto out_unlock;
 	}
 	rq->cache_ticks++;
-	if (rq->preempted && rq->cache_ticks >= cache_delay)
+	if (rq->preempted && rq->cache_ticks >= cache_delay) {
 		set_tsk_need_resched(p);
+		goto out_unlock;
+	}
+	expired_balance = 0;
 out_unlock:
 	spin_unlock(&rq->lock);
 out:
-	rebalance_tick(cpu, rq, NOT_IDLE);
+	if (expired_balance > 1)
+		rebalance_tick(cpu, rq, NOT_IDLE);
 }
 
 #ifdef CONFIG_SCHED_SMT

