]> git.baikalelectronics.ru Git - kernel.git/commit
sched/fair: Stop searching for tasks in newidle balance if there are runnable tasks
authorJason Low <jason.low2@hp.com>
Thu, 24 Apr 2014 01:30:35 +0000 (18:30 -0700)
committerIngo Molnar <mingo@kernel.org>
Wed, 7 May 2014 11:33:53 +0000 (13:33 +0200)
commit3368307f77377696e27cfeaf5c755cf059f6036d
treed45517454f4823a8a0d6599837d22419076162fa
parent2b561010652dc6f4b5b3a4fa0eba81c65ecbf65b
sched/fair: Stop searching for tasks in newidle balance if there are runnable tasks

It was found that when running some workloads (such as AIM7) on large
systems with many cores, CPUs do not remain idle for long. Thus, tasks
can wake/get enqueued while doing idle balancing.

In this patch, while traversing the domains in idle balance, in
addition to checking for pulled_task, we add an extra check for
this_rq->nr_running for determining if we should stop searching for
tasks to pull. If there are runnable tasks on this rq, then we will
stop traversing the domains. This reduces the chance that idle balance
delays a task from running.

This patch resulted in approximately a 6% performance improvement when
running a Java Server workload on an 8 socket machine.

Signed-off-by: Jason Low <jason.low2@hp.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: daniel.lezcano@linaro.org
Cc: alex.shi@linaro.org
Cc: preeti@linux.vnet.ibm.com
Cc: efault@gmx.de
Cc: vincent.guittot@linaro.org
Cc: morten.rasmussen@arm.com
Cc: aswin@hp.com
Cc: chegu_vinod@hp.com
Link: http://lkml.kernel.org/r/1398303035-18255-4-git-send-email-jason.low2@hp.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/fair.c