[PATCH v5 7/8] irda: sh_sir: Use cpufreq_for_each_valid_entry macro for iteration

2014-04-25 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_valid_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- Please note that I was no able to compile test this patch due to lack of cross compiler

[PATCH v5 5/8] mfd: db8500-prcmu: Use cpufreq_for_each_entry macro for iteration

2014-04-25 Thread Stratos Karafotis
The cpufreq core now supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/mfd/db8500-prcmu.c | 19 --- 1 file changed, 8 insertions(+), 11

Re: [PATCH v5 2/8] cpufreq: Use cpufreq_for_each_* macros for frequency table iteration

2014-04-26 Thread Stratos Karafotis
Hi Prabhakar, On 26/04/2014 12:57 μμ, Prabhakar Lad wrote: > Hi Stratos, > > Thanks for the patch, > > On Sat, Apr 26, 2014 at 1:45 AM, Stratos Karafotis > wrote: >> The cpufreq core now supports the cpufreq_for_each_entry and >> cpufreq_for_each_valid_entry mac

[PATCH] cpufreq: intel_pstate: Change the calculation of next pstate

2014-04-27 Thread Stratos Karafotis
15326.87700 avg 78.34 258.842 59.18 15318.82650 The total test time reduced by ~2.6%, while the total energy consumption during a test iteration reduced by ~0.35% Signed-off-by: Stratos Karafotis --- drivers/cpufreq/intel_pstate.c | 15 +++ 1 file

Re: [RFC PATCH] cpufreq: intel_pstate: Change the calculation of next pstate

2014-05-16 Thread Stratos Karafotis
Hi all! On 12/05/2014 11:30 μμ, Stratos Karafotis wrote: > On 09/05/2014 05:56 μμ, Stratos Karafotis wrote: >> Hi Dirk, >> >> On 08/05/2014 11:52 μμ, Dirk Brandewie wrote: >>> On 05/05/2014 04:57 PM, Stratos Karafotis wrote: >>>> Currently the driver

Re: [PATCH v5 0/8] Introduce new cpufreq helper macros

2014-04-29 Thread Stratos Karafotis
On 29/04/2014 07:17 πμ, Viresh Kumar wrote: > On 26 April 2014 01:45, Stratos Karafotis wrote: >> This patch set introduces two freq_table helper macros which >> can be used for iteration over cpufreq_frequency_table and >> makes the necessary changes to cpufreq core and dri

Re: [PATCH] cpufreq: intel_pstate: Change the calculation of next pstate

2014-04-29 Thread Stratos Karafotis
On 29/04/2014 07:58 πμ, Viresh Kumar wrote: > Cc'd Dirk, > > On 28 April 2014 03:42, Stratos Karafotis wrote: >> Currently the driver calculates the next pstate proportional to >> core_busy factor and reverse proportional to current pstate. >> >> Change t

[PATCH] cpufreq: intel_pstate: Disable interrupts during MSRs reading

2014-04-29 Thread Stratos Karafotis
alculation include it in the protected section. This should increase the accuracy of the calculations. Tested on Intel i7-3770 CPU @ 3.40GHz. Benchmarks (Phoronix Linux compilation) show a slightly increase in performance by ~0.1% and a decrease in power consumption by ~0.13%. Signed-off-b

[PATCH] cpufreq: intel_pstate: Remove sample parameter in intel_pstate_calc_busy

2014-04-29 Thread Stratos Karafotis
st line in this function. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/intel_pstate.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 95b3958..8192ff1 100644 --- a/drivers/cpufreq/intel_psta

[PATCH] cpufreq: Break out early when frequency equals target_freq

2014-04-29 Thread Stratos Karafotis
when a frequency in cpufreq_frequency_table equals to target one. Testing this during kernel compilation using ondemand governor with a frequency table in ascending order, the cpufreq_frequency_table_target returned early on the first iteration at about 30% of times called. Signed-off-by: Stratos Kar

Re: [PATCH v5 0/8] Introduce new cpufreq helper macros

2014-04-30 Thread Stratos Karafotis
On 30/04/2014 01:26 πμ, Rafael J. Wysocki wrote: > On Tuesday, April 29, 2014 07:05:17 PM Stratos Karafotis wrote: >> On 29/04/2014 07:17 πμ, Viresh Kumar wrote: >>> On 26 April 2014 01:45, Stratos Karafotis wrote: >>>> This patch set introduces two freq_table helper

[PATCH v2] cpufreq: intel_pstate: Change the calculation of next pstate

