Re: [PATCH RFC v4] cpufreq: schedutil: Make iowait boost more energy efficient

2017-07-12 Thread Joel Fernandes
On Wed, Jul 12, 2017 at 9:14 PM, Viresh Kumar wrote: > On 12-07-17, 20:52, Joel Fernandes wrote: >> Yes, that makes sense, its a bit subtle but I get what you're doing >> now and I agree with it. Its also cleaner than my original patch :-) >> and yeah definitely needs a comment ;-) > > And I have

Re: [PATCH RFC v4] cpufreq: schedutil: Make iowait boost more energy efficient

2017-07-12 Thread Viresh Kumar
On 12-07-17, 20:52, Joel Fernandes wrote: > Yes, that makes sense, its a bit subtle but I get what you're doing > now and I agree with it. Its also cleaner than my original patch :-) > and yeah definitely needs a comment ;-) And I have full trust on you to include that comment in you V5 :) -- vi

Re: [PATCH RFC v4] cpufreq: schedutil: Make iowait boost more energy efficient

2017-07-12 Thread Joel Fernandes
On Wed, Jul 12, 2017 at 8:35 PM, Viresh Kumar wrote: [..] > >> > diff --git a/kernel/sched/cpufreq_schedutil.c >> > b/kernel/sched/cpufreq_schedutil.c >> > index 076a2e31951c..3459f327c94e 100644 >> > --- a/kernel/sched/cpufreq_schedutil.c >> > +++ b/kernel/sched/cpufreq_schedutil.c >> > @@ -53,6

Re: [PATCH RFC v4] cpufreq: schedutil: Make iowait boost more energy efficient

2017-07-12 Thread Viresh Kumar
On 12-07-17, 15:28, Peter Zijlstra wrote: > Hmm, so you're worried about that ratelimit stuff? Yeah, somewhat. > Shouldn't we fix that > independently -- IIRC Rafael proposed a max-filter over the window. I had some doubts about that idea in general and shared them earlier with you: https://mar

Re: [PATCH RFC v4] cpufreq: schedutil: Make iowait boost more energy efficient

2017-07-12 Thread Viresh Kumar
On 12-07-17, 19:02, Joel Fernandes wrote: > On Tue, Jul 11, 2017 at 10:00 PM, Viresh Kumar > wrote: > Hmm, Ok. I can try to do some measurements about consecutive calls > soon and let you know how often it happens. I also noticed its > possible to call twice in the enqueue path itself as well.

Re: [PATCH RFC v4] cpufreq: schedutil: Make iowait boost more energy efficient

