Re: [PATCH v3 1/3] cpufreq: add cpufreq_driver_resolve_freq()

2016-07-21 Thread Steve Muckle
On Thu, Jul 21, 2016 at 04:36:48PM -0700, Steve Muckle wrote: > As another alternative, this could be caught in cpufreq driver > initialization? I believe you suggested that originally, but I avoided > it as I didn't want to have to implement resolve_freq() for every > target()

Re: [PATCH V2] cpufreq: Disallow ->resolve_freq() for drivers providing ->target_index()

2016-07-21 Thread Steve Muckle
On Fri, Jul 22, 2016 at 02:18:54AM +0200, Rafael J. Wysocki wrote: > > My thinking was that one of these two would be preferable: > > > > - Forcing ->target() drivers to install a ->resolve_freq callback, > > enforcing this at cpufreq driver init time. > > That would have been possible, but

Re: [PATCH V2] cpufreq: Disallow ->resolve_freq() for drivers providing ->target_index()

2016-07-21 Thread Steve Muckle
On Fri, Jul 22, 2016 at 02:18:54AM +0200, Rafael J. Wysocki wrote: > > My thinking was that one of these two would be preferable: > > > > - Forcing ->target() drivers to install a ->resolve_freq callback, > > enforcing this at cpufreq driver init time. > > That would have been possible, but

Re: [PATCH V2] cpufreq: Disallow ->resolve_freq() for drivers providing ->target_index()

2016-07-21 Thread Steve Muckle
On Fri, Jul 22, 2016 at 01:53:13AM +0200, Rafael J. Wysocki wrote: > On Fri, Jul 22, 2016 at 1:45 AM, Steve Muckle <steve.muc...@linaro.org> wrote: > > On Fri, Jul 22, 2016 at 01:32:00AM +0200, Rafael J. Wysocki wrote: > >> On Fri, Jul 22, 2016 at 1:22 AM, Steve Muckle

Re: [PATCH V2] cpufreq: Disallow ->resolve_freq() for drivers providing ->target_index()

2016-07-21 Thread Steve Muckle
On Fri, Jul 22, 2016 at 01:53:13AM +0200, Rafael J. Wysocki wrote: > On Fri, Jul 22, 2016 at 1:45 AM, Steve Muckle wrote: > > On Fri, Jul 22, 2016 at 01:32:00AM +0200, Rafael J. Wysocki wrote: > >> On Fri, Jul 22, 2016 at 1:22 AM, Steve Muckle > >> wrote: > >

Re: [PATCH V2] cpufreq: Disallow ->resolve_freq() for drivers providing ->target_index()

2016-07-21 Thread Steve Muckle
On Fri, Jul 22, 2016 at 01:32:00AM +0200, Rafael J. Wysocki wrote: > On Fri, Jul 22, 2016 at 1:22 AM, Steve Muckle <steve.muc...@linaro.org> wrote: > > On Fri, Jul 22, 2016 at 01:22:22AM +0200, Rafael J. Wysocki wrote: > >> OK, applied. > > > > FWIW I do h

Re: [PATCH V2] cpufreq: Disallow ->resolve_freq() for drivers providing ->target_index()

2016-07-21 Thread Steve Muckle
On Fri, Jul 22, 2016 at 01:32:00AM +0200, Rafael J. Wysocki wrote: > On Fri, Jul 22, 2016 at 1:22 AM, Steve Muckle wrote: > > On Fri, Jul 22, 2016 at 01:22:22AM +0200, Rafael J. Wysocki wrote: > >> OK, applied. > > > > FWIW I do have a concern on this patc

Re: [PATCH v3 1/3] cpufreq: add cpufreq_driver_resolve_freq()

2016-07-21 Thread Steve Muckle
On Thu, Jul 21, 2016 at 04:36:48PM -0700, Steve Muckle wrote: > On Thu, Jul 21, 2016 at 04:30:03PM -0700, Viresh Kumar wrote: > > On 21-07-16, 16:21, Steve Muckle wrote: > > > On Thu, Jul 21, 2016 at 01:30:41PM -0700, Viresh Kumar wrote: > > > > Okay, but in that

Re: [PATCH v3 1/3] cpufreq: add cpufreq_driver_resolve_freq()

2016-07-21 Thread Steve Muckle
On Thu, Jul 21, 2016 at 04:36:48PM -0700, Steve Muckle wrote: > On Thu, Jul 21, 2016 at 04:30:03PM -0700, Viresh Kumar wrote: > > On 21-07-16, 16:21, Steve Muckle wrote: > > > On Thu, Jul 21, 2016 at 01:30:41PM -0700, Viresh Kumar wrote: > > > > Okay, but in that

Re: [PATCH v3 1/3] cpufreq: add cpufreq_driver_resolve_freq()

2016-07-21 Thread Steve Muckle
On Thu, Jul 21, 2016 at 04:30:03PM -0700, Viresh Kumar wrote: > On 21-07-16, 16:21, Steve Muckle wrote: > > On Thu, Jul 21, 2016 at 01:30:41PM -0700, Viresh Kumar wrote: > > > Okay, but in that case shouldn't we do something like this: > > > > > > unsigned in

Re: [PATCH v3 1/3] cpufreq: add cpufreq_driver_resolve_freq()

2016-07-21 Thread Steve Muckle
On Thu, Jul 21, 2016 at 04:30:03PM -0700, Viresh Kumar wrote: > On 21-07-16, 16:21, Steve Muckle wrote: > > On Thu, Jul 21, 2016 at 01:30:41PM -0700, Viresh Kumar wrote: > > > Okay, but in that case shouldn't we do something like this: > > > > > > unsigned in

