Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 7c128609 authored by Junjie Wu's avatar Junjie Wu Committed by Stephen Boyd
Browse files

cpufreq: interactive: Use load prediction provided by scheduler



With modification in scheduler, governor now gets predicted
instantaneous demand waiting to run in addition to demand from
previous window for each CPU. Make use of this information since
prediction from scheduler could be more accurate than just looking at
past few windows.

Governor calculates two frequencies during each sampling period: one based
on demand in previous sampling period (f_prev), and the other based on
prediction provided by scheduler (f_pred). Max of both will be selected
as final frequency. Hispeed related logic, including both frequency
selection and delay is ignored when prediction is enabled. If only
f_pred but not f_prev picked policy->max, max_freq_hysteresis period is
not started/extended. This is to reduce power cost of mis-prediction
if it happens.

One use case prediction could dramatically help is when a heavy task
wakes up after sleeping for a long time. With prediction, governor
could ramp up to frequency the task needs much faster than before.

To enable prediction, echo 1 to enable_prediction file in
cpufreq interactive sysfs directory.

Change-Id: I27396785886e43ea01c9000c651c8bd142172273
Suggested-by: default avatarSaravana Kannan <skannan@codeaurora.org>
Signed-off-by: default avatarJunjie Wu <junjiew@codeaurora.org>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent aceecc06
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment