[PATCH v2 0/3] cpufreq: avoid redundant driver calls in schedutil

From: Steve Muckle
Date: Wed May 25 2016 - 22:53:23 EST

In the series [0] I included a patch which attempted to avoid redundant driver
calls in the schedutil governor by mapping the raw required CPU frequencies to
driver frequencies. This vastly increases the likelihood of detecting a
redundant cpufreq driver call, i.e. one which will end up attempting to set the
CPU frequency to the frequency it is already running at. The redundant call can
be avoided. This is especially valuable in the case of drivers which do not
support fast path updates or if remote CPU cpufreq callbacks are implemented.

Unfortunately the implementation of this in [0] walked the frequency table
directly in schedutil. Rafael pointed out that not all drivers may have a
frequency table and that a driver callback might be implemented to return the
driver frequency associated with a particular target frequency. The driver
could then also cache this lookup and possibly use it on an ensuing
fast_switch. This series implements that approach.

Given that this change is beneficial on its own I've split it out into its own
series from the remote callback support.

[0] https://lkml.org/lkml/2016/5/9/853

Steve Muckle (3):
cpufreq: add resolve_freq driver callback
cpufreq: acpi-cpufreq: add resolve_freq callback
cpufreq: schedutil: map raw required frequency to driver frequency

drivers/cpufreq/acpi-cpufreq.c | 56 ++++++++++++++++++++++++++++++----------
drivers/cpufreq/cpufreq.c | 25 ++++++++++++++++++
include/linux/cpufreq.h | 11 ++++++++
kernel/sched/cpufreq_schedutil.c | 30 +++++++++++++++------
4 files changed, 101 insertions(+), 21 deletions(-)