The fair scheduler needs a method to retrieve the capacity of a cpu, which may be derived from several platform-specific factors including micro-architectural differences (e.g. big.LITTLE cpus), cpus with different transistor types or process node properties (e.g. Nvidia Tegra30 LP cpu) and cpu frequency (for cpus that dynamically scale clock speed).
This info is inherently machine-specific and the first patch in this series implements a new callback, .get_capacity as part of struct capacity_ops. The default simply returns SCHED_CAPACITY_SCALE. The second patch populates that callback with CPUfreq-based method for machines using the arm_big_little CPUfreq driver. This can likely be abstracted out a bit more to be generally useful to more CPUfreq drivers but I wanted to gather feedback on the approach before going any further. Mike Turquette (2): sched: cfs: introduce capacity_ops cpufreq: arm_big_little: provide cpu capacity arch/arm/include/asm/topology.h | 2 ++ arch/arm/kernel/topology.c | 42 ++------------------------------- drivers/cpufreq/arm_big_little.c | 51 ++++++++++++++++++++++++++++++++++++++++ include/linux/sched.h | 28 ++++++++++++++++++++++ kernel/sched/fair.c | 41 +++++++++++++++++++++++++++----- 5 files changed, 118 insertions(+), 46 deletions(-) -- 1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/