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

Skip to content
Commit 5cb866ac authored by Chris Redpath's avatar Chris Redpath
Browse files

ANDROID: sched/fair: Fall back to slow path wakeup placement if needed



Sometimes we can be in a scenario where we are unable to calculate an
energy-aware task placement. This can happen for a few reasons.
1. We might be racing with a hotplug and be unable to access the
   whole-system energy structures
2. The system might be in a condition (due to task size and load)
   whereby there is only one potential place to put a task (when
   we consider avoiding overutilization etc.).
3. There might actually be no non-overutilized sched domain in
   the system where the current task would fit.

We handle case 3 directly in select_task_rq_fair - there is no point
even checking what the energy situation might be since we can already
tell that it is not possible to do an energy-aware placement of this
task. When that is apparent, we null out the energy_sd and fallback to
the regular slow-path wakeup (which is also capacity-aware).

For the other cases, we can't tell we are in such a scenario until we do
at least a little further digging. Allow find_energy_efficient_cpu to
return -1 to indicate that we did not attempt an energy-aware wakeup as
either we couldn't or there was only one potential candidate.

When that happens, we will set new_cpu == -1 and drop again into
find_idlest_cpu to place the task (which is capacity aware).

Change-Id: I65454ea7bba6b85ee0467f28929650e80cba0cab
Signed-off-by: default avatarChris Redpath <chris.redpath@arm.com>
parent c8d50e06
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