From 02d07ab85fa5d79d01bf999cc6d22c38f8b0b0db Mon Sep 17 00:00:00 2001 From: Maulik Shah Date: Tue, 24 Dec 2019 16:25:29 +0530 Subject: [PATCH] cpuidle: lpm-levels: Enable ipi prediction Keep ipi prediction enabled. Change-Id: Ia0015a5c847f474390096235374212a3513a0374 Signed-off-by: Maulik Shah --- drivers/cpuidle/lpm-levels.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/cpuidle/lpm-levels.c b/drivers/cpuidle/lpm-levels.c index 175faf321a61..01f4f31e4866 100644 --- a/drivers/cpuidle/lpm-levels.c +++ b/drivers/cpuidle/lpm-levels.c @@ -82,7 +82,7 @@ struct lpm_cluster *lpm_root_node; static bool lpm_prediction = true; 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); struct lpm_history { @@ -469,9 +469,6 @@ static uint64_t find_deviation(int *interval, uint32_t ref_stddev, uint64_t max, avg, stddev; int64_t thresh = LLONG_MAX; - if (lpm_ipi_prediction) - ref_stddev += DEFAULT_IPI_STDDEV; - do { max = avg = divisor = stddev = 0; 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) 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)); if (avg) { *ipi_predicted = 1;