public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux-next] cpufreq: conservative: Fix sampling_down_factor functionality
@ 2013-03-04 22:14 Stratos Karafotis
  2013-03-05  0:23 ` Viresh Kumar
  0 siblings, 1 reply; 9+ messages in thread
From: Stratos Karafotis @ 2013-03-04 22:14 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: cpufreq, linux-pm, linux-kernel

sampling_down_factor tunable is unused since commit
8e677ce83bf41ba9c74e5b6d9ee60b07d4e5ed93 (4 years ago).

This patch restores the original functionality.

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
---
 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
-- 
1.8.1.4



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-03-06  6:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-04 22:14 [PATCH linux-next] cpufreq: conservative: Fix sampling_down_factor functionality Stratos Karafotis
2013-03-05  0:23 ` Viresh Kumar
2013-03-05  5:22   ` Stratos Karafotis
2013-03-05  7:34     ` Viresh Kumar
2013-03-05 20:15       ` Stratos Karafotis
2013-03-05 14:11     ` David C Niemi
2013-03-05 14:21       ` David C Niemi
2013-03-05 20:37         ` Stratos Karafotis
2013-03-06  6:43         ` Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox