diff options
| author | Ionela Voinescu <ionela.voinescu@arm.com> | 2017-12-07 19:50:45 +0000 |
|---|---|---|
| committer | Georg Veichtlbauer <georg@vware.at> | 2023-07-26 21:01:08 +0200 |
| commit | a0962aae827a2707aceb58b33e0b0137e0e188dc (patch) | |
| tree | 2c6bef186c6165309688825d5c0e2b4e232da887 | |
| parent | dc08083babd97d93b7de850ab3a0abbc176a85e7 (diff) | |
sched/fair: use min capacity when evaluating placement energy costs
Add the ability to track minimim capacity forced onto a sched_group
by some external actor.
group_max_util returns the highest utilisation inside a sched_group
and is used when we are trying to calculate an energy cost estimate
for a specific scheduling scenario. Minimum capacities imposed from
elsewhere will influence this energy cost so we should reflect it
here.
Change-Id: Ibd537a6dbe6d67b11cc9e9be18f40fcb2c0f13de
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 | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 8000639568c9..36af84716c96 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -6590,6 +6590,15 @@ static unsigned long group_max_util(struct energy_env *eenv, int cpu_idx) util += eenv->util_delta; max_util = max(max_util, util); + + /* + * Take into account any minimum frequency imposed + * elsewhere which limits the energy states available + * If the MIN_CAPACITY_CAPPING feature is not enabled + * capacity_min_of will return 0 (not capped). + */ + max_util = max(max_util, capacity_min_of(cpu)); + } return max_util; |