2014-05-01 Thread Stratos Karafotis
d by ~0.35% Signed-off-by: Stratos Karafotis --- Changes v1 -> v2 - Enhance change log as Rafael and Viresh suggested drivers/cpufreq/intel_pstate.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_p

Re: [PATCH v2] cpufreq: intel_pstate: Change the calculation of next pstate

2014-05-02 Thread Stratos Karafotis
On 02/05/2014 03:26 μμ, Rafael J. Wysocki wrote: > On Thursday, May 01, 2014 06:48:08 PM Dirk Brandewie wrote: >> On 05/01/2014 04:18 PM, Rafael J. Wysocki wrote: >>> On Thursday, May 01, 2014 02:30:42 PM Dirk Brandewie wrote: >>>> On 05/01/2014 02:00 PM, Stratos Ka

Re: [RFC PATCH] cpufreq: intel_pstate: Change the calculation of next pstate

2014-05-13 Thread Stratos Karafotis
On 13/05/2014 12:59 πμ, Yuyang Du wrote: Maybe, in some cases yes. But not always. For example, please consider a CPU running a tight "for" loop in 100MHz for a couple of seconds. This produces a load of 100%. It will produce the same load (100%) in any other frequency. >>>

[PATCH RESEND] cpufreq: Break out early when frequency equals target_freq

2014-05-14 Thread Stratos Karafotis
when a frequency in cpufreq_frequency_table equals to target one. Testing this during kernel compilation using ondemand governor with a frequency table in ascending order, the cpufreq_frequency_table_target returned early on the first iteration at about 30% of times called. Signed-off-by: Stratos Kar

Re: [PATCH] cpufreq: Break out early when frequency equals target_freq

2014-05-08 Thread Stratos Karafotis
On 29/04/2014 11:28 μμ, Stratos Karafotis wrote: > Many drivers keep frequencies in frequency table in ascending > or descending order. When governor tries to change to policy->min > or policy->max respectively then the cpufreq_frequency_table_target > could return on first it

Re: [RFC PATCH] cpufreq: intel_pstate: Change the calculation of next pstate

2014-05-09 Thread Stratos Karafotis
Hi Dirk, On 08/05/2014 11:52 μμ, Dirk Brandewie wrote: > On 05/05/2014 04:57 PM, Stratos Karafotis wrote: >> Currently the driver calculates the next pstate proportional to >> core_busy factor, scaled by the ratio max_pstate / current_pstate. >> >> Using the scaled lo

[PATCH v2] cpufreq: powernow-k8: Suppress checkpatch warnings

2014-05-11 Thread Stratos Karafotis
of a line Also, define the pr_fmt macro instead of PFX for the module name. Signed-off-by: Stratos Karafotis --- Changes v1 -> v2 - Use pr_err_once instead of printk_once - Change missing_pss_msg to macro (because pr_err_once doesn't compile otherwise) -

Re: [PATCH 4/5] intel_pstate: Remove C0 tracking

2014-05-11 Thread Stratos Karafotis
Hi, On 12/05/2014 05:14 πμ, Stratos Karafotis wrote: > From: Dirk Brandewie > > Commit fcb6a15c intel_pstate: Take core C0 time into account for core busy > introduced a regression referenced below. The issue with "lockup" > after suspend that this commit was addres

Re: [RFC PATCH] cpufreq: intel_pstate: Change the calculation of next pstate

2014-05-12 Thread Stratos Karafotis
On 09/05/2014 05:56 μμ, Stratos Karafotis wrote: > Hi Dirk, > > On 08/05/2014 11:52 μμ, Dirk Brandewie wrote: >> On 05/05/2014 04:57 PM, Stratos Karafotis wrote: >>> Currently the driver calculates the next pstate proportional to >>> core_busy facto

Re: [RFC PATCH] cpufreq: intel_pstate: Change the calculation of next pstate

2014-05-12 Thread Stratos Karafotis
Hi, On 12/05/2014 10:34 μμ, Yuyang Du wrote: > On Mon, May 12, 2014 at 11:30:03PM +0300, Stratos Karafotis wrote: >> On 09/05/2014 05:56 μμ, Stratos Karafotis wrote: >> >> Next performance state = min_perf + (max_perf - min_perf) * load / 100 >> > Hi, > >

Re: [RFC PATCH] cpufreq: intel_pstate: Change the calculation of next pstate

2014-05-12 Thread Stratos Karafotis
On 12/05/2014 11:01 μμ, Yuyang Du wrote: > On Tue, May 13, 2014 at 06:59:42AM +0300, Stratos Karafotis wrote: >> Hi, >> >> On 12/05/2014 10:34 μμ, Yuyang Du wrote: >>> On Mon, May 12, 2014 at 11:30:03PM +0300, Stratos Karafotis wrote: >>>> On 09

[RFC PATCH] cpufreq: Introduce macros for cpufreq_frequency_table iteration

2014-04-10 Thread Stratos Karafotis
. Signed-off-by: Stratos Karafotis --- I found about 20 occurrences in various drivers that these macros can be used. I will proceed with the necessary changes if you approve something like this. Thanks in advance for your time, Stratos Karafotis. --- drivers/cpufreq/freq_table.c | 54

Re: [RFC PATCH] cpufreq: Introduce macros for cpufreq_frequency_table iteration

2014-04-11 Thread Stratos Karafotis
On 11/04/2014 07:24 πμ, Viresh Kumar wrote: > On 11 April 2014 03:31, Stratos Karafotis wrote: >> This patch intoduces 2 macros which can be used for iteration >> over cpufreq_frequency_table: >> >> - cpufreq_for_each_entry: iterate over each entry of the table >&g

Re: [PATCH] tick: fix spelling mistake in tick_handle_periodic()

2014-03-25 Thread Stratos Karafotis
On Tue, Mar 25, 2014 at 11:32 AM, Viresh Kumar wrote: > One of the comments in tick_handle_periodic() had 'when' instead of 'which' > (My > guess :)). Fix it. > > Signed-off-by: Viresh Kumar > --- > kernel/time/tick-common.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

[PATCH 00/20] Introduce new cpufreq helper macros

2014-04-14 Thread Stratos Karafotis
cpufreq_frequency_table across all drivers and cpufreq core. This was tested on a x86_64 platform. Patches 4-17 compiled successfully but unfortunately I was not able to compile test patches 18-20. Stratos Karafotis (20): cpufreq: Introduce macros for cpufreq_frequency_table iteration cpufreq: acpi

[PATCH 02/20] cpufreq: acpi-cpufreq: Use cpufreq_for_each_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/acpi-cpufreq.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions

[PATCH 01/20] cpufreq: Introduce macros for cpufreq_frequency_table iteration

2014-04-14 Thread Stratos Karafotis
- cpufreq_for_each_valid_entry: iterate over each entry that contains a valid frequency. Also, make changes in frequency table helper functions to use these macros. It should have no functional changes. Signed-off-by: Stratos Karafotis --- Documentation/cpu-freq/cpu-drivers.txt | 16

[PATCH 03/20] cpufreq: stats: Use cpufreq_for_each_valid_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_valid_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/cpufreq_stats.c | 22 -- 1 file changed, 8

[PATCH 05/20] cpufreq: dbx500: Use cpufreq_for_each_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/dbx500-cpufreq.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions

[PATCH 07/20] cpufreq: exynos: Use cpufreq_for_each_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/exynos-cpufreq.c | 14 +++--- 1 file changed, 7 insertions(+), 7

[PATCH 06/20] cpufreq: elanfreq: Use cpufreq_for_each_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/elanfreq.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[PATCH 08/20] cpufreq: exynos5440: Use cpufreq_for_each_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/exynos5440-cpufreq.c | 30 +++--- 1 file changed, 15

[PATCH 09/20] cpufreq: longhaul: Use cpufreq_for_each_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/longhaul.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions

[PATCH 11/20] cpufreq: s3c2416: Use cpufreq_for_each_valid_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_entry and cpufreq_for_each_valid_entry macros helpers for iteration over the cpufreq_frequency_table, so use them. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/s3c2416-cpufreq.c | 40

[PATCH 12/20] cpufreq: s3c64xx: Use cpufreq_for_each_valid_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_entry and cpufreq_for_each_valid_entry macros helpers for iteration over the cpufreq_frequency_table, so use them. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/s3c64xx-cpufreq.c | 15 +-- 1

[PATCH 10/20] cpufreq: powernow-k6: Use cpufreq_for_each_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/powernow-k6.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions

[PATCH 17/20] davinci: da850: Use cpufreq_for_each_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- arch/arm/mach-davinci/da850.c | 9 + 1 file changed, 5 insertions(+), 4 deletions

[PATCH 15/20] mfd: db8500-prcmu: Use cpufreq_for_each_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/mfd/db8500-prcmu.c | 18 -- 1 file changed, 8 insertions(+), 10

[PATCH 18/20] cpufreq: pasemi: Use cpufreq_for_each_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- Please note that I was no able to compile test this patch due to lack of cross compiler

[PATCH 14/20] thermal: cpu_cooling: Use cpufreq_for_each_valid_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_valid_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/thermal/cpu_cooling.c | 33 + 1 file changed, 13

