Skip to content

Commit ff7db2d

Browse files
derklingpundiramit
authored andcommitted
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>
1 parent 4dd2760 commit ff7db2d

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

kernel/sched/fair.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6469,6 +6469,19 @@ static inline int find_best_target(struct task_struct *p, int *backup_cpu,
64696469
continue;
64706470
}
64716471

6472+
/*
6473+
* Enforce EAS mode
6474+
*
6475+
* For non latency sensitive tasks, skip CPUs that
6476+
* will be overutilized by moving the task there.
6477+
*
6478+
* The goal here is to remain in EAS mode as long as
6479+
* possible at least for !prefer_idle tasks.
6480+
*/
6481+
if ((new_util * capacity_margin) >
6482+
(capacity_orig * SCHED_CAPACITY_SCALE))
6483+
continue;
6484+
64726485
/*
64736486
* Case B) Non latency sensitive tasks on IDLE CPUs.
64746487
*

0 commit comments

Comments
 (0)