2017-07-12 Thread Joel Fernandes
Hi Viresh, On Tue, Jul 11, 2017 at 10:00 PM, Viresh Kumar wrote: [..] >> Another approach than setting min in sugov_set_iowait_boost, is, since >> we have already retrieved the current util, we can check if flags == >> SCHED_CPUFREQ_IOWAIT, then set initial the iowait_boost such that >> (iowait_b

Re: [PATCH RFC v4] cpufreq: schedutil: Make iowait boost more energy efficient

2017-07-12 Thread Peter Zijlstra
On Wed, Jul 12, 2017 at 03:16:23PM +0530, Viresh Kumar wrote: > No, I wasn't clear enough. Sorry about that. Lemme try again: > > Suppose min freq is 500 MHz and Max is 2 GHz. The iowait-boost is > set to 1 GHz right now (because of previous events with IOWAIT flag > set), and sugov_set_iowait_bo

Re: [PATCH RFC v4] cpufreq: schedutil: Make iowait boost more energy efficient

2017-07-12 Thread Viresh Kumar
On 12-07-17, 11:36, Peter Zijlstra wrote: > On Wed, Jul 12, 2017 at 10:30:35AM +0530, Viresh Kumar wrote: > > On 11-07-17, 07:14, Joel Fernandes wrote: > > > > Another approach than setting min in sugov_set_iowait_boost, is, since > > > we have already retrieved the current util, we can check if f

Re: [PATCH RFC v4] cpufreq: schedutil: Make iowait boost more energy efficient

2017-07-12 Thread Peter Zijlstra
On Wed, Jul 12, 2017 at 10:30:35AM +0530, Viresh Kumar wrote: > On 11-07-17, 07:14, Joel Fernandes wrote: > > Another approach than setting min in sugov_set_iowait_boost, is, since > > we have already retrieved the current util, we can check if flags == > > SCHED_CPUFREQ_IOWAIT, then set initial t

Re: [PATCH RFC v4] cpufreq: schedutil: Make iowait boost more energy efficient

2017-07-11 Thread Viresh Kumar
On 11-07-17, 07:14, Joel Fernandes wrote: > I think the whole point of IOWAIT boost was to solve the issue with a > long sequence of repeated I/O requests as described in the commit > message. So IIUC there isn't a usecase for that (increase freq. on > first request). Right. So we can take example

Re: [PATCH RFC v4] cpufreq: schedutil: Make iowait boost more energy efficient

2017-07-11 Thread Juri Lelli
On 11/07/17 07:33, Joel Fernandes wrote: > Hi Juri, > > On Tue, Jul 11, 2017 at 12:14 AM, Juri Lelli wrote: > [..] > >> > Considering it a per-cpu thing, isn't enough that it gets bumped up or > >> > decayed only when a CPU does an update (by using the above from > >> > sugov_update_shared)? > >>

Re: [PATCH RFC v4] cpufreq: schedutil: Make iowait boost more energy efficient

2017-07-11 Thread Joel Fernandes
Hi Juri, On Tue, Jul 11, 2017 at 12:14 AM, Juri Lelli wrote: [..] >> > Considering it a per-cpu thing, isn't enough that it gets bumped up or >> > decayed only when a CPU does an update (by using the above from >> > sugov_update_shared)? >> > >> > If we go this way I think we will only need to re

Re: [PATCH RFC v4] cpufreq: schedutil: Make iowait boost more energy efficient

2017-07-11 Thread Joel Fernandes
On Tue, Jul 11, 2017 at 7:14 AM, Joel Fernandes wrote: [..] >>> + } >>> } else if (sg_cpu->iowait_boost) { >>> s64 delta_ns = time - sg_cpu->last_update; >>> >>> /* Clear iowait_boost if the CPU apprears to have been idle. >>> */ >>> if

Re: [PATCH RFC v4] cpufreq: schedutil: Make iowait boost more energy efficient

2017-07-11 Thread Joel Fernandes
Hi Viresh, On Tue, Jul 11, 2017 at 3:14 AM, Viresh Kumar wrote: > On 09-07-17, 10:08, Joel Fernandes wrote: >> diff --git a/kernel/sched/cpufreq_schedutil.c >> b/kernel/sched/cpufreq_schedutil.c >> index 622eed1b7658..4d9e8b96bed1 100644 >> --- a/kernel/sched/cpufreq_schedutil.c >> +++ b/kernel/

Re: [PATCH RFC v4] cpufreq: schedutil: Make iowait boost more energy efficient

2017-07-11 Thread Peter Zijlstra
On Sun, Jul 09, 2017 at 10:08:26AM -0700, Joel Fernandes wrote: > --- a/kernel/sched/cpufreq_schedutil.c > +++ b/kernel/sched/cpufreq_schedutil.c > @@ -53,7 +53,9 @@ struct sugov_cpu { > struct update_util_data update_util; > struct sugov_policy *sg_policy; > > + bool prev_iowait_

Re: [PATCH RFC v4] cpufreq: schedutil: Make iowait boost more energy efficient

2017-07-11 Thread Peter Zijlstra
On Tue, Jul 11, 2017 at 03:44:32PM +0530, Viresh Kumar wrote: > On 09-07-17, 10:08, Joel Fernandes wrote: > > diff --git a/kernel/sched/cpufreq_schedutil.c > > b/kernel/sched/cpufreq_schedutil.c > > index 622eed1b7658..4d9e8b96bed1 100644 > > --- a/kernel/sched/cpufreq_schedutil.c > > +++ b/kernel

Re: [PATCH RFC v4] cpufreq: schedutil: Make iowait boost more energy efficient

2017-07-11 Thread Viresh Kumar
On 09-07-17, 10:08, Joel Fernandes wrote: > diff --git a/kernel/sched/cpufreq_schedutil.c > b/kernel/sched/cpufreq_schedutil.c > index 622eed1b7658..4d9e8b96bed1 100644 > --- a/kernel/sched/cpufreq_schedutil.c > +++ b/kernel/sched/cpufreq_schedutil.c > @@ -53,7 +53,9 @@ struct sugov_cpu { >

Re: [PATCH RFC v4] cpufreq: schedutil: Make iowait boost more energy efficient

2017-07-11 Thread Juri Lelli
On 10/07/17 22:12, Joel Fernandes wrote: > Hi Juri, > > On Mon, Jul 10, 2017 at 3:55 AM, Juri Lelli wrote: > > Hi Joel, > > > > On 09/07/17 10:08, Joel Fernandes wrote: [...] > >> static void sugov_iowait_boost(struct sugov_cpu *sg_cpu, unsigned long > >> *util, > >> -

Re: [PATCH RFC v4] cpufreq: schedutil: Make iowait boost more energy efficient

2017-07-10 Thread Joel Fernandes
Hi Juri, On Mon, Jul 10, 2017 at 3:55 AM, Juri Lelli wrote: > Hi Joel, > > On 09/07/17 10:08, Joel Fernandes wrote: >> Currently the iowait_boost feature in schedutil makes the frequency go to >> max. >> This feature was added to handle a case that Peter described where the >> throughput of oper

Re: [PATCH RFC v4] cpufreq: schedutil: Make iowait boost more energy efficient

2017-07-10 Thread Juri Lelli
Hi Joel, On 09/07/17 10:08, Joel Fernandes wrote: > Currently the iowait_boost feature in schedutil makes the frequency go to max. > This feature was added to handle a case that Peter described where the > throughput of operations involving continuous I/O requests [1] is reduced due > to running a

[PATCH RFC v4] cpufreq: schedutil: Make iowait boost more energy efficient

2017-07-09 Thread Joel Fernandes
Currently the iowait_boost feature in schedutil makes the frequency go to max. This feature was added to handle a case that Peter described where the throughput of operations involving continuous I/O requests [1] is reduced due to running at a lower frequency, however the lower throughput itself ca