Commit 57a409f6 authored by Michael Turquette's avatar Michael Turquette Committed by Todd Kjos
Browse files

cpufreq: introduce cpufreq_driver_is_slow



Some architectures and platforms perform CPU frequency transitions
through a non-blocking method, while some might block or sleep. Even
when frequency transitions do not block or sleep they may be very slow.
This distinction is important when trying to change frequency from
a non-interruptible context in a scheduler hot path.

Describe this distinction with a cpufreq driver flag,
CPUFREQ_DRIVER_FAST. The default is to not have this flag set,
thus erring on the side of caution.

cpufreq_driver_is_slow() is also introduced in this patch. Setting
the above flag will allow this function to return false.

[smuckle@linaro.org: change flag/API to include drivers that are too
 slow for scheduler hot paths, in addition to those that block/sleep]

Change-Id: I6f1d929ee175da71d2939c00bded8aacbca37ec5
Cc: Rafael J. Wysocki <rafael@kernel.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarMichael Turquette <mturquette@baylibre.com>
Signed-off-by: default avatarSteve Muckle <smuckle@linaro.org>
(am from https://patchwork.kernel.org/patch/7804821/

)
Signed-off-by: default avatarPunit Agrawal <punit.agrawal@arm.com>
parent 4e16e4f3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment