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

Skip to content
Commit 4ca7dd5b authored by Chris Redpath's avatar Chris Redpath Committed by Gerrit - the friendly Code Review server
Browse files

ANDROID: sched/fair: Don't balance misfits if it would overload local group



When load balancing in a system with misfit tasks present, if we always
pull a misfit task to the local group this can lead to pulling a running
task from a smaller capacity CPUs to a bigger CPU which is busy. In this
situation, the pulled task is likely not to get a chance to run before
an idle balance on another small CPU pulls it back. This penalises the
pulled task as it is stopped for a short amount of time and then likely
relocated to a different CPU (since the original CPU just did a NEWLY_IDLE
balance and reset the periodic interval).

If we only do this unconditionally for NEWLY_IDLE balance, we can be
sure that any tasks and load which are present on the local group are
related to short-running tasks which we are happy to displace for a
longer running task in a system with misfit tasks present.

However, other balance types should only pull a task if we think
that the local group is underutilized - checking the number of tasks
gives us a conservative estimate here since if they were short tasks
we would have been doing NEWLY_IDLE balances instead.

Change-Id: I710add1ab1139482620b6addc8370ad194791beb
Signed-off-by: default avatarChris Redpath <chris.redpath@arm.com>
Git-commit: 37e94467
Git-repo: https://android.googlesource.com/kernel/common/


Signed-off-by: default avatarPuja Gupta <pujag@codeaurora.org>
parent 44b893b6
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