summaryrefslogtreecommitdiffstats
path: root/kernel/sched
diff options
context:
space:
mode:
authorValentin Schneider <valentin.schneider@arm.com>2020-07-31 21:20:14 +0200
committerIngo Molnar <mingo@kernel.org>2020-08-01 09:19:43 +0200
commitf4470cdf108f00533e8079b19434e6cb48c17fa3 (patch)
tree3c290a2f505a3d6a3fc443cd8f12048c43695f96 /kernel/sched
parentarm, arm64: Fix selection of CONFIG_SCHED_THERMAL_PRESSURE (diff)
downloadlinux-f4470cdf108f00533e8079b19434e6cb48c17fa3.tar.xz
linux-f4470cdf108f00533e8079b19434e6cb48c17fa3.zip
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 'kernel/sched')
-rw-r--r--kernel/sched/sched.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 296efd30d8c9..3fd283892761 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -2049,6 +2049,16 @@ void arch_scale_freq_tick(void)
#endif
#ifndef arch_scale_freq_capacity
+/**
+ * arch_scale_freq_capacity - get the frequency scale factor of a given CPU.
+ * @cpu: the CPU in question.
+ *
+ * Return: the frequency scale factor normalized against SCHED_CAPACITY_SCALE, i.e.
+ *
+ * f_curr
+ * ------ * SCHED_CAPACITY_SCALE
+ * f_max
+ */
static __always_inline
unsigned long arch_scale_freq_capacity(int cpu)
{