From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965012AbbJ0ReA (ORCPT ); Tue, 27 Oct 2015 13:34:00 -0400 Received: from mail-wi0-f172.google.com ([209.85.212.172]:33183 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965221AbbJ0Rd5 (ORCPT ); Tue, 27 Oct 2015 13:33:57 -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, Ruchi Kandoi , =?UTF-8?q?B=C3=A1lint=20Czobor?= Subject: [PATCH 64/70] cpufreq: interactive: prevents the frequency to directly raise above the hispeed_freq from a lower frequency. Date: Tue, 27 Oct 2015 18:30:52 +0100 Message-Id: <1445967059-6897-64-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: Ruchi Kandoi When the load was below go_hispeed_load, there is a possibility that choose_freq() would return a frequency which would be higher than the hispeed_freq. According to the policy we should first jump to the hispeed_freq, stay there for above_hispeed_delay and then be allowed to raise higher than that. Added a check to prevent the frequency to be directly raised to something higher than the hispeed_freq. Change-Id: Icda5d848dd9beadcc18835082ddf269732c75bd0 Signed-off-by: Ruchi Kandoi Signed-off-by: Bálint Czobor --- drivers/cpufreq/cpufreq_interactive.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/cpufreq/cpufreq_interactive.c b/drivers/cpufreq/cpufreq_interactive.c index 6c4b6a8..f0e6fe2 100644 --- a/drivers/cpufreq/cpufreq_interactive.c +++ b/drivers/cpufreq/cpufreq_interactive.c @@ -377,6 +377,9 @@ static void cpufreq_interactive_timer(unsigned long data) } } else { new_freq = choose_freq(pcpu, loadadjfreq); + if (new_freq > tunables->hispeed_freq && + pcpu->target_freq < tunables->hispeed_freq) + new_freq = tunables->hispeed_freq; } if (pcpu->target_freq >= tunables->hispeed_freq && -- 1.7.9.5