[RFC][PATCH] cpufreq: governor: Change the calculation of load for deferred updates

2016-11-17 Thread Stratos Karafotis
me_elapsed - idle_time and load = 100 * busy / sampling_rate; Also, remove the 'unlikely' hint because it seems that a deferred update is a very common case on most modern systems. Signed-off-by: Stratos Karafotis <strat...@semaphore.gr> --- drivers/cpufreq/cpufreq

[RFC][PATCH] cpufreq: governor: Change the calculation of load for deferred updates

2016-11-17 Thread Stratos Karafotis
me_elapsed - idle_time and load = 100 * busy / sampling_rate; Also, remove the 'unlikely' hint because it seems that a deferred update is a very common case on most modern systems. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/cpufreq_governor.c | 37 +++-

[PATCH v2] cpufreq: conservative: Fix comment explaining frequency updates

2016-11-16 Thread Stratos Karafotis
The original comment about the frequency increase to maximum is wrong. Both increase and decrease happen at steps. Signed-off-by: Stratos Karafotis <strat...@semaphore.gr> --- -> v2 Remove a trailing space drivers/cpufreq/cpufreq_conservative.c | 4 ++-- 1 file changed, 2 inserti

[PATCH v2] cpufreq: conservative: Fix comment explaining frequency updates

2016-11-16 Thread Stratos Karafotis
The original comment about the frequency increase to maximum is wrong. Both increase and decrease happen at steps. Signed-off-by: Stratos Karafotis --- -> v2 Remove a trailing space drivers/cpufreq/cpufreq_conservative.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --

[PATCH] cpufreq: conservative: Fix comment explaining frequency updates

2016-11-16 Thread Stratos Karafotis
The original comment about the frequency increase to maximum is wrong. Both increase and decrease happen at steps. Signed-off-by: Stratos Karafotis <strat...@semaphore.gr> --- drivers/cpufreq/cpufreq_conservative.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/d

[PATCH] cpufreq: conservative: Fix comment explaining frequency updates

2016-11-16 Thread Stratos Karafotis
The original comment about the frequency increase to maximum is wrong. Both increase and decrease happen at steps. Signed-off-by: Stratos Karafotis --- drivers/cpufreq/cpufreq_conservative.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/cpufreq

[PATCH v4] cpufreq: conservative: Decrease frequency faster when the update deferred

2016-11-16 Thread Stratos Karafotis
frequency after 0.86s Signed-off-by: Stratos Karafotis <strat...@semaphore.gr> Acked-by: Viresh Kumar <viresh.ku...@linaro.org> --- v3 -> v4 - Fix format issues - Ack by Viresh Kumar v2 -> v3 - cpufreq_conservative.c: move the calculation below the block that check the limits - Calcu

[PATCH v4] cpufreq: conservative: Decrease frequency faster when the update deferred

2016-11-16 Thread Stratos Karafotis
frequency after 0.86s Signed-off-by: Stratos Karafotis Acked-by: Viresh Kumar --- v3 -> v4 - Fix format issues - Ack by Viresh Kumar v2 -> v3 - cpufreq_conservative.c: move the calculation below the block that check the limits - Calculate the freq_step only once - Fix the bug introduced in dbs_

[PATCH v3] cpufreq: conservative: Decrease frequency faster when the update deferred

2016-11-15 Thread Stratos Karafotis
frequency after 0.86s Signed-off-by: Stratos Karafotis <strat...@semaphore.gr> --- v2 -> v3 - cpufreq_conservative.c: move the calculation below the block that check the limits - Calculate the freq_step only once - Fix the bug introduced in dbs_update() because of wrong estimation of 'if' condit

[PATCH v3] cpufreq: conservative: Decrease frequency faster when the update deferred

2016-11-15 Thread Stratos Karafotis
frequency after 0.86s Signed-off-by: Stratos Karafotis --- v2 -> v3 - cpufreq_conservative.c: move the calculation below the block that check the limits - Calculate the freq_step only once - Fix the bug introduced in dbs_update() because of wrong estimation of 'if' conditions v1 -> v2 - Use c

Re: [PATCH v2] cpufreq: conservative: Decrease frequency faster when the update deferred

2016-11-14 Thread Stratos Karafotis
On 15/11/2016 12:09 πμ, Rafael J. Wysocki wrote: > On Mon, Nov 14, 2016 at 10:59 PM, Rafael J. Wysocki <raf...@kernel.org> wrote: >> On Mon, Nov 14, 2016 at 10:46 PM, Stratos Karafotis >> <strat...@semaphore.gr> wrote: >>> >>> >>> On 14/11/20

Re: [PATCH v2] cpufreq: conservative: Decrease frequency faster when the update deferred

2016-11-14 Thread Stratos Karafotis
On 15/11/2016 12:09 πμ, Rafael J. Wysocki wrote: > On Mon, Nov 14, 2016 at 10:59 PM, Rafael J. Wysocki wrote: >> On Mon, Nov 14, 2016 at 10:46 PM, Stratos Karafotis >> wrote: >>> >>> >>> On 14/11/2016 10:44 μμ, Rafael J. Wysocki wrote: >>>&g

Re: [PATCH v2] cpufreq: conservative: Decrease frequency faster when the update deferred

2016-11-14 Thread Stratos Karafotis
On 14/11/2016 10:44 μμ, Rafael J. Wysocki wrote: > On Sat, Nov 12, 2016 at 10:04 PM, Stratos Karafotis > <strat...@semaphore.gr> wrote: >> Conservative governor changes the CPU frequency in steps. >> That means that if a CPU runs at max frequency, it will need sev

Re: [PATCH v2] cpufreq: conservative: Decrease frequency faster when the update deferred

2016-11-14 Thread Stratos Karafotis
On 14/11/2016 10:44 μμ, Rafael J. Wysocki wrote: > On Sat, Nov 12, 2016 at 10:04 PM, Stratos Karafotis > wrote: >> Conservative governor changes the CPU frequency in steps. >> That means that if a CPU runs at max frequency, it will need several >> sampling periods to

[PATCH v2] cpufreq: conservative: Decrease frequency faster when the update deferred

2016-11-12 Thread Stratos Karafotis
frequency after 0.86s Signed-off-by: Stratos Karafotis <strat...@semaphore.gr> --- v1 -> v2 - Use correct terminology in change log - Change the member variable name from 'deferred_periods' to 'idle_periods' - Fix format issue drivers/cpufreq/cpufreq_conservative.c | 14 +- driver

[PATCH v2] cpufreq: conservative: Decrease frequency faster when the update deferred

2016-11-12 Thread Stratos Karafotis
frequency after 0.86s Signed-off-by: Stratos Karafotis --- v1 -> v2 - Use correct terminology in change log - Change the member variable name from 'deferred_periods' to 'idle_periods' - Fix format issue drivers/cpufreq/cpufreq_conservative.c | 14 +- drivers/cpufreq/cpufreq_governo

Re: [Resend][PATCH] cpufreq: conservative: Decrease frequency faster when the timer deferred

2016-11-10 Thread Stratos Karafotis
On 10/11/2016 02:13 πμ, Rafael J. Wysocki wrote: > On Wed, Nov 9, 2016 at 6:55 AM, Viresh Kumar <viresh.ku...@linaro.org> wrote: >> On 08-11-16, 21:25, Stratos Karafotis wrote: >>> But this is the supposed behaviour of conservative governor. We want >>> the CPU t

Re: [Resend][PATCH] cpufreq: conservative: Decrease frequency faster when the timer deferred

2016-11-10 Thread Stratos Karafotis
On 10/11/2016 02:13 πμ, Rafael J. Wysocki wrote: > On Wed, Nov 9, 2016 at 6:55 AM, Viresh Kumar wrote: >> On 08-11-16, 21:25, Stratos Karafotis wrote: >>> But this is the supposed behaviour of conservative governor. We want >>> the CPU to increase the frequency in s

Re: [Resend][PATCH] cpufreq: conservative: Decrease frequency faster when the timer deferred

2016-11-09 Thread Stratos Karafotis
On 09/11/2016 07:55 πμ, Viresh Kumar wrote: > On 08-11-16, 21:25, Stratos Karafotis wrote: >> But this is the supposed behaviour of conservative governor. We want >> the CPU to increase the frequency in steps. The patch just resets >> the frequency to a lower freq

Re: [Resend][PATCH] cpufreq: conservative: Decrease frequency faster when the timer deferred

2016-11-09 Thread Stratos Karafotis
On 09/11/2016 07:55 πμ, Viresh Kumar wrote: > On 08-11-16, 21:25, Stratos Karafotis wrote: >> But this is the supposed behaviour of conservative governor. We want >> the CPU to increase the frequency in steps. The patch just resets >> the frequency to a lower freq

Re: [Resend][PATCH] cpufreq: conservative: Decrease frequency faster when the timer deferred

2016-11-08 Thread Stratos Karafotis
On 08/11/2016 10:32 πμ, Viresh Kumar wrote: > On 8 November 2016 at 12:49, Stratos Karafotis <strat...@semaphore.gr> wrote: >> I think we shouldn't. That's why the patch first decreases the frequency >> by n freq steps (where n the number of deferred periods). >> Then

Re: [Resend][PATCH] cpufreq: conservative: Decrease frequency faster when the timer deferred

2016-11-08 Thread Stratos Karafotis
On 08/11/2016 10:32 πμ, Viresh Kumar wrote: > On 8 November 2016 at 12:49, Stratos Karafotis wrote: >> I think we shouldn't. That's why the patch first decreases the frequency >> by n freq steps (where n the number of deferred periods). >> Then the normal processing takes pl

Re: [Resend][PATCH] cpufreq: conservative: Decrease frequency faster when the timer deferred

2016-11-07 Thread Stratos Karafotis
Hi, Thanks for reviewing. On 07/11/2016 08:12 πμ, Viresh Kumar wrote: > For the record, I have never got the original mail with this subject. I'm sorry for inconvenience. It seems that I had an issue on my mail server. > On 06-11-16, 11:19, Stratos Karafotis wrote: >> Conservat

Re: [Resend][PATCH] cpufreq: conservative: Decrease frequency faster when the timer deferred

2016-11-07 Thread Stratos Karafotis
Hi, Thanks for reviewing. On 07/11/2016 08:12 πμ, Viresh Kumar wrote: > For the record, I have never got the original mail with this subject. I'm sorry for inconvenience. It seems that I had an issue on my mail server. > On 06-11-16, 11:19, Stratos Karafotis wrote: >> Conservat

[Resend][PATCH] cpufreq: conservative: Decrease frequency faster when the timer deferred

2016-11-06 Thread Stratos Karafotis
after 0.86s Signed-off-by: Stratos Karafotis <strat...@semaphore.gr> --- drivers/cpufreq/cpufreq_conservative.c | 9 + drivers/cpufreq/cpufreq_governor.c | 18 +- drivers/cpufreq/cpufreq_governor.h | 1 + 3 files changed, 23 insertions(+), 5 deletions(-) diff

[Resend][PATCH] cpufreq: conservative: Decrease frequency faster when the timer deferred

2016-11-06 Thread Stratos Karafotis
after 0.86s Signed-off-by: Stratos Karafotis --- drivers/cpufreq/cpufreq_conservative.c | 9 + drivers/cpufreq/cpufreq_governor.c | 18 +- drivers/cpufreq/cpufreq_governor.h | 1 + 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/drivers/cpufreq

[PATCH] cpufreq: conservative: Decrease frequency faster when the timer deferred

2016-10-23 Thread Stratos Karafotis
after 0.86s Signed-off-by: Stratos Karafotis <strat...@semaphore.gr> --- drivers/cpufreq/cpufreq_conservative.c | 9 + drivers/cpufreq/cpufreq_governor.c | 18 +- drivers/cpufreq/cpufreq_governor.h | 1 + 3 files changed, 23 insertions(+), 5 deletions(-) diff

[PATCH] cpufreq: conservative: Decrease frequency faster when the timer deferred

2016-10-23 Thread Stratos Karafotis
after 0.86s Signed-off-by: Stratos Karafotis --- drivers/cpufreq/cpufreq_conservative.c | 9 + drivers/cpufreq/cpufreq_governor.c | 18 +- drivers/cpufreq/cpufreq_governor.h | 1 + 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/drivers/cpufreq

Re: [PATCH 1/1] cpufreq: pcc-cpufreq: Re-introduce deadband effect to reduce number of frequency changes

2016-09-19 Thread Stratos Karafotis
On Mon, Sep 19, 2016 at 7:16 PM, Andreas Herrmann <aherrm...@suse.com> wrote: > On Fri, Sep 16, 2016 at 09:58:42PM +0300, Stratos Karafotis wrote: >> Hi, >> >> [ I 'm resending this message, because I think some recipients didn't receive >> it. ] >> >

Re: [PATCH 1/1] cpufreq: pcc-cpufreq: Re-introduce deadband effect to reduce number of frequency changes

2016-09-19 Thread Stratos Karafotis
On Mon, Sep 19, 2016 at 7:16 PM, Andreas Herrmann wrote: > On Fri, Sep 16, 2016 at 09:58:42PM +0300, Stratos Karafotis wrote: >> Hi, >> >> [ I 'm resending this message, because I think some recipients didn't receive >> it. ] >> >> On 16/09/2016 12:47 μμ, A

Re: [PATCH 1/1] cpufreq: pcc-cpufreq: Re-introduce deadband effect to reduce number of frequency changes

2016-09-16 Thread Stratos Karafotis
Hi, On 16/09/2016 12:47 μμ, Andreas Herrmann wrote: > On Wed, Sep 07, 2016 at 10:32:01AM +0530, Viresh Kumar wrote: >> On 01-09-16, 15:21, Andreas Herrmann wrote: >>> On Mon, Aug 29, 2016 at 11:31:53AM +0530, Viresh Kumar wrote: > I am _really_ worried about such hacks in drivers to negate

Re: [PATCH 1/1] cpufreq: pcc-cpufreq: Re-introduce deadband effect to reduce number of frequency changes

2016-09-16 Thread Stratos Karafotis
Hi, On 16/09/2016 12:47 μμ, Andreas Herrmann wrote: > On Wed, Sep 07, 2016 at 10:32:01AM +0530, Viresh Kumar wrote: >> On 01-09-16, 15:21, Andreas Herrmann wrote: >>> On Mon, Aug 29, 2016 at 11:31:53AM +0530, Viresh Kumar wrote: > I am _really_ worried about such hacks in drivers to negate

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

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

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

2014-07-20 Thread Stratos Karafotis
On 21/07/2014 12:51 πμ, 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.

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

2014-07-20 Thread Stratos Karafotis
On 21/07/2014 12:51 πμ, 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: Phoronix Linux Kernel

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

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 slow down the CPU in low and medium

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 1500M

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
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: Phoronix

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 Krait (Android smartphone). Benchmarks on Intel i7 shows

