cpuidle: lpm-levels: Enable ipi prediction

Keep ipi prediction enabled.

Change-Id: Ia0015a5c847f474390096235374212a3513a0374
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
This commit is contained in:
Maulik Shah 2019-12-24 16:25:29 +05:30
parent 97edfeda2e
commit 02d07ab85f

View File

@ -82,7 +82,7 @@ struct lpm_cluster *lpm_root_node;
static bool lpm_prediction = true; static bool lpm_prediction = true;
module_param_named(lpm_prediction, lpm_prediction, bool, 0664); module_param_named(lpm_prediction, lpm_prediction, bool, 0664);
static bool lpm_ipi_prediction; static bool lpm_ipi_prediction = true;
module_param_named(lpm_ipi_prediction, lpm_ipi_prediction, bool, 0664); module_param_named(lpm_ipi_prediction, lpm_ipi_prediction, bool, 0664);
struct lpm_history { struct lpm_history {
@ -469,9 +469,6 @@ static uint64_t find_deviation(int *interval, uint32_t ref_stddev,
uint64_t max, avg, stddev; uint64_t max, avg, stddev;
int64_t thresh = LLONG_MAX; int64_t thresh = LLONG_MAX;
if (lpm_ipi_prediction)
ref_stddev += DEFAULT_IPI_STDDEV;
do { do {
max = avg = divisor = stddev = 0; max = avg = divisor = stddev = 0;
for (i = 0; i < MAXSAMPLES; i++) { for (i = 0; i < MAXSAMPLES; i++) {
@ -601,7 +598,8 @@ static uint64_t lpm_cpuidle_predict(struct cpuidle_device *dev,
if (*idx_restrict_time || !cpu->ipi_prediction || !lpm_ipi_prediction) if (*idx_restrict_time || !cpu->ipi_prediction || !lpm_ipi_prediction)
return 0; return 0;
avg = find_deviation(ipi_history->interval, cpu->ref_stddev, avg = find_deviation(ipi_history->interval, cpu->ref_stddev
+ DEFAULT_IPI_STDDEV,
&(history->stime)); &(history->stime));
if (avg) { if (avg) {
*ipi_predicted = 1; *ipi_predicted = 1;