summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonela Voinescu <ionela.voinescu@arm.com>2017-08-30 16:43:11 +0100
committerGeorg Veichtlbauer <georg@vware.at>2023-07-26 21:01:08 +0200
commit40bf84fc323affcca8b3d446d9cecef706a7a36b (patch)
tree0fb16b0b67c37c1784ce45c80127f426810aea6d
parentd416e291213e0cfd6c345872d63efabe634bb33a (diff)
sched: add arch_scale_min_freq_capacity to track minimum capacity caps
If the minimum capacity of a group is capped by userspace or internal dependencies which are not otherwise visible to the scheduler, we need a way to see these and integrate this information into the energy calculations and task placement decisions we make. Add arch_scale_min_freq_capacity to determine the lowest capacity which a specific cpu can provide under the current set of known constraints. Change-Id: Ied4a1dc0982bbf42cb5ea2f27201d4363db59705 Signed-off-by: Chris Redpath <chris.redpath@arm.com> Signed-off-by: Ionela Voinescu <ionela.voinescu@arm.com>
-rw-r--r--kernel/sched/sched.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 3d90fe2c2d6b..9473d4742349 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -2365,6 +2365,18 @@ unsigned long arch_scale_max_freq_capacity(struct sched_domain *sd, int cpu)
}
#endif
+#ifndef arch_scale_min_freq_capacity
+static __always_inline
+unsigned long arch_scale_min_freq_capacity(struct sched_domain *sd, int cpu)
+{
+ /*
+ * Multiplied with any capacity value, this scale factor will return
+ * 0, which represents an un-capped state
+ */
+ return 0;
+}
+#endif
+
#ifndef arch_scale_cpu_capacity
static __always_inline
unsigned long arch_scale_cpu_capacity(struct sched_domain *sd, int cpu)