Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f95e8dee authored by Morten Rasmussen's avatar Morten Rasmussen Committed by Joonwoo Park
Browse files

sched: Consider misfit tasks when load-balancing



With the new group_misfit_task load-balancing scenario additional policy
conditions are needed when load-balancing. Misfit task balancing only
makes sense between source group with lower capacity than the target
group. If capacities are the same, fallback to normal group_other
balancing. The aim is to balance tasks such that no task has its
throughput hindered by compute capacity if a cpu with more capacity is
available. Load-balancing is generally based on average load in the
sched_groups, but for misfitting tasks it is necessary to introduce
exceptions to migrate tasks against usual metrics and optimize
throughput.

This patch ensures the following load-balance for mixed capacity systems
(e.g. ARM big.LITTLE) for always-running tasks:

1. Place a task on each cpu starting in order from cpus with highest
capacity to lowest until all cpus are in use (i.e. one task on each
cpu).

2. Once all cpus are in use balance according to compute capacity such
that load per capacity is approximately the same regardless of the
compute capacity (i.e. big cpus get more tasks than little cpus).

Necessary changes are introduced in find_busiest_group(),
calculate_imbalance(), and find_busiest_queue(). This includes passing
the group_type on to find_busiest_queue() through struct lb_env, which
is currently only considers imbalance and not the imbalance situation
(group_type).

To avoid taking remote rq locks to examine source sched_groups for
misfit tasks, each cpu is responsible for tracking misfit tasks
themselves and update the rq->misfit_task flag. This means checking task
utilization when tasks are scheduled and on sched_tick.

Change-Id: Ie380965064080ef3bd65ba87d1b11009e396b13d
Signed-off-by: default avatarMorten Rasmussen <morten.rasmussen@arm.com>
[joonwoop: s/SCHED_LOAD_SCALE/SCHED_CAPACITY_SHIFT/, add sds->local !=
 NULL check]
Git-repo: https://source.codeaurora.org/quic/la/kernel/msm-4.4


Git-commit: 22a9676637381b670d038f7da1fca82448de033e
Signed-off-by: default avatarJoonwoo Park <joonwoop@codeaurora.org>
parent e52c5097
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment