sched: Check if we got a shallowest_idle_cpu before searching for least_loaded_cpu
authorYao Dongdong <yaodongdong@huawei.com>
Tue, 28 Oct 2014 04:08:06 +0000 (04:08 +0000)
committerIngo Molnar <mingo@kernel.org>
Tue, 4 Nov 2014 06:17:51 +0000 (07:17 +0100)
commit9f96742a13135e6c609cc99a3a458402af3c8f31
tree3bd38a1ec1a181848230d690e9736776e932ac65
parent67dfa1b756f250972bde31d65e3f8fde6aeddc5b
sched: Check if we got a shallowest_idle_cpu before searching for least_loaded_cpu

Idle cpu is idler than non-idle cpu, so we needn't search for least_loaded_cpu
after we have found an idle cpu.

Signed-off-by: Yao Dongdong <yaodongdong@huawei.com>
Reviewed-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/1414469286-6023-1-git-send-email-yaodongdong@huawei.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/fair.c