[PATCH 20/20] irda: sh_sir: Use cpufreq_for_each_valid_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_valid_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- Please note that I was no able to compile test this patch due to lack of cross compiler

[PATCH 19/20] cpufreq: pcc_cbe: Use cpufreq_for_each_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- Please note that I was no able to compile test this patch due to lack of cross compiler

[PATCH 16/20] mips: lemote 2f: se cpufreq_for_each_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- arch/mips/loongson/lemote-2f/clock.c | 15 +-- 1 file changed, 5 insertions(+), 10

[PATCH 13/20] sh: clk: Use cpufreq_for_each_valid_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_valid_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/sh/clk/core.c | 19 +-- 1 file changed, 5 insertions(+), 14

[PATCH 04/20] cpufreq: arm_big_little: Use cpufreq_for_each_entry macro for iteration

2014-04-14 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/arm_big_little.c | 18 ++ 1 file changed, 10 insertions(+), 8

Re: [PATCH 02/20] cpufreq: acpi-cpufreq: Use cpufreq_for_each_entry macro for iteration

2014-04-15 Thread Stratos Karafotis
On 15/04/2014 08:32 πμ, Viresh Kumar wrote: > On 15 April 2014 02:38, Stratos Karafotis wrote: >> The cpufreq core supports the cpufreq_for_each_entry macro helper >> for iteration over the cpufreq_frequency_table, so use it. >> >> It should have no functional c

Re: [PATCH 08/20] cpufreq: exynos5440: Use cpufreq_for_each_entry macro for iteration

2014-04-15 Thread Stratos Karafotis
On 15/04/2014 08:44 πμ, Viresh Kumar wrote: > On 15 April 2014 02:39, Stratos Karafotis wrote: > >> diff --git a/drivers/cpufreq/exynos5440-cpufreq.c >> b/drivers/cpufreq/exynos5440-cpufreq.c > >> static void exynos_enable_dvfs(unsigned int cur_frequency) >>

Re: [PATCH 00/20] Introduce new cpufreq helper macros

2014-04-15 Thread Stratos Karafotis
On 15/04/2014 09:01 πμ, Viresh Kumar wrote: > On 15 April 2014 02:37, Stratos Karafotis wrote: >> This patch set introduces two freq_table helper macros which >> can be used for iteration over cpufreq_frequency_table and >> makes the necessary changes to cpufreq core and dri

[PATCH v2 1/8] cpufreq: Introduce macros for cpufreq_frequency_table iteration

2014-04-15 Thread Stratos Karafotis
- cpufreq_for_each_valid_entry: iterate over each entry that contains a valid frequency. It should have no functional changes. Signed-off-by: Stratos Karafotis --- Documentation/cpu-freq/cpu-drivers.txt | 16 drivers/cpufreq/cpufreq.c | 11 +++ include/linux

[PATCH v2 0/8] Introduce new cpufreq helper macros

2014-04-15 Thread Stratos Karafotis
pos. - Declare pos variable on a separate line Stratos Karafotis (8): cpufreq: Introduce macros for cpufreq_frequency_table iteration cpufreq: Use cpufreq_for_each_* macros for frequency table iteration davinci: da850: Use cpufreq_for_each_entry macro for iteration mips: lemote 2f:

[PATCH v2 2/8] cpufreq: Use cpufreq_for_each_* macros for frequency table iteration

2014-04-15 Thread Stratos Karafotis
The cpufreq core now supports the cpufreq_for_each_entry and cpufreq_for_each_valid_entry macros helpers for iteration over the cpufreq_frequency_table, so use them. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/acpi-cpufreq.c | 9

[PATCH v2 3/8] davinci: da850: Use cpufreq_for_each_entry macro for iteration

2014-04-15 Thread Stratos Karafotis
The cpufreq core now supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- arch/arm/mach-davinci/da850.c | 9 + 1 file changed, 5 insertions(+), 4 deletions

[PATCH v2 5/8] mfd: db8500-prcmu: Use cpufreq_for_each_entry macro for iteration

2014-04-15 Thread Stratos Karafotis
The cpufreq core now supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/mfd/db8500-prcmu.c | 19 --- 1 file changed, 8 insertions(+), 11

[PATCH v2 4/8] mips: lemote 2f: Use cpufreq_for_each_entry macro for iteration

2014-04-15 Thread Stratos Karafotis
The cpufreq core now supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- arch/mips/loongson/lemote-2f/clock.c | 16 +--- 1 file changed, 5 insertions

[PATCH v2 7/8] irda: sh_sir: Use cpufreq_for_each_valid_entry macro for iteration

2014-04-15 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_valid_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- Please note that I was no able to compile test this patch due to lack of cross compiler

