sched/fair: enforce EAS mode
For non latency sensitive tasks the goal is to optimize for energy efficiency. Thus, we should try our best to avoid moving a task on a CPU which is then going to be marked as overutilized. Let's use the capacity_margin metric to verify if a candidate target CPU should be considered without risking to bail out of EAS mode. Change-Id: Ib3697106f4073aedf4a6c6ce42bd5d000fa8c007 Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com> Signed-off-by: Chris Redpath <chris.redpath@arm.com>
This commit is contained in:
parent
4edc5b0e38
commit
ca42e80446
1 changed files with 13 additions and 0 deletions
|
@ -6469,6 +6469,19 @@ static inline int find_best_target(struct task_struct *p, int *backup_cpu,
|
|||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* Enforce EAS mode
|
||||
*
|
||||
* For non latency sensitive tasks, skip CPUs that
|
||||
* will be overutilized by moving the task there.
|
||||
*
|
||||
* The goal here is to remain in EAS mode as long as
|
||||
* possible at least for !prefer_idle tasks.
|
||||
*/
|
||||
if ((new_util * capacity_margin) >
|
||||
(capacity_orig * SCHED_CAPACITY_SCALE))
|
||||
continue;
|
||||
|
||||
/*
|
||||
* Case B) Non latency sensitive tasks on IDLE CPUs.
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue