It is inappropriate to allow anything more than the absolute minimum run on wrong CPU. This may have been causing hangs on suspend to ram. -ck Index: linux-2.6.36-ck2/kernel/sched_bfs.c =================================================================== --- linux-2.6.36-ck2.orig/kernel/sched_bfs.c 2010-12-01 09:16:21.336527687 +1100 +++ linux-2.6.36-ck2/kernel/sched_bfs.c 2010-12-01 15:18:16.112469768 +1100 @@ -1313,10 +1313,10 @@ return; } - if (online_cpus(p)) + if (likely(online_cpus(p))) cpus_and(tmp, cpu_online_map, p->cpus_allowed); else - (cpumask_copy(&tmp, &cpu_online_map)); + return; latest_deadline = 0; highest_prio = -1; @@ -1480,6 +1480,7 @@ struct rq *rq = task_rq(p); bool success = false; + WARN_ON(rq != this_rq()); BUG_ON(p == current); lockdep_assert_held(&grq.lock); @@ -2764,7 +2765,7 @@ prev->last_ran = rq->clock; /* Task changed affinity off this CPU */ - if (needs_other_cpu(prev, cpu)) + if (unlikely(!cpu_isset(cpu, prev->cpus_allowed))) resched_suitable_idle(prev); else if (!deactivate) { if (!queued_notrunning()) {