diff --git a/[refs] b/[refs] index e45a7b20c7c8..f132c6d9385a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5517d86bea237c1d7078840182d9ebc0fe4c1afc +refs/heads/master: 4953198b6ce07b008b0f1c2edd41c9d027a118b4 diff --git a/trunk/kernel/sched.c b/trunk/kernel/sched.c index e4a5888549a5..e60786eb731c 100644 --- a/trunk/kernel/sched.c +++ b/trunk/kernel/sched.c @@ -1406,7 +1406,16 @@ static int wake_idle(int cpu, struct task_struct *p) struct sched_domain *sd; int i; - if (idle_cpu(cpu)) + /* + * If it is idle, then it is the best cpu to run this task. + * + * This cpu is also the best, if it has more than one task already. + * Siblings must be also busy(in most cases) as they didn't already + * pickup the extra load from this cpu and hence we need not check + * sibling runqueue info. This will avoid the checks and cache miss + * penalities associated with that. + */ + if (idle_cpu(cpu) || cpu_rq(cpu)->nr_running > 1) return cpu; for_each_domain(cpu, sd) {