[PATCH v2 8/8] sh: clk: Use cpufreq_for_each_valid_entry macro for iteration

2014-04-15 Thread Stratos Karafotis
The cpufreq core now supports the cpufreq_for_each_valid_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/sh/clk/core.c | 20 +--- 1 file changed, 5 insertions(+), 15

[PATCH v2 6/8] thermal: cpu_cooling: Use cpufreq_for_each_valid_entry macro for iteration

2014-04-15 Thread Stratos Karafotis
The cpufreq core now supports the cpufreq_for_each_valid_entry macro helper for iteration over the cpufreq_frequency_table, so use it. Also remove the redundant !! operator. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/thermal/cpu_cooling.c | 33

[PATCH v3 1/8] cpufreq: Introduce macros for cpufreq_frequency_table iteration

2014-04-16 Thread Stratos Karafotis
- cpufreq_for_each_valid_entry: iterate over each entry that contains a valid frequency. It should have no functional changes. Signed-off-by: Stratos Karafotis --- Changes v2 -> v3 - Better formatting in Documentation - Fix spell error in comments Documentation/cpu-freq/

Re: [PATCH v2 8/8] sh: clk: Use cpufreq_for_each_valid_entry macro for iteration

2014-04-16 Thread Stratos Karafotis
On 16/04/2014 07:13 πμ, Simon Horman wrote: > On Wed, Apr 16, 2014 at 01:27:04AM +0300, Stratos Karafotis wrote: >> The cpufreq core now supports the cpufreq_for_each_valid_entry macro >> helper for iteration over the cpufreq_frequency_table, so use it. >> >> It should

Re: [PATCH v2 0/8] Introduce new cpufreq helper macros

2014-04-16 Thread Stratos Karafotis
On 16/04/2014 07:01 πμ, Viresh Kumar wrote: > On 16 April 2014 03:55, Stratos Karafotis wrote: >> Hi all, >> >> This patch set introduces two freq_table helper macros which >> can be used for iteration over cpufreq_frequency_table and >> makes the necessary ch

Re: [PATCH 2/2] cpufreq: ondemand: Eliminate the deadband effect

2014-07-11 Thread Stratos Karafotis
Hi Pavel! On 11/07/2014 07:57 μμ, Pavel Machek wrote: > Hi! > >> Tested on Intel i7-3770 CPU @ 3.40GHz and on ARM quad core 1500MHz Krait >> (Android smartphone). >> Benchmarks on Intel i7 shows a performance improvement on low and medium >> work loads with lower power consumption. Specifics: >>

Re: [PATCH 2/2] cpufreq: ondemand: Eliminate the deadband effect

2014-07-11 Thread Stratos Karafotis
On 11/07/2014 09:34 μμ, Pavel Machek wrote: > On Fri 2014-07-11 20:29:57, Stratos Karafotis wrote: >> Hi Pavel! >> >> On 11/07/2014 07:57 μμ, Pavel Machek wrote: >>> Hi! >>> >>>> Tested on Intel i7-3770 CPU @ 3.40GHz and on ARM quad core 1500MHz

Re: [PATCH 0/2] cpufreq: ondemand: Eliminate the deadband effect

2014-07-13 Thread Stratos Karafotis
Hi Doug, On 12/07/2014 06:45 μμ, Doug Smythies wrote: > > On 2014.07.30 10:00 Stratos Karafotis wrote: > >> This patchset changes slightly the calculation of target frequency to >> eliminate the deadband effect (explained in patch 2 changelog) that it >> seems to s

[PATCH 1/2] cpufreq: Introduce new relation for freq selection

2014-06-30 Thread Stratos Karafotis
Introduce CPUFREQ_RELATION_C for frequency selection. It selects the frequency with the minimum euclidean distance to target. In case of equal distance between 2 frequencies, it will select the greater frequency. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/freq_table.c | 12

[PATCH 0/2] cpufreq: ondemand: Eliminate the deadband effect

2014-06-30 Thread Stratos Karafotis
the closest frequency to target. Patch 2 is the actual change to ondemand governor. You may find graphs with the 'deadband' effect and benchmark results: https://docs.google.com/spreadsheets/d/16kDBh5lyc6YvBnoS1hUa1t2O38z0xrWvaEj5XtJ8auw/edit#gid=2072493052 Thanks Stratos Ka

[PATCH 2/2] cpufreq: ondemand: Eliminate the deadband effect

2014-06-30 Thread Stratos Karafotis
% Phoronix FFMPEG: Time: -6.29%, energy: -4.02% Also, running mp3 decoding (very low load) shows no differences with and without this patch. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/cpufreq_ondemand.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a

