summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorValentin Schneider <valentin.schneider@arm.com>2020-07-31 20:20:14 +0100
committerIngo Molnar <mingo@kernel.org>2020-08-01 09:19:43 +0200
commitf4470cdf108f00533e8079b19434e6cb48c17fa3 (patch)
tree3c290a2f505a3d6a3fc443cd8f12048c43695f96 /include
parentfcd7c9c3c35aed58aba2eea6d375f0e5b03bd6d6 (diff)
sched: Document arch_scale_*_capacity()
Rather that hide their purpose in some dark, damp corner of Documentation/, add some documentation to the default implementations. Signed-off-by: Valentin Schneider <valentin.schneider@arm.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20200731192016.7484-2-valentin.schneider@arm.com
Diffstat (limited to 'include')
-rw-r--r--include/linux/sched/topology.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/sched/topology.h b/include/linux/sched/topology.h
index 764222d637b7..820511289857 100644
--- a/include/linux/sched/topology.h
+++ b/include/linux/sched/topology.h
@@ -217,6 +217,16 @@ static inline bool cpus_share_cache(int this_cpu, int that_cpu)
#endif /* !CONFIG_SMP */
#ifndef arch_scale_cpu_capacity
+/**
+ * arch_scale_cpu_capacity - get the capacity scale factor of a given CPU.
+ * @cpu: the CPU in question.
+ *
+ * Return: the CPU scale factor normalized against SCHED_CAPACITY_SCALE, i.e.
+ *
+ * max_perf(cpu)
+ * ----------------------------- * SCHED_CAPACITY_SCALE
+ * max(max_perf(c) : c \in CPUs)
+ */
static __always_inline
unsigned long arch_scale_cpu_capacity(int cpu)
{