From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965597AbbJ0Rwn (ORCPT ); Tue, 27 Oct 2015 13:52:43 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:32770 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965401AbbJ0Rcl (ORCPT ); Tue, 27 Oct 2015 13:32:41 -0400 From: =?UTF-8?q?B=C3=A1lint=20Czobor?= To: "Rafael J. Wysocki" , Viresh Kumar Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Todd Poynor , =?UTF-8?q?B=C3=A1lint=20Czobor?= Subject: [PATCH 34/70] cpufreq: interactive: fix boosting logic Date: Tue, 27 Oct 2015 18:30:22 +0100 Message-Id: <1445967059-6897-34-git-send-email-czoborbalint@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1445967059-6897-1-git-send-email-czoborbalint@gmail.com> References: <1445967059-6897-1-git-send-email-czoborbalint@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Todd Poynor 35a84de cpufreq: interactive: apply above_hispeed_delay to each step above hispeed caused the speed choice logic to osciallate between boosting and not boosting. Add back code to ensure speed does not drop below boost frequency while boosting. Change-Id: Id420068480fcc7f5c4989ff523e2a8d22e2f4db2 Signed-off-by: Todd Poynor Signed-off-by: Bálint Czobor --- drivers/cpufreq/cpufreq_interactive.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/cpufreq_interactive.c b/drivers/cpufreq/cpufreq_interactive.c index 690be16..f8e9ee9 100644 --- a/drivers/cpufreq/cpufreq_interactive.c +++ b/drivers/cpufreq/cpufreq_interactive.c @@ -298,11 +298,18 @@ static void cpufreq_interactive_timer(unsigned long data) cpu_load = loadadjfreq / pcpu->target_freq; boosted = boost_val || now < boostpulse_endtime; - if ((cpu_load >= go_hispeed_load || boosted) && - pcpu->target_freq < hispeed_freq) - new_freq = hispeed_freq; - else + if (cpu_load >= go_hispeed_load || boosted) { + if (pcpu->target_freq < hispeed_freq) { + new_freq = hispeed_freq; + } else { + new_freq = choose_freq(pcpu, loadadjfreq); + + if (new_freq < hispeed_freq) + new_freq = hispeed_freq; + } + } else { new_freq = choose_freq(pcpu, loadadjfreq); + } if (pcpu->target_freq >= hispeed_freq && new_freq > pcpu->target_freq && -- 1.7.9.5