Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1420718
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] cpufreq: conservative: Do not use transition notifications |
| Date | 2016-06-13 13:10 +0200 |
| Message-ID | <rJxUJ-5uh-5@gated-at.bofh.it> (permalink) |
| References | <rIiXM-5N6-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 10-06-16, 03:00, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> The conservative governor registers a transition notifier so it
> can update its internal requested_freq value if it falls out of the
> policy->min...policy->max range, but that's not the most
> straightforward way to achieve that.
>
> To do it in a more straightforward way, first make sure that
> cs_dbs_timer() will only set frequencies between min and max.
>
> With that, note that requested_freq will always fall between min
> and max unless either policy->min or policy->max changes and the
> governor's ->limits() callback will be invoked then.
>
> Using this observation, add a ->limits callback pointer to
> struct dbs_governor, make cpufreq_dbs_governor_limits() invoke
> that callback if present, implement that callback in the conservative
> governor to update requested_freq if needed and drop the transition
> notifier from it, which also makes it possible to drop the
> struct cs_governor definition from there and simplify the code
> accordingly.
This code looks to me over-complicated and I am not sure if I
understand why we wanted the notifiers anyway? Why can't we replace
'dbs_info->requested_freq' with 'policy->cur' and kill the notifier
thing completely?
With requested_freq, we are trying to set the next freq to
requested_freq +- Delta, which I am not sure is the best approach
here.
What would go wrong if we will do, policy->cur +- delta instead?
The notifiers were added long back, to solve a problem which I don't
think will exist if we use policy->cur everywhere instead:
commit a8d7c3bc2396 ("[CPUFREQ] Make cpufreq_conservative handle
out-of-sync events properly")
Am I missing something?
--
viresh
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH] cpufreq: conservative: Do not use transition notifications Viresh Kumar <viresh.kumar@linaro.org> - 2016-06-13 13:10 +0200
Re: [PATCH] cpufreq: conservative: Do not use transition notifications "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-06-13 15:40 +0200
Re: [PATCH] cpufreq: conservative: Do not use transition notifications Viresh Kumar <viresh.kumar@linaro.org> - 2016-06-13 17:30 +0200
Re: [PATCH] cpufreq: conservative: Do not use transition notifications "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-06-13 23:00 +0200
csiph-web