diff options
author | Jason Low <jason.low2@hp.com> | 2014-05-08 17:49:22 -0700 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-05-22 11:16:32 +0200 |
commit | 52a08ef1f13a11289c9e18cd4cfb4e51c024058b (patch) | |
tree | fbdde6221312e3ab2ea3a258a94d3e24dace5c54 /kernel/system_keyring.c | |
parent | a9467fa3cd2d5bf39e7cb7d0706d29d7ef4df212 (diff) | |
download | linux-stable-52a08ef1f13a11289c9e18cd4cfb4e51c024058b.tar.gz linux-stable-52a08ef1f13a11289c9e18cd4cfb4e51c024058b.tar.bz2 linux-stable-52a08ef1f13a11289c9e18cd4cfb4e51c024058b.zip |
sched: Fix the rq->next_balance logic in rebalance_domains() and idle_balance()
Currently, in idle_balance(), we update rq->next_balance when we pull_tasks.
However, it is also important to update this in the !pulled_tasks case too.
When the CPU is "busy" (the CPU isn't idle), rq->next_balance gets computed
using sd->busy_factor (so we increase the balance interval when the CPU is
busy). However, when the CPU goes idle, rq->next_balance could still be set
to a large value that was computed with the sd->busy_factor.
Thus, we need to also update rq->next_balance in idle_balance() in the cases
where !pulled_tasks too, so that rq->next_balance gets updated without taking
the busy_factor into account when the CPU is about to go idle.
This patch makes rq->next_balance get updated independently of whether or
not we pulled_task. Also, we add logic to ensure that we always traverse
at least 1 of the sched domains to get a proper next_balance value for
updating rq->next_balance.
Additionally, since load_balance() modifies the sd->balance_interval, we
need to re-obtain the sched domain's interval after the call to
load_balance() in rebalance_domains() before we update rq->next_balance.
This patch adds and uses 2 new helper functions, update_next_balance() and
get_sd_balance_interval() to update next_balance and obtain the sched
domain's balance_interval.
Signed-off-by: Jason Low <jason.low2@hp.com>
Reviewed-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: daniel.lezcano@linaro.org
Cc: alex.shi@linaro.org
Cc: efault@gmx.de
Cc: vincent.guittot@linaro.org
Cc: morten.rasmussen@arm.com
Cc: aswin@hp.com
Link: http://lkml.kernel.org/r/1399596562.2200.7.camel@j-VirtualBox
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/system_keyring.c')
0 files changed, 0 insertions, 0 deletions