Re: [PATCH v3 1/3] cpufreq: add cpufreq_driver_resolve_freq()

2016-07-21 Thread Steve Muckle
On Thu, Jul 21, 2016 at 04:21:31PM -0700, Steve Muckle wrote: > On Thu, Jul 21, 2016 at 01:30:41PM -0700, Viresh Kumar wrote: > > Okay, but in that case shouldn't we do something like this: > > > > unsigned int cpufreq_driver_resolve_freq(struct c

Re: [PATCH v3 1/3] cpufreq: add cpufreq_driver_resolve_freq()

2016-07-21 Thread Steve Muckle
On Thu, Jul 21, 2016 at 04:21:31PM -0700, Steve Muckle wrote: > On Thu, Jul 21, 2016 at 01:30:41PM -0700, Viresh Kumar wrote: > > Okay, but in that case shouldn't we do something like this: > > > > unsigned int cpufreq_driver_resolve_freq(struct c

Re: [PATCH V2] cpufreq: Disallow ->resolve_freq() for drivers providing ->target_index()

2016-07-21 Thread Steve Muckle
On Fri, Jul 22, 2016 at 01:22:22AM +0200, Rafael J. Wysocki wrote: > OK, applied. FWIW I do have a concern on this patch, I think it adds unnecessary overhead.

Re: [PATCH V2] cpufreq: Disallow ->resolve_freq() for drivers providing ->target_index()

2016-07-21 Thread Steve Muckle
On Fri, Jul 22, 2016 at 01:22:22AM +0200, Rafael J. Wysocki wrote: > OK, applied. FWIW I do have a concern on this patch, I think it adds unnecessary overhead.

Re: [PATCH v3 1/3] cpufreq: add cpufreq_driver_resolve_freq()

2016-07-21 Thread Steve Muckle
On Thu, Jul 21, 2016 at 01:30:41PM -0700, Viresh Kumar wrote: > Okay, but in that case shouldn't we do something like this: > > unsigned int cpufreq_driver_resolve_freq(struct cpufreq_policy *policy, > unsigned int target_freq) > { >target_freq =

Re: [PATCH v3 1/3] cpufreq: add cpufreq_driver_resolve_freq()

2016-07-21 Thread Steve Muckle
On Thu, Jul 21, 2016 at 01:30:41PM -0700, Viresh Kumar wrote: > Okay, but in that case shouldn't we do something like this: > > unsigned int cpufreq_driver_resolve_freq(struct cpufreq_policy *policy, > unsigned int target_freq) > { >target_freq =

Re: [PATCH v3 0/3] cpufreq: avoid redundant driver calls in schedutil

2016-07-14 Thread Steve Muckle
On Thu, Jul 14, 2016 at 06:02:31PM +0800, Pingbo Wen wrote: > > Steve Muckle (3): > > cpufreq: add cpufreq_driver_resolve_freq() > > cpufreq: schedutil: map raw required frequency to driver frequency > > Tested the first two patches on db410c, only waking up ir

Re: [PATCH v3 0/3] cpufreq: avoid redundant driver calls in schedutil

2016-07-14 Thread Steve Muckle
On Thu, Jul 14, 2016 at 06:02:31PM +0800, Pingbo Wen wrote: > > Steve Muckle (3): > > cpufreq: add cpufreq_driver_resolve_freq() > > cpufreq: schedutil: map raw required frequency to driver frequency > > Tested the first two patches on db410c, only waking up ir

[PATCH v3 0/3] cpufreq: avoid redundant driver calls in schedutil

2016-07-13 Thread Steve Muckle
nly for ->target() style drivers, to use cpufreq's freq table operations, and move freq mapping caching into cpufreq policy Changes since v1: - incorporated feedback from Rafael to avoid referencing freq_table from schedutil by introducing a new cpufreq API Steve Muckle (3): cpufre

[PATCH v3 1/3] cpufreq: add cpufreq_driver_resolve_freq()

2016-07-13 Thread Steve Muckle
req(). Suggested-by: Rafael J. Wysocki <rafael.j.wyso...@intel.com> Signed-off-by: Steve Muckle <smuc...@linaro.org> --- drivers/cpufreq/cpufreq.c | 25 + include/linux/cpufreq.h | 16 2 files changed, 41 insertions(+) diff --git a/drivers/cpuf

[PATCH v3 3/3] cpufreq: acpi-cpufreq: use cached frequency mapping when possible

2016-07-13 Thread Steve Muckle
A call to cpufreq_driver_resolve_freq will cache the mapping from the desired target frequency to the frequency table index. If there is a mapping for the desired target frequency then use it instead of looking up the mapping again. Signed-off-by: Steve Muckle <smuc...@linaro.org> --- d

[PATCH v3 0/3] cpufreq: avoid redundant driver calls in schedutil

2016-07-13 Thread Steve Muckle
nly for ->target() style drivers, to use cpufreq's freq table operations, and move freq mapping caching into cpufreq policy Changes since v1: - incorporated feedback from Rafael to avoid referencing freq_table from schedutil by introducing a new cpufreq API Steve Muckle (3): cpufre

[PATCH v3 1/3] cpufreq: add cpufreq_driver_resolve_freq()

2016-07-13 Thread Steve Muckle
req(). Suggested-by: Rafael J. Wysocki Signed-off-by: Steve Muckle --- drivers/cpufreq/cpufreq.c | 25 + include/linux/cpufreq.h | 16 2 files changed, 41 insertions(+) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 118b4f30a

