From patchwork Mon Mar 4 22:14:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stratos Karafotis X-Patchwork-Id: 2214931 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id B6FC43FCF2 for ; Mon, 4 Mar 2013 22:14:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932742Ab3CDWOk (ORCPT ); Mon, 4 Mar 2013 17:14:40 -0500 Received: from sema.semaphore.gr ([78.46.194.137]:47301 "EHLO sema.semaphore.gr" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S932378Ab3CDWOj (ORCPT ); Mon, 4 Mar 2013 17:14:39 -0500 Received: from albert.lan (unknown [91.140.112.22]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: stratosk) by sema.semaphore.gr (Postfix) with ESMTPSA id 60DD482CED; Mon, 4 Mar 2013 23:14:28 +0100 (CET) Message-ID: <51351CC3.4010301@semaphore.gr> Date: Tue, 05 Mar 2013 00:14:27 +0200 From: Stratos Karafotis User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130219 Thunderbird/17.0.3 MIME-Version: 1.0 To: "Rafael J. Wysocki" CC: cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH linux-next] cpufreq: conservative: Fix sampling_down_factor functionality Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org sampling_down_factor tunable is unused since commit 8e677ce83bf41ba9c74e5b6d9ee60b07d4e5ed93 (4 years ago). This patch restores the original functionality. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/cpufreq_conservative.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c index 4fd0006..4b27c21 100644 --- a/drivers/cpufreq/cpufreq_conservative.c +++ b/drivers/cpufreq/cpufreq_conservative.c @@ -87,6 +87,12 @@ static void cs_check_cpu(int cpu, unsigned int load) return; } + /* if sampling_down_factor is active break out early */ + if (++dbs_info->down_skip < cs_tuners.sampling_down_factor) + return; + + dbs_info->down_skip = 0; + /* * The optimal frequency is the frequency that is the lowest that can * support the current CPU usage without triggering the up policy. To be