aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_timer.c
diff options
context:
space:
mode:
authorPaul Reioux <reioux@gmail.com>2013-09-08 17:10:10 -0500
committerJohn Brewer <gzroms@hotmail.com>2014-08-03 20:47:54 -0400
commit97ded227cd2a9e821b7ff317a3fac08e6fadd038 (patch)
tree92c21b3877ba7432a09e7ad7304734a2b50bc444 /net/lapb/lapb_timer.c
parenta168430d2c367fe98d09f81932313c73c86ef8aa (diff)
sched: Periodically decay max cost of idle balance
This RFC patch builds on patch 2 and periodically decays that max value to do idle balancing per sched domain. Though we want to decay it fairly consistently, we may not want to lower it by too much each time, especially since avg_idle is capped based on that value. So I thought that decaying the value every second and lowering it by half a percent each time appeared to be fairly reasonable. This change would allow us to remove the limit we set on each domain's max cost to idle balance. Also, since the max can be reduced now, we now have to update rq->max_idle balance_cost more frequently. So after every idle balance, we loop through the sched domain to find the max sd's newidle load balance cost for any one domain. Then we will set rq->max_idle_balance_cost to that value. Since we are now decaying the max cost to do idle balancing, that max cost can also become not high enough. One possible explanation for why is that besides the time spent on each newidle load balance, there are other costs associated with attempting idle balancing. Idle balance also releases and reacquires a spin lock. That cost is not counted when we keep track of each domain's cost to do newidle load balance. Also, acquiring the rq locks can potentially prevent other CPUs from running something useful. And after migrating tasks, it might potentially have to pay the costs of cache misses and refreshing tasks' cache. Because of that, this patch also compares avg_idle with max cost to do idle balancing + sched_migration_cost. While using the max cost helps reduce overestimating the average idle, the sched_migration_cost can help account for those additional costs of idle balancing. Signed-off-by: Jason Low <jason.low2@hp.com> [peterz: rewrote the logic, but kept the spirit] Signed-off-by: Peter Zijlstra <peterz@infradead.org> backported to Linux 3.4 Signed-off-by: Paul Reioux <reioux@gmail.com>
Diffstat (limited to 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions