diff -Naurp linux-2.6.0-test3-bk8-numasched/kernel/sched.c linux-2.6.0-test3-bk8-numasched2/kernel/sched.c --- linux-2.6.0-test3-bk8-numasched/kernel/sched.c 2003-08-22 12:03:30.000000000 -0500 +++ linux-2.6.0-test3-bk8-numasched2/kernel/sched.c 2003-08-22 12:14:09.000000000 -0500 @@ -1261,7 +1261,7 @@ static void rebalance_tick(runqueue_t *t if (idle) { while (node) { - if (!(j % node->idle_rebalance_tick)) + if (!(j % node->idle_rebalance_tick) && (node->nr_cpus > 1)) balance_node(this_rq, idle, last_node, node); last_node = node; node = node->parent_node; @@ -1269,7 +1269,7 @@ static void rebalance_tick(runqueue_t *t return; } while (node) { - if (!(j % node->busy_rebalance_tick)) + if (!(j % node->busy_rebalance_tick) && (node->nr_cpus > 1)) balance_node(this_rq, idle, last_node, node); last_node = node; node = node->parent_node; @@ -1405,6 +1405,7 @@ asmlinkage void schedule(void) runqueue_t *rq; prio_array_t *array; struct list_head *queue; + struct node_t *node; int idx; /* @@ -1449,8 +1450,10 @@ need_resched: pick_next_task: if (unlikely(!rq->nr_running)) { #ifdef CONFIG_SMP - if (rq->node) - load_balance(rq, 1, rq->node); + node = rq->node; + while (node->nr_cpus < 2 && node != top_node) + node = node->parent_node; + load_balance(rq, 1, node); if (rq->nr_running) goto pick_next_task; #endif