[PATCH v3 3/8] ARM: davinci: da850: Use cpufreq_for_each_entry macro for iteration

2014-04-21 Thread Stratos Karafotis
The cpufreq core now supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- Changes v2 -> v3 - Added 'ARM' prefix in the subject as Sekhar N

[PATCH v4 1/8] cpufreq: Introduce macros for cpufreq_frequency_table iteration

2014-04-21 Thread Stratos Karafotis
- cpufreq_for_each_valid_entry: iterate over each entry that contains a valid frequency. It should have no functional changes. Signed-off-by: Stratos Karafotis --- Documentation/cpu-freq/cpu-drivers.txt | 19 +++ drivers/cpufreq/cpufreq.c | 11 +++ include/linux

[PATCH v4 2/8] cpufreq: Use cpufreq_for_each_* macros for frequency table iteration

2014-04-21 Thread Stratos Karafotis
The cpufreq core now supports the cpufreq_for_each_entry and cpufreq_for_each_valid_entry macros helpers for iteration over the cpufreq_frequency_table, so use them. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/acpi-cpufreq.c | 9

[PATCH v4 5/8] mfd: db8500-prcmu: Use cpufreq_for_each_entry macro for iteration

2014-04-21 Thread Stratos Karafotis
The cpufreq core now supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/mfd/db8500-prcmu.c | 19 --- 1 file changed, 8 insertions(+), 11

[PATCH v4 3/8] ARM: davinci: da850: Use cpufreq_for_each_entry macro for iteration

2014-04-21 Thread Stratos Karafotis
The cpufreq core now supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- arch/arm/mach-davinci/da850.c | 9 + 1 file changed, 5 insertions(+), 4 deletions

[PATCH v4 4/8] mips: lemote 2f: Use cpufreq_for_each_entry macro for iteration

2014-04-21 Thread Stratos Karafotis
The cpufreq core now supports the cpufreq_for_each_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- arch/mips/loongson/lemote-2f/clock.c | 16 +--- 1 file changed, 5 insertions

[PATCH v4 7/8] irda: sh_sir: Use cpufreq_for_each_valid_entry macro for iteration

2014-04-21 Thread Stratos Karafotis
The cpufreq core supports the cpufreq_for_each_valid_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- Please note that I was no able to compile test this patch due to lack of cross compiler

[PATCH v4 6/8] thermal: cpu_cooling: Use cpufreq_for_each_valid_entry macro for iteration

2014-04-21 Thread Stratos Karafotis
The cpufreq core now supports the cpufreq_for_each_valid_entry macro helper for iteration over the cpufreq_frequency_table, so use it. Also remove the redundant !! operator. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/thermal/cpu_cooling.c | 33

[PATCH v4 8/8] sh: clk: Use cpufreq_for_each_valid_entry macro for iteration

2014-04-21 Thread Stratos Karafotis
The cpufreq core now supports the cpufreq_for_each_valid_entry macro helper for iteration over the cpufreq_frequency_table, so use it. It should have no functional changes. Signed-off-by: Stratos Karafotis --- drivers/sh/clk/core.c | 20 +--- 1 file changed, 5 insertions(+), 15

Re: [PATCH 0/2] cpufreq: ondemand: Eliminate the deadband effect

2014-07-23 Thread Stratos Karafotis
On 07/23/2014 02:50 AM, Rafael J. Wysocki wrote: On Monday, June 30, 2014 07:59:32 PM Stratos Karafotis wrote: Hi all, This patchset changes slightly the calculation of target frequency to eliminate the deadband effect (explained in patch 2 changelog) that it seems to slow down the CPU in low

[PATCH 0/7] cpufreq: intel_pstate: Debugfs file addition and cleanups

2014-06-09 Thread Stratos Karafotis
ifies calculation if tracing is on). Thanks! Stratos Karafotis (7): cpufreq: intel_pstate: Remove duplicate CPU ID check cpufreq: intel_pstate: Avoid duplicate call of intel_pstate_get_scaled_busy cpufreq: intel_pstate: Add debugfs file stats cpufreq: intel_pstate: Simplify co

[PATCH 5/7] cpufreq: intel_pstate: Remove redundant includes

2014-06-09 Thread Stratos Karafotis
Also put them in alphabetical order. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/intel_pstate.c | 17 ++--- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 26a0262..d4f0518 100644 --- a

[PATCH 2/7] cpufreq: intel_pstate: Avoid duplicate call of intel_pstate_get_scaled_busy

