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
This commit is contained in:
parent
fcd7c9c3c3
commit
f4470cdf10
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user