Rather that hide their purpose in some dark, damp corner of Documentation/, add some documentation to the default implementations.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -217,6 +217,16 @@ static inline bool cpus_share_cache(int this_cpu, int that_cpu) · 216 unmodified lines | ||
| 217 | 217 | #endif /* !CONFIG_SMP */ |
| 218 | 218 | |
| 219 | 219 | #ifndef arch_scale_cpu_capacity |
| 220 | +/** | |
| 221 | + * arch_scale_cpu_capacity - get the capacity scale factor of a given CPU. | |
| 222 | + * @cpu: the CPU in question. | |
| 223 | + * | |
| 224 | + * Return: the CPU scale factor normalized against SCHED_CAPACITY_SCALE, i.e. | |
| 225 | + * | |
| 226 | + * max_perf(cpu) | |
| 227 | + * ----------------------------- * SCHED_CAPACITY_SCALE | |
| 228 | + * max(max_perf(c) : c \in CPUs) | |
| 229 | + */ | |
| 220 | 230 | static __always_inline |
| 221 | 231 | unsigned long arch_scale_cpu_capacity(int cpu) |
| 222 | 232 | { |