2014-06-09 Thread Stratos Karafotis
Store busy_scaled value to avoid to duplicate call of intel_pstate_get_scaled_busy on every sampling interval. Also, rename the function to intel_pstate_calc_scaled_busy. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/intel_pstate.c | 12 ++-- 1 file changed, 6 insertions(+), 6

[PATCH 7/7] cpufreq: intel_pstate: Make intel_pstate_kobject local

2014-06-09 Thread Stratos Karafotis
Since we never remove sysfs entry, we can make the intel_pstate_kobject local. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/intel_pstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index fa44f0f

[PATCH 6/7] cpufreq: intel_pstate: Trivial code cleanup

2014-06-09 Thread Stratos Karafotis
Remove unnecessary blank lines. Remove unnecessary parentheses. Remove unnecessary braces. Put the code in one line where possible. Add blank lines after variable declarations. Alignment to open parenthesis. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/intel_pstate.c | 96

[PATCH 4/7] cpufreq: intel_pstate: Simplify code in intel_pstate_adjust_busy_pstate

2014-06-09 Thread Stratos Karafotis
Simplify the code by removing the inline functions pstate_increase and pstate_decrease and use directly the intel_pstate_set_pstate. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/intel_pstate.c | 26 +++--- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git

[PATCH 1/7] cpufreq: intel_pstate: Remove duplicate CPU ID check

2014-06-09 Thread Stratos Karafotis
We check the CPU ID during driver init. There is no need to do it again per logical CPU initialization. So, remove the duplicate check. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/intel_pstate.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/cpufreq/intel_pstate.c b

[PATCH 3/7] cpufreq: intel_pstate: Add debugfs file stats

2014-06-09 Thread Stratos Karafotis
70 39 85446 3803 ... The file can be used for debugging but also for monitoring various system workloads. Also, make the debugfs_parent local as we never remove the driver's debugfs files. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/intel_pst

Re: [PATCH 7/7] cpufreq: intel_pstate: Make intel_pstate_kobject local

2014-06-09 Thread Stratos Karafotis
On 10/06/2014 12:07 πμ, David Rientjes wrote: > On Tue, 10 Jun 2014, Stratos Karafotis wrote: > >> Since we never remove sysfs entry, we can make the intel_pstate_kobject >> local. >> > > For even more savings, this function and > intel_pstate_debug_expose_para

Re: [PATCH 6/7] cpufreq: intel_pstate: Trivial code cleanup

2014-06-10 Thread Stratos Karafotis
On 10/06/2014 12:22 πμ, Joe Perches wrote: > On Tue, 2014-06-10 at 00:01 +0300, Stratos Karafotis wrote: >> Remove unnecessary braces. > > [] > >> @@ -204,20 +203,16 @@ static inline void intel_pstate_busy_pid_reset(struct >> cpudata *cpu) > >> static

Re: [PATCH 5/7] cpufreq: intel_pstate: Remove redundant includes

2014-06-10 Thread Stratos Karafotis
On 10/06/2014 08:29 πμ, Viresh Kumar wrote: > On 10 June 2014 02:30, Stratos Karafotis wrote: >> Also put them in alphabetical order. >> >> Signed-off-by: Stratos Karafotis >> --- >> drivers/cpufreq/intel_pstate.c | 17 ++--- >> 1 file

Re: [PATCH 4/7] cpufreq: intel_pstate: Simplify code in intel_pstate_adjust_busy_pstate

2014-06-10 Thread Stratos Karafotis
On 10/06/2014 08:27 πμ, Viresh Kumar wrote: > On 10 June 2014 02:30, Stratos Karafotis wrote: >> Simplify the code by removing the inline functions >> pstate_increase and pstate_decrease and use directly the >> intel_pstate_set_pstate. >> >> Signed-off-by: Stra

Re: [PATCH 3/7] cpufreq: intel_pstate: Add debugfs file stats

2014-06-10 Thread Stratos Karafotis
On 10/06/2014 06:47 μμ, Dirk Brandewie wrote: > On 06/09/2014 02:00 PM, Stratos Karafotis wrote: >> Add stats file in debugfs under driver's parent directory >> (pstate_snb) which counts the time in nsecs per requested >> P state and the number of times the speci

Re: [PATCH 2/7] cpufreq: intel_pstate: Avoid duplicate call of intel_pstate_get_scaled_busy

2014-06-10 Thread Stratos Karafotis
On 10/06/2014 07:05 μμ, Dirk Brandewie wrote: > On 06/09/2014 02:00 PM, Stratos Karafotis wrote: >> Store busy_scaled value to avoid to duplicate call of >> intel_pstate_get_scaled_busy on every sampling interval. >> > > The second call *only* happens if the tracepo