[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 Karafotis (2

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

2014-06-30 Thread Stratos Karafotis
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/drivers/c

[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 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 strat...@semaphore.gr --- drivers/cpufreq

[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 Karafotis (2

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

2014-06-30 Thread Stratos Karafotis
, running mp3 decoding (very low load) shows no differences with and without this patch. Signed-off-by: Stratos Karafotis strat...@semaphore.gr --- drivers/cpufreq/cpufreq_ondemand.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/cpufreq_ondemand.c b

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

2014-06-14 Thread Stratos Karafotis
On 14/06/2014 06:45 μμ, Doug Smythies wrote: > I am sorry to be late chiming in on this one. > > On 2014.06.10 09:27 Stratos Karafotis wrote: >> On 10/06/2014 07:05 μμ, Dirk Brandewie wrote: >> On 06/09/2014 02:00 PM, Stratos Karafotis wrote: >>> Store busy_scaled va

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

2014-06-14 Thread Stratos Karafotis
On 14/06/2014 06:45 μμ, Doug Smythies wrote: I am sorry to be late chiming in on this one. On 2014.06.10 09:27 Stratos Karafotis wrote: 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

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

2014-06-13 Thread Stratos Karafotis
On 13/06/2014 09:49 πμ, Doug Smythies wrote: > On 2014.06.12 13:03 Rafael J. Wysocki wrote: >> On Thursday, June 12, 2014 05:35:59 PM Stratos Karafotis wrote: >>> On 12/06/2014 12:15 πμ, Doug Smythies wrote: >>>> >>>> >>>> On 2014.06.11 13:20

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

2014-06-13 Thread Stratos Karafotis
On 13/06/2014 04:48 μμ, Dirk Brandewie wrote: > On 06/12/2014 01:03 PM, Rafael J. Wysocki wrote: >> On Thursday, June 12, 2014 05:35:59 PM Stratos Karafotis wrote: >>> On 12/06/2014 12:15 πμ, Doug Smythies wrote: >>>> >>>> >>>> -Original M

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

2014-06-13 Thread Stratos Karafotis
On 13/06/2014 04:48 μμ, Dirk Brandewie wrote: On 06/12/2014 01:03 PM, Rafael J. Wysocki wrote: On Thursday, June 12, 2014 05:35:59 PM Stratos Karafotis wrote: On 12/06/2014 12:15 πμ, Doug Smythies wrote: -Original Message- From: Stratos Karafotis [mailto:strat...@semaphore.gr] Sent

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

2014-06-13 Thread Stratos Karafotis
On 13/06/2014 09:49 πμ, Doug Smythies wrote: On 2014.06.12 13:03 Rafael J. Wysocki wrote: On Thursday, June 12, 2014 05:35:59 PM Stratos Karafotis wrote: On 12/06/2014 12:15 πμ, Doug Smythies wrote: On 2014.06.11 13:20 Stratos Karafotis wrote: On 11/06/2014 06:02 μμ, Doug Smythies wrote

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;

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; viresh.ku...@linaro.org

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-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

[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

[PATCH] cpufreq: intel_pstate: Fix rounding of core_pct

2014-06-11 Thread Stratos Karafotis
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 strat...@semaphore.gr --- Hi Rafael, I'm sorry for submitting again in merge window

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_toftp(1) to core_pct when rounding. For example, in a given sample

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. It was much more important (ugh, well 4 times more) when

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:

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:

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 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 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 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 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 specific s

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 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 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 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 inline void intel_pstate_reset_all_pid(void

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 strat...@semaphore.gr wrote: Also put them in alphabetical order. Signed-off-by: Stratos Karafotis strat...@semaphore.gr --- drivers/cpufreq/intel_pstate.c | 17 ++--- 1 file changed, 2

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 strat...@semaphore.gr 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: Stratos Karafotis strat

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 specific state was requested. The file

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 tracepoint is being used otherwise the whole

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 (pstate_snb) which counts the time in nsecs

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 strat...@semaphore.gr wrote: Simplify the code by removing the inline functions pstate_increase

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 Karafotis wrote: Remove unnecessary blank

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, Rafael J. Wysocki wrote: On Tuesday, June 10

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 μμ, Rafael J. Wysocki wrote: On Tuesday, June

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

[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
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_pstate.c | 80

[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 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

[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 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 0/7] cpufreq: intel_pstate: Debugfs file addition and cleanups

2014-06-09 Thread Stratos Karafotis
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 code

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

2014-06-09 Thread Stratos Karafotis
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 code

[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 strat...@semaphore.gr --- 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

[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 strat...@semaphore.gr --- drivers/cpufreq/intel_pstate.c | 12 ++-- 1 file changed

[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 strat...@semaphore.gr --- drivers/cpufreq/intel_pstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq

[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 strat...@semaphore.gr --- drivers/cpufreq

[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 strat...@semaphore.gr --- drivers/cpufreq/intel_pstate.c | 26 +++--- 1 file changed, 3 insertions(+), 23

[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 strat...@semaphore.gr --- drivers/cpufreq/intel_pstate.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers

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

2014-06-09 Thread Stratos Karafotis
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 strat...@semaphore.gr --- drivers/cpufreq/intel_pstate.c | 80

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_params() can be annotated with __init and freed

  1   2   3   4   5   >