]> git.baikalelectronics.ru Git - kernel.git/commit
sched/balancing: Consider max cost of idle balance per sched domain
authorJason Low <jason.low2@hp.com>
Fri, 13 Sep 2013 18:26:52 +0000 (11:26 -0700)
committerIngo Molnar <mingo@kernel.org>
Fri, 20 Sep 2013 10:03:44 +0000 (12:03 +0200)
commit9a27d38d85aeef12db93aa75339880c0f2f311e1
tree1c47dcd9afda75ce5a1d4800da33b35076a246a9
parente40f326cadf167632b141a09a537cc3a02e4e262
sched/balancing: Consider max cost of idle balance per sched domain

In this patch, we keep track of the max cost we spend doing idle load balancing
for each sched domain. If the avg time the CPU remains idle is less then the
time we have already spent on idle balancing + the max cost of idle balancing
in the sched domain, then we don't continue to attempt the balance. We also
keep a per rq variable, max_idle_balance_cost, which keeps track of the max
time spent on newidle load balances throughout all its domains so that we can
determine the avg_idle's max value.

By using the max, we avoid overrunning the average. This further reduces the
chance we attempt balancing when the CPU is not idle for longer than the cost
to balance.

Signed-off-by: Jason Low <jason.low2@hp.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1379096813-3032-3-git-send-email-jason.low2@hp.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/metag/include/asm/topology.h
include/linux/sched.h
include/linux/topology.h
kernel/sched/core.c
kernel/sched/fair.c
kernel/sched/sched.h