Re: [PATCH 3/7] cpufreq: intel_pstate: Add debugfs file stats

2014-06-10 Thread Stratos Karafotis
On 10/06/2014 08:05 μμ, Dirk Brandewie wrote: > On 06/10/2014 09:21 AM, Stratos Karafotis wrote: >> On 10/06/2014 06:47 μμ, Dirk Brandewie wrote: >>> On 06/09/2014 02:00 PM, Stratos Karafotis wrote: >>>> Add stats file in debugfs under driver's parent directory

Re: [PATCH 4/7] cpufreq: intel_pstate: Simplify code in intel_pstate_adjust_busy_pstate

2014-06-10 Thread Stratos Karafotis
On 10/06/2014 08:07 μμ, Dirk Brandewie wrote: > On 06/10/2014 07:51 AM, Stratos Karafotis wrote: >> On 10/06/2014 08:27 πμ, Viresh Kumar wrote: >>> On 10 June 2014 02:30, Stratos Karafotis wrote: >>>> Simplify the code by removing the inline functions >>>&g

Re: [PATCH 6/7] cpufreq: intel_pstate: Trivial code cleanup

2014-06-10 Thread Stratos Karafotis
On 10/06/2014 11:17 μμ, Rafael J. Wysocki wrote: > On Tuesday, June 10, 2014 10:26:44 AM Dirk Brandewie wrote: >> On 06/10/2014 08:31 AM, Rafael J. Wysocki wrote: >>> On Tuesday, June 10, 2014 08:12:48 AM Dirk Brandewie wrote: >>>> On 06/09/2014 02:01 PM, Stratos

Re: [PATCH 6/7] cpufreq: intel_pstate: Trivial code cleanup

2014-06-10 Thread Stratos Karafotis
On 10/06/2014 11:43 μμ, Rafael J. Wysocki wrote: > On Tuesday, June 10, 2014 11:14:53 PM Stratos Karafotis wrote: >> On 10/06/2014 11:17 μμ, Rafael J. Wysocki wrote: >>> On Tuesday, June 10, 2014 10:26:44 AM Dirk Brandewie wrote: >>>> On 06/10/2014 08:31 AM, Raf

Re: [PATCH 6/7] cpufreq: intel_pstate: Trivial code cleanup

2014-06-10 Thread Stratos Karafotis
On 11/06/2014 12:38 πμ, Rafael J. Wysocki wrote: > On Wednesday, June 11, 2014 12:02:09 AM Stratos Karafotis wrote: >> On 10/06/2014 11:43 μμ, Rafael J. Wysocki wrote: >>> On Tuesday, June 10, 2014 11:14:53 PM Stratos Karafotis wrote: >>>> On 10/06/2014 11:17 μμ, Raf

[PATCH] cpufreq: intel_pstate: Fix rounding of core_pct

2014-06-11 Thread Stratos Karafotis
is (before rounding): core_pct = 12111 fp_toint(core_pct) = 47 After rounding: core_pct = 12112 fp_toint(core_pct) = 47 After rounding with int_toftp(1): core_pct = 12367 fp_toint(core_pct) = 48 Signed-off-by: Stratos Karafotis --- Hi Rafael, I'm sorry for submitting again in merge window, but

Re: [PATCH] cpufreq: intel_pstate: Fix rounding of core_pct

2014-06-11 Thread Stratos Karafotis
On 11/06/2014 04:41 μμ, Doug Smythies wrote: > > On 2014.06.11 05:34 Stratos Karafotis wrote: > >> Local variable core_pct holds fixed point values. >> When we round it we add "1" to core_pct. This has almost >> no effect. >> >> So, add int_toft

Re: [PATCH] cpufreq: intel_pstate: Fix rounding of core_pct

2014-06-11 Thread Stratos Karafotis
On 11/06/2014 06:02 μμ, Doug Smythies wrote: > > On 2104.06.11 07:08 Stratos Karafotis wrote: >> On 11/06/2014 04:41 μμ, Doug Smythies wrote: >> >> No. >> >> The intent was only ever to round properly the pseudo floating point result >> of the divide.

Re: [PATCH] cpufreq: intel_pstate: Fix rounding of core_pct

2014-06-12 Thread Stratos Karafotis
On 12/06/2014 12:15 πμ, Doug Smythies wrote: > > > -Original Message- > From: Stratos Karafotis [mailto:strat...@semaphore.gr] > Sent: June-11-2014 13:20 > To: Doug Smythies > Cc: linux...@vger.kernel.org; linux-kernel@vger.kernel.org; > r...@rjwysocki.net;

<    1   2   3   >