diff options
| author | Ionela Voinescu <ionela.voinescu@arm.com> | 2017-12-07 20:09:50 +0000 |
|---|---|---|
| committer | Georg Veichtlbauer <georg@vware.at> | 2023-07-26 21:01:08 +0200 |
| commit | 454f5f5a9d616fa0e9b09f13f385496cdf6a68e9 (patch) | |
| tree | 77f46a9c44ca1ffffb2c9f79fbacf15588243587 | |
| parent | fa3e5de8b03a0d2cc8ecc6a8f617210c455e1de6 (diff) | |
sched/fair: use min capacity when evaluating active cpus
When we are calculating what the impact of placing a task on a specific
cpu is, we should include the information that there might be a minimum
capacity imposed upon that cpu which could change the performance and/or
energy cost decisions.
When choosing an active target CPU, favour CPUs that won't end up
running at a high OPP due to a min capacity cap imposed by external
actors.
Change-Id: Ibc3302304345b63107f172b1fc3ffdabc19aa9d4
Signed-off-by: Ionela Voinescu <ionela.voinescu@arm.com>
Signed-off-by: Chris Redpath <chris.redpath@arm.com>
| -rw-r--r-- | kernel/sched/fair.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 3222afeed17d..2ec0cedf6cc8 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -7829,10 +7829,11 @@ static inline int find_best_target(struct task_struct *p, int *backup_cpu, continue; /* Favor CPUs with maximum spare capacity */ - if ((capacity_orig - new_util) < target_max_spare_cap) + if ((capacity_orig - min_capped_util) < + target_max_spare_cap) continue; - target_max_spare_cap = capacity_orig - new_util; + target_max_spare_cap = capacity_orig - min_capped_util; target_capacity = capacity_orig; target_cpu = i; } |