[PATCH v3 3/3] cpufreq: acpi-cpufreq: use cached frequency mapping when possible

2016-07-13 Thread Steve Muckle
A call to cpufreq_driver_resolve_freq will cache the mapping from the desired target frequency to the frequency table index. If there is a mapping for the desired target frequency then use it instead of looking up the mapping again. Signed-off-by: Steve Muckle --- drivers/cpufreq/acpi-cpufreq.c

[PATCH v3 2/3] cpufreq: schedutil: map raw required frequency to driver frequency

2016-07-13 Thread Steve Muckle
in the event that the new raw required frequency matches the last one, assuming a frequency update has not been forced due to limits changing (indicated by a next_freq value of UINT_MAX, see sugov_should_update_freq). Signed-off-by: Steve Muckle <smuc...@linaro.org> --- kernel/sched/cpufreq_sched

[PATCH v3 2/3] cpufreq: schedutil: map raw required frequency to driver frequency

2016-07-13 Thread Steve Muckle
in the event that the new raw required frequency matches the last one, assuming a frequency update has not been forced due to limits changing (indicated by a next_freq value of UINT_MAX, see sugov_should_update_freq). Signed-off-by: Steve Muckle --- kernel/sched/cpufreq_schedutil.c | 31

Re: [PATCH V3 8/9] cpufreq: Keep policy->freq_table sorted in ascending order

2016-06-03 Thread Steve Muckle
On Fri, Jun 03, 2016 at 07:05:14PM +0530, Viresh Kumar wrote: ... > @@ -468,20 +469,15 @@ unsigned int acpi_cpufreq_fast_switch(struct > cpufreq_policy *policy, > struct acpi_cpufreq_data *data = policy->driver_data; > struct acpi_processor_performance *perf; > struct

Re: [PATCH V3 8/9] cpufreq: Keep policy->freq_table sorted in ascending order

2016-06-03 Thread Steve Muckle
On Fri, Jun 03, 2016 at 07:05:14PM +0530, Viresh Kumar wrote: ... > @@ -468,20 +469,15 @@ unsigned int acpi_cpufreq_fast_switch(struct > cpufreq_policy *policy, > struct acpi_cpufreq_data *data = policy->driver_data; > struct acpi_processor_performance *perf; > struct

Re: [PATCH V2 2/2] cpufreq: Optimize cpufreq_frequency_table_target()

2016-06-02 Thread Steve Muckle
On Thu, Jun 02, 2016 at 06:59:04AM +0530, Viresh Kumar wrote: > On 01-06-16, 12:46, Steve Muckle wrote: > > > /* > > >* Find the closest frequency above target_freq. > > > - * > > > - * The table is sorted in the reverse order with respect to the >

Re: [PATCH V2 2/2] cpufreq: Optimize cpufreq_frequency_table_target()

2016-06-02 Thread Steve Muckle
On Thu, Jun 02, 2016 at 06:59:04AM +0530, Viresh Kumar wrote: > On 01-06-16, 12:46, Steve Muckle wrote: > > > /* > > >* Find the closest frequency above target_freq. > > > - * > > > - * The table is sorted in the reverse order with respect to the >

Re: [PATCH 3/5] sched: cpufreq: call cpufreq hook from remote CPUs

2016-06-01 Thread Steve Muckle
On Sat, May 21, 2016 at 12:46:06PM -0700, Steve Muckle wrote: > Hi Peter, Ingo, Hi Peter/Ingo would appreciate any thoughts you may have on the issue below. thanks, Steve > > On Thu, May 19, 2016 at 04:04:19PM -0700, Steve Muckle wrote: > > On Thu, May 19, 2016 at 11:06:14PM

Re: [PATCH 3/5] sched: cpufreq: call cpufreq hook from remote CPUs

2016-06-01 Thread Steve Muckle
On Sat, May 21, 2016 at 12:46:06PM -0700, Steve Muckle wrote: > Hi Peter, Ingo, Hi Peter/Ingo would appreciate any thoughts you may have on the issue below. thanks, Steve > > On Thu, May 19, 2016 at 04:04:19PM -0700, Steve Muckle wrote: > > On Thu, May 19, 2016 at 11:06:14PM

Re: [PATCH V2 2/2] cpufreq: Optimize cpufreq_frequency_table_target()

2016-06-01 Thread Steve Muckle
On Wed, Jun 01, 2016 at 04:09:55PM +0530, Viresh Kumar wrote: > cpufreq core keeps another table of sorted frequencies now and that can > be used to find a match quickly, instead of traversing the unsorted list > in an inefficient way. > > Create helper routines for separate relation types to

Re: [PATCH V2 2/2] cpufreq: Optimize cpufreq_frequency_table_target()

2016-06-01 Thread Steve Muckle
On Wed, Jun 01, 2016 at 04:09:55PM +0530, Viresh Kumar wrote: > cpufreq core keeps another table of sorted frequencies now and that can > be used to find a match quickly, instead of traversing the unsorted list > in an inefficient way. > > Create helper routines for separate relation types to

Re: [PATCH v2 1/3] cpufreq: add resolve_freq driver callback

2016-05-31 Thread Steve Muckle
On Tue, May 31, 2016 at 11:00:11AM +0530, Viresh Kumar wrote: > On 30-05-16, 08:31, Steve Muckle wrote: > > My goal here was to have the system operate in this case in a manner > > that is obviously not optimized (running at fmax), so the platform owner > > realizes that the c

Re: [PATCH v2 1/3] cpufreq: add resolve_freq driver callback

2016-05-31 Thread Steve Muckle
On Tue, May 31, 2016 at 11:00:11AM +0530, Viresh Kumar wrote: > On 30-05-16, 08:31, Steve Muckle wrote: > > My goal here was to have the system operate in this case in a manner > > that is obviously not optimized (running at fmax), so the platform owner > > realizes that the c

Re: [PATCH v2 1/3] cpufreq: add resolve_freq driver callback

2016-05-31 Thread Steve Muckle
On Tue, May 31, 2016 at 04:44:51PM +0530, Viresh Kumar wrote: > On 25-05-16, 19:52, Steve Muckle wrote: > > +unsigned int cpufreq_driver_resolve_freq(struct cpufreq_policy *policy, > > +unsigned int target_freq) > > +{ > > + str

Re: [PATCH v2 1/3] cpufreq: add resolve_freq driver callback

2016-05-31 Thread Steve Muckle
On Tue, May 31, 2016 at 04:44:51PM +0530, Viresh Kumar wrote: > On 25-05-16, 19:52, Steve Muckle wrote: > > +unsigned int cpufreq_driver_resolve_freq(struct cpufreq_policy *policy, > > +unsigned int target_freq) > > +{ > > + str

Re: [PATCH v2 3/3] cpufreq: schedutil: map raw required frequency to driver frequency

2016-05-30 Thread Steve Muckle
On Fri, May 27, 2016 at 01:41:02PM +0800, Wanpeng Li wrote: > 2016-05-26 10:53 GMT+08:00 Steve Muckle <steve.muc...@linaro.org>: > > The slow-path frequency transition path is relatively expensive as it > > requires waking up a thread to do work. Should support be added for &

Re: [PATCH v2 3/3] cpufreq: schedutil: map raw required frequency to driver frequency

2016-05-30 Thread Steve Muckle
On Fri, May 27, 2016 at 01:41:02PM +0800, Wanpeng Li wrote: > 2016-05-26 10:53 GMT+08:00 Steve Muckle : > > The slow-path frequency transition path is relatively expensive as it > > requires waking up a thread to do work. Should support be added for > > remote CPU cpufreq

Re: [PATCH v2 3/3] cpufreq: schedutil: map raw required frequency to driver frequency

2016-05-30 Thread Steve Muckle
On Thu, May 26, 2016 at 12:46:29PM +0530, Viresh Kumar wrote: > On 25-05-16, 19:53, Steve Muckle wrote: > > The slow-path frequency transition path is relatively expensive as it > > requires waking up a thread to do work. Should support be added for > > remote CPU cpufreq

Re: [PATCH v2 3/3] cpufreq: schedutil: map raw required frequency to driver frequency

2016-05-30 Thread Steve Muckle
On Thu, May 26, 2016 at 12:46:29PM +0530, Viresh Kumar wrote: > On 25-05-16, 19:53, Steve Muckle wrote: > > The slow-path frequency transition path is relatively expensive as it > > requires waking up a thread to do work. Should support be added for > > remote CPU cpufreq

Re: [PATCH v2 2/3] cpufreq: acpi-cpufreq: add resolve_freq callback

2016-05-30 Thread Steve Muckle
On Thu, May 26, 2016 at 12:13:41PM +0530, Viresh Kumar wrote: > On 25-05-16, 19:53, Steve Muckle wrote: > > Support the new resolve_freq cpufreq callback which resolves a target > > frequency to a driver-supported frequency without actually setting it. > > And here is the fir

Re: [PATCH v2 2/3] cpufreq: acpi-cpufreq: add resolve_freq callback

2016-05-30 Thread Steve Muckle
On Thu, May 26, 2016 at 12:13:41PM +0530, Viresh Kumar wrote: > On 25-05-16, 19:53, Steve Muckle wrote: > > Support the new resolve_freq cpufreq callback which resolves a target > > frequency to a driver-supported frequency without actually setting it. > > And here is the fir

Re: [PATCH v2 1/3] cpufreq: add resolve_freq driver callback

2016-05-30 Thread Steve Muckle
On Thu, May 26, 2016 at 11:55:14AM +0530, Viresh Kumar wrote: > On 25-05-16, 19:52, Steve Muckle wrote: > > Cpufreq governors may need to know what a particular target frequency > > maps to in the driver without necessarily wanting to set the frequency. > > Support this operat

Re: [PATCH v2 1/3] cpufreq: add resolve_freq driver callback

2016-05-30 Thread Steve Muckle
On Thu, May 26, 2016 at 11:55:14AM +0530, Viresh Kumar wrote: > On 25-05-16, 19:52, Steve Muckle wrote: > > Cpufreq governors may need to know what a particular target frequency > > maps to in the driver without necessarily wanting to set the frequency. > > Support this operat

[PATCH v2 1/3] cpufreq: add resolve_freq driver callback

2016-05-25 Thread Steve Muckle
<rafael.j.wyso...@intel.com> Signed-off-by: Steve Muckle <smuc...@linaro.org> --- drivers/cpufreq/cpufreq.c | 25 + include/linux/cpufreq.h | 11 +++ 2 files changed, 36 insertions(+) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index

[PATCH v2 1/3] cpufreq: add resolve_freq driver callback

2016-05-25 Thread Steve Muckle
Signed-off-by: Steve Muckle --- drivers/cpufreq/cpufreq.c | 25 + include/linux/cpufreq.h | 11 +++ 2 files changed, 36 insertions(+) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 77d77a4e3b74..3b44f4bdc071 100644 --- a/drivers/cpufreq

[PATCH v2 0/3] cpufreq: avoid redundant driver calls in schedutil

2016-05-25 Thread Steve Muckle
it on an ensuing fast_switch. This series implements that approach. Given that this change is beneficial on its own I've split it out into its own series from the remote callback support. [0] https://lkml.org/lkml/2016/5/9/853 Steve Muckle (3): cpufreq: add resolve_freq driver callback

[PATCH v2 2/3] cpufreq: acpi-cpufreq: add resolve_freq callback

2016-05-25 Thread Steve Muckle
the requested target frequency is the same. Suggested-by: Rafael J. Wysocki <rafael.j.wyso...@intel.com> Signed-off-by: Steve Muckle <smuc...@linaro.org> --- drivers/cpufreq/acpi-cpufreq.c | 56 -- 1 file changed, 43 insertions(+), 13 deletions(-)

[PATCH v2 3/3] cpufreq: schedutil: map raw required frequency to driver frequency

2016-05-25 Thread Steve Muckle
in the event that the new raw required frequency matches the last one, assuming a frequency update has not been forced due to limits changing (indicated by a next_freq value of UINT_MAX, see sugov_should_update_freq). Signed-off-by: Steve Muckle <smuc...@linaro.org> --- kernel

[PATCH v2 0/3] cpufreq: avoid redundant driver calls in schedutil

2016-05-25 Thread Steve Muckle
it on an ensuing fast_switch. This series implements that approach. Given that this change is beneficial on its own I've split it out into its own series from the remote callback support. [0] https://lkml.org/lkml/2016/5/9/853 Steve Muckle (3): cpufreq: add resolve_freq driver callback

[PATCH v2 2/3] cpufreq: acpi-cpufreq: add resolve_freq callback

2016-05-25 Thread Steve Muckle
the requested target frequency is the same. Suggested-by: Rafael J. Wysocki Signed-off-by: Steve Muckle --- drivers/cpufreq/acpi-cpufreq.c | 56 -- 1 file changed, 43 insertions(+), 13 deletions(-) diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers

[PATCH v2 3/3] cpufreq: schedutil: map raw required frequency to driver frequency

2016-05-25 Thread Steve Muckle
in the event that the new raw required frequency matches the last one, assuming a frequency update has not been forced due to limits changing (indicated by a next_freq value of UINT_MAX, see sugov_should_update_freq). Signed-off-by: Steve Muckle --- kernel/sched/cpufreq_schedutil.c | 30

Re: [RFC PATCH] Increase in idle power with schedutil

2016-05-22 Thread Steve Muckle
On Sun, May 22, 2016 at 12:39:12PM +0200, Peter Zijlstra wrote: > On Fri, May 20, 2016 at 05:53:41PM +0530, Shilpasri G Bhat wrote: > > > > Below are the comparisons by disabling watchdog. > > Both schedutil and ondemand have a similar ramp-down trend. And in both the > > cases I can see that

Re: [RFC PATCH] Increase in idle power with schedutil

2016-05-22 Thread Steve Muckle
On Sun, May 22, 2016 at 12:39:12PM +0200, Peter Zijlstra wrote: > On Fri, May 20, 2016 at 05:53:41PM +0530, Shilpasri G Bhat wrote: > > > > Below are the comparisons by disabling watchdog. > > Both schedutil and ondemand have a similar ramp-down trend. And in both the > > cases I can see that

Re: [PATCH 3/5] sched: cpufreq: call cpufreq hook from remote CPUs

2016-05-21 Thread Steve Muckle
Hi Peter, Ingo, On Thu, May 19, 2016 at 04:04:19PM -0700, Steve Muckle wrote: > On Thu, May 19, 2016 at 11:06:14PM +0200, Rafael J. Wysocki wrote: > > > In the case of a remote update the hook has to run (or not) after it is > > > known whether preemption will occur so we d

Re: [PATCH 3/5] sched: cpufreq: call cpufreq hook from remote CPUs

2016-05-21 Thread Steve Muckle
Hi Peter, Ingo, On Thu, May 19, 2016 at 04:04:19PM -0700, Steve Muckle wrote: > On Thu, May 19, 2016 at 11:06:14PM +0200, Rafael J. Wysocki wrote: > > > In the case of a remote update the hook has to run (or not) after it is > > > known whether preemption will occur so we d

Re: [PATCH 5/5] cpufreq: schedutil: do not update rate limit ts when freq is unchanged

2016-05-19 Thread Steve Muckle
On Fri, May 20, 2016 at 02:37:17AM +0200, Rafael J. Wysocki wrote: > Also I think that it would be good to avoid walking the frequency > table twice in case we end up wanting to update the frequency after > all. With the [4/5] we'd do it once in get_next_freq() and then once > more in

Re: [PATCH 5/5] cpufreq: schedutil: do not update rate limit ts when freq is unchanged

2016-05-19 Thread Steve Muckle
On Fri, May 20, 2016 at 02:37:17AM +0200, Rafael J. Wysocki wrote: > Also I think that it would be good to avoid walking the frequency > table twice in case we end up wanting to update the frequency after > all. With the [4/5] we'd do it once in get_next_freq() and then once > more in

Re: [PATCH 5/5] cpufreq: schedutil: do not update rate limit ts when freq is unchanged

2016-05-19 Thread Steve Muckle
On Fri, May 20, 2016 at 02:24:19AM +0200, Rafael J. Wysocki wrote: > On Fri, May 20, 2016 at 1:34 AM, Steve Muckle <steve.muc...@linaro.org> wrote: > > On Thu, May 19, 2016 at 11:15:52PM +0200, Rafael J. Wysocki wrote: > >> But anyway this change again seems to be an

Re: [PATCH 5/5] cpufreq: schedutil: do not update rate limit ts when freq is unchanged

2016-05-19 Thread Steve Muckle
On Fri, May 20, 2016 at 02:24:19AM +0200, Rafael J. Wysocki wrote: > On Fri, May 20, 2016 at 1:34 AM, Steve Muckle wrote: > > On Thu, May 19, 2016 at 11:15:52PM +0200, Rafael J. Wysocki wrote: > >> But anyway this change again seems to be an optimization that might be >

Re: [PATCH 5/5] cpufreq: schedutil: do not update rate limit ts when freq is unchanged

2016-05-19 Thread Steve Muckle
On Thu, May 19, 2016 at 11:15:52PM +0200, Rafael J. Wysocki wrote: > But anyway this change again seems to be an optimization that might be > done later to me. > > I guess there are many things that might be optimized in schedutil, > but I'd prefer to address one item at a time, maybe going after

Re: [PATCH 5/5] cpufreq: schedutil: do not update rate limit ts when freq is unchanged

2016-05-19 Thread Steve Muckle
On Thu, May 19, 2016 at 11:15:52PM +0200, Rafael J. Wysocki wrote: > But anyway this change again seems to be an optimization that might be > done later to me. > > I guess there are many things that might be optimized in schedutil, > but I'd prefer to address one item at a time, maybe going after

Re: [PATCH 3/5] sched: cpufreq: call cpufreq hook from remote CPUs

2016-05-19 Thread Steve Muckle
On Thu, May 19, 2016 at 11:06:14PM +0200, Rafael J. Wysocki wrote: > > In the case of a remote update the hook has to run (or not) after it is > > known whether preemption will occur so we don't do needless work or > > IPIs. If the policy CPUs aren't known in the scheduler then the early > > hook

Re: [PATCH 3/5] sched: cpufreq: call cpufreq hook from remote CPUs

2016-05-19 Thread Steve Muckle
On Thu, May 19, 2016 at 11:06:14PM +0200, Rafael J. Wysocki wrote: > > In the case of a remote update the hook has to run (or not) after it is > > known whether preemption will occur so we don't do needless work or > > IPIs. If the policy CPUs aren't known in the scheduler then the early > > hook

Re: [PATCH 2/5] cpufreq: schedutil: support scheduler cpufreq callbacks on remote CPUs

2016-05-19 Thread Steve Muckle
On Thu, May 19, 2016 at 10:55:23PM +0200, Rafael J. Wysocki wrote: > >> > +static inline bool sugov_queue_remote_callback(struct sugov_policy > >> > *sg_policy, > >> > +int cpu) > >> > +{ > >> > + struct cpufreq_policy *policy = sg_policy->policy; >

Re: [PATCH 2/5] cpufreq: schedutil: support scheduler cpufreq callbacks on remote CPUs

2016-05-19 Thread Steve Muckle
On Thu, May 19, 2016 at 10:55:23PM +0200, Rafael J. Wysocki wrote: > >> > +static inline bool sugov_queue_remote_callback(struct sugov_policy > >> > *sg_policy, > >> > +int cpu) > >> > +{ > >> > + struct cpufreq_policy *policy = sg_policy->policy; >

Re: [PATCH 5/5] cpufreq: schedutil: do not update rate limit ts when freq is unchanged

2016-05-19 Thread Steve Muckle
On Thu, May 19, 2016 at 01:44:36AM +0200, Rafael J. Wysocki wrote: > On Mon, May 9, 2016 at 11:20 PM, Steve Muckle <steve.muc...@linaro.org> wrote: > > The rate limit timestamp (last_freq_update_time) is currently advanced > > anytime schedutil re-evaluates the policy regardle

Re: [PATCH 5/5] cpufreq: schedutil: do not update rate limit ts when freq is unchanged

2016-05-19 Thread Steve Muckle
On Thu, May 19, 2016 at 01:44:36AM +0200, Rafael J. Wysocki wrote: > On Mon, May 9, 2016 at 11:20 PM, Steve Muckle wrote: > > The rate limit timestamp (last_freq_update_time) is currently advanced > > anytime schedutil re-evaluates the policy regardless of whether the CPU > >

Re: [PATCH 4/5] cpufreq: schedutil: map raw required frequency to CPU-supported frequency

2016-05-19 Thread Steve Muckle
On Thu, May 19, 2016 at 01:37:40AM +0200, Rafael J. Wysocki wrote: > On Mon, May 9, 2016 at 11:20 PM, Steve Muckle <steve.muc...@linaro.org> wrote: > > The mechanisms for remote CPU updates and slow-path frequency > > transitions are relatively expensive - the former is an IPI

Re: [PATCH 4/5] cpufreq: schedutil: map raw required frequency to CPU-supported frequency

2016-05-19 Thread Steve Muckle
On Thu, May 19, 2016 at 01:37:40AM +0200, Rafael J. Wysocki wrote: > On Mon, May 9, 2016 at 11:20 PM, Steve Muckle wrote: > > The mechanisms for remote CPU updates and slow-path frequency > > transitions are relatively expensive - the former is an IPI while the > > latt

Re: [PATCH 3/5] sched: cpufreq: call cpufreq hook from remote CPUs

2016-05-19 Thread Steve Muckle
On Thu, May 19, 2016 at 02:00:54PM +0200, Rafael J. Wysocki wrote: > On Thu, May 19, 2016 at 1:33 AM, Rafael J. Wysocki <raf...@kernel.org> wrote: > > On Mon, May 9, 2016 at 11:20 PM, Steve Muckle <steve.muc...@linaro.org> > > wrote: > >> Without calling

Re: [PATCH 3/5] sched: cpufreq: call cpufreq hook from remote CPUs

2016-05-19 Thread Steve Muckle
On Thu, May 19, 2016 at 02:00:54PM +0200, Rafael J. Wysocki wrote: > On Thu, May 19, 2016 at 1:33 AM, Rafael J. Wysocki wrote: > > On Mon, May 9, 2016 at 11:20 PM, Steve Muckle > > wrote: > >> Without calling the cpufreq hook for a remote wakeup it is possible >

Re: [PATCH 2/5] cpufreq: schedutil: support scheduler cpufreq callbacks on remote CPUs

2016-05-19 Thread Steve Muckle
On Thu, May 19, 2016 at 01:24:41AM +0200, Rafael J. Wysocki wrote: > On Mon, May 9, 2016 at 11:20 PM, Steve Muckle <steve.muc...@linaro.org> wrote: > > In preparation for the scheduler cpufreq callback happening on remote > > CPUs, add support for this in schedutil. > &

Re: [PATCH 2/5] cpufreq: schedutil: support scheduler cpufreq callbacks on remote CPUs

2016-05-19 Thread Steve Muckle
On Thu, May 19, 2016 at 01:24:41AM +0200, Rafael J. Wysocki wrote: > On Mon, May 9, 2016 at 11:20 PM, Steve Muckle wrote: > > In preparation for the scheduler cpufreq callback happening on remote > > CPUs, add support for this in schedutil. > > > > Schedutil currently

Re: [PATCH] sched/fair: Invoke cpufreq hooks for CONFIG_SMP unset

2016-05-09 Thread Steve Muckle
> > > > Fix the problem by making the !CONFIG_SMP stub of update_load_avg() > > > invoke cpufreq update hooks too. > > > > > > Fixes: 34e2c555f3e1 (cpufreq: Add mechanism for registering utilization > > > update callbacks) > > > Reported-by: Steve Muckl

Re: [PATCH] sched/fair: Invoke cpufreq hooks for CONFIG_SMP unset

2016-05-09 Thread Steve Muckle
update_load_avg() > > > invoke cpufreq update hooks too. > > > > > > Fixes: 34e2c555f3e1 (cpufreq: Add mechanism for registering utilization > > > update callbacks) > > > Reported-by: Steve Muckle > > > Signed-off-by: Rafael J. Wysocki > > &

[PATCH 0/5] cpufreq: schedutil: improve latency of response

2016-05-09 Thread Steve Muckle
elapsed ( +- 0.14% ) Steve Muckle (5): sched: cpufreq: add cpu to update_util_data cpufreq: schedutil: support scheduler cpufreq callbacks on remote CPUs sched: cpufreq: call cpufreq hook from remote CPUs cpufreq: schedutil: map raw required frequency to CPU-supported frequency cpufreq

[PATCH 1/5] sched: cpufreq: add cpu to update_util_data

2016-05-09 Thread Steve Muckle
Upcoming support for scheduler cpufreq callbacks on remote wakeups will require the client to know what the target CPU is that the callback is being invoked for. Add this information into the callback data structure. Signed-off-by: Steve Muckle <smuc...@linaro.org> --- include/linux/sched.

[PATCH 5/5] cpufreq: schedutil: do not update rate limit ts when freq is unchanged

2016-05-09 Thread Steve Muckle
of the policy frequency. Signed-off-by: Steve Muckle <smuc...@linaro.org> --- kernel/sched/cpufreq_schedutil.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c index e185075fcb5c..4d2907c8a142 100644 --- a/kernel

[PATCH 0/5] cpufreq: schedutil: improve latency of response

2016-05-09 Thread Steve Muckle
elapsed ( +- 0.14% ) Steve Muckle (5): sched: cpufreq: add cpu to update_util_data cpufreq: schedutil: support scheduler cpufreq callbacks on remote CPUs sched: cpufreq: call cpufreq hook from remote CPUs cpufreq: schedutil: map raw required frequency to CPU-supported frequency cpufreq

[PATCH 1/5] sched: cpufreq: add cpu to update_util_data

2016-05-09 Thread Steve Muckle
Upcoming support for scheduler cpufreq callbacks on remote wakeups will require the client to know what the target CPU is that the callback is being invoked for. Add this information into the callback data structure. Signed-off-by: Steve Muckle --- include/linux/sched.h | 1 + kernel/sched

[PATCH 5/5] cpufreq: schedutil: do not update rate limit ts when freq is unchanged

2016-05-09 Thread Steve Muckle
of the policy frequency. Signed-off-by: Steve Muckle --- kernel/sched/cpufreq_schedutil.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c index e185075fcb5c..4d2907c8a142 100644 --- a/kernel/sched/cpufreq_schedutil.c

[PATCH 4/5] cpufreq: schedutil: map raw required frequency to CPU-supported frequency

2016-05-09 Thread Steve Muckle
frequency required by the new utilization value in schedutil. If it is the same as the previously requested frequency then there is no need to continue with the update. Signed-off-by: Steve Muckle <smuc...@linaro.org> --- kernel/sched/cpufreq_schedutil.c | 14 +- 1 file chang

[PATCH 3/5] sched: cpufreq: call cpufreq hook from remote CPUs

2016-05-09 Thread Steve Muckle
as the new policy_cpus parameter to cpufreq_add_update_util_hook(). Callbacks will only be issued in this case when the target CPU and the current CPU are the same. Otherwise policy_cpus is used to determine what is a local vs. remote callback. Signed-off-by: Steve Muckle <smuc...@linaro.org> --- d

[PATCH 2/5] cpufreq: schedutil: support scheduler cpufreq callbacks on remote CPUs

2016-05-09 Thread Steve Muckle
out on the local CPU. Signed-off-by: Steve Muckle <smuc...@linaro.org> --- kernel/sched/cpufreq_schedutil.c | 86 ++-- 1 file changed, 65 insertions(+), 21 deletions(-) diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c

[PATCH 4/5] cpufreq: schedutil: map raw required frequency to CPU-supported frequency

2016-05-09 Thread Steve Muckle
frequency required by the new utilization value in schedutil. If it is the same as the previously requested frequency then there is no need to continue with the update. Signed-off-by: Steve Muckle --- kernel/sched/cpufreq_schedutil.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion

[PATCH 3/5] sched: cpufreq: call cpufreq hook from remote CPUs

2016-05-09 Thread Steve Muckle
as the new policy_cpus parameter to cpufreq_add_update_util_hook(). Callbacks will only be issued in this case when the target CPU and the current CPU are the same. Otherwise policy_cpus is used to determine what is a local vs. remote callback. Signed-off-by: Steve Muckle --- drivers/cpufreq

[PATCH 2/5] cpufreq: schedutil: support scheduler cpufreq callbacks on remote CPUs

2016-05-09 Thread Steve Muckle
out on the local CPU. Signed-off-by: Steve Muckle --- kernel/sched/cpufreq_schedutil.c | 86 ++-- 1 file changed, 65 insertions(+), 21 deletions(-) diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c index 154ae3a51e86

Re: [RFC PATCH 1/4] cpufreq: governor: support scheduler cpufreq callbacks on remote CPUs

2016-05-06 Thread Steve Muckle
On Fri, Apr 29, 2016 at 01:21:24PM +0200, Rafael J. Wysocki wrote: > On Friday, April 29, 2016 04:08:16 PM Viresh Kumar wrote: ... > > Any clue, why we don't have a non-SMP version of irq_work_queue_on(), Which > > can > > simply call irq_work_queue() ? > > Because nobody else needs it? > > But

Re: [RFC PATCH 1/4] cpufreq: governor: support scheduler cpufreq callbacks on remote CPUs

2016-05-06 Thread Steve Muckle
On Fri, Apr 29, 2016 at 01:21:24PM +0200, Rafael J. Wysocki wrote: > On Friday, April 29, 2016 04:08:16 PM Viresh Kumar wrote: ... > > Any clue, why we don't have a non-SMP version of irq_work_queue_on(), Which > > can > > simply call irq_work_queue() ? > > Because nobody else needs it? > > But

Re: [PATCH] sched/fair: Invoke cpufreq hooks for CONFIG_SMP unset

2016-05-06 Thread Steve Muckle
Looks good to me. Also re-tested with intel_pstate on i7-3630QM !SMP, confirmed issue is resolved. I didn't retest with ondemand because for some reason that wasn't showing the problem before.

Re: [PATCH] sched/fair: Invoke cpufreq hooks for CONFIG_SMP unset

2016-05-06 Thread Steve Muckle
Looks good to me. Also re-tested with intel_pstate on i7-3630QM !SMP, confirmed issue is resolved. I didn't retest with ondemand because for some reason that wasn't showing the problem before.

Re: cpufreq governors broken with !CONFIG_SMP?

2016-05-05 Thread Steve Muckle
On Fri, May 06, 2016 at 02:09:07AM +0200, Rafael J. Wysocki wrote: > In turn, schedutil should probably depend on CONFIG_SMP. In the long term I wonder if it's worth putting PELT under its own separate feature or just removing #ifdef CONFIG_SMP. Aside from task migration CPU frequency updates

Re: cpufreq governors broken with !CONFIG_SMP?

2016-05-05 Thread Steve Muckle
On Fri, May 06, 2016 at 02:09:07AM +0200, Rafael J. Wysocki wrote: > In turn, schedutil should probably depend on CONFIG_SMP. In the long term I wonder if it's worth putting PELT under its own separate feature or just removing #ifdef CONFIG_SMP. Aside from task migration CPU frequency updates

cpufreq governors broken with !CONFIG_SMP?

2016-05-05 Thread Steve Muckle
While working on a few patches for schedutil I noticed that the CFS cpufreq hooks depend on PELT, which depends on CONFIG_SMP. I compiled and ran a UP kernel with intel_pstate. Running a cpu-bound task did not result in the frequency increasing beyond fmin. For some reason ondemand is working for

cpufreq governors broken with !CONFIG_SMP?

2016-05-05 Thread Steve Muckle
While working on a few patches for schedutil I noticed that the CFS cpufreq hooks depend on PELT, which depends on CONFIG_SMP. I compiled and ran a UP kernel with intel_pstate. Running a cpu-bound task did not result in the frequency increasing beyond fmin. For some reason ondemand is working for

Re: [RFC PATCH 1/4] cpufreq: governor: support scheduler cpufreq callbacks on remote CPUs

2016-04-25 Thread Steve Muckle
On Wed, Apr 20, 2016 at 02:26:06PM +0200, Rafael J. Wysocki wrote: > You could have added a cover [0/4] message which would have made it easier > to reply to the entire series in general. Let me do it here. Will add that next time. > Doing it the way it is done in this series would be fine by

<    1   2   3   4   5   >