Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1663230

Re: [PATCH 2/3] cpufreq: schedutil: Fix selection algorithm while reducing frequency

From Viresh Kumar <viresh.kumar@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH 2/3] cpufreq: schedutil: Fix selection algorithm while reducing frequency
Date 2017-06-12 05:50 +0200
Message-ID <tRowx-5la-1@gated-at.bofh.it> (permalink)
References <tQpbk-h3-15@gated-at.bofh.it> <tQpbk-h3-27@gated-at.bofh.it> <tQKIO-5ca-7@gated-at.bofh.it> <tR4xP-1Ac-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 10-06-17, 23:21, Joel Fernandes wrote:
> On Sat, Jun 10, 2017 at 2:11 AM, Joel Fernandes <joelaf@google.com> wrote:
> > On Fri, Jun 9, 2017 at 3:15 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> >> While reducing frequency if there are no frequencies available between
> >> "current" and "next" calculated frequency, then the core will never
> >> select the "next" frequency.
> >>
> >> For example, consider the possible range of frequencies as 900 MHz, 1
> >> GHz, 1.1 GHz, and 1.2 GHz. If the current frequency is 1.1 GHz and the
> >> next frequency (based on current utilization) is 1 GHz, then the
> >> schedutil governor will try to set the average of these as the next
> >> frequency (i.e. 1.05 GHz).
> >>
> >> Because we always try to find the lowest frequency greater than equal to
> >> the target frequency, cpufreq_driver_resolve_freq() will end up
> >> returning 1.1 GHz only. And we will not be able to reduce the frequency
> >> eventually. The worst hit is the policy->min frequency as that will
> >> never get selected after the frequency is increased once.
> >
> > But once utilization goes to 0, it will select the min frequency
> > (because it selects lowest frequency >= target)?
> 
> Never mind my comment about util 0, I see the problem you mention.
> However I feel that this entire series adds complexity all to handle
> the case of a false cache-miss which I think might not be that bad,
> and the tradeoff with complexity/readability of the code kind of
> negates the benefit. That's just my opinion about it fwiw.

Right and that's why I said in the cover letter that we may want to revert the
offending commit for the time being as the solutions provided here have too much
dependency on the resolve_freq() callback.

-- 
viresh

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/3] cpufreq: schedutil: Fix 4.12 regressions Viresh Kumar <viresh.kumar@linaro.org> - 2017-06-09 12:20 +0200
  [PATCH 1/3] cpufreq: schedutil: Restore cached_raw_freq behavior Viresh Kumar <viresh.kumar@linaro.org> - 2017-06-09 12:20 +0200
  [PATCH 2/3] cpufreq: schedutil: Fix selection algorithm while reducing frequency Viresh Kumar <viresh.kumar@linaro.org> - 2017-06-09 12:20 +0200
    Re: [PATCH 2/3] cpufreq: schedutil: Fix selection algorithm while  reducing frequency Joel Fernandes <joelaf@google.com> - 2017-06-10 11:20 +0200
      Re: [PATCH 2/3] cpufreq: schedutil: Fix selection algorithm while  reducing frequency Joel Fernandes <joelaf@google.com> - 2017-06-11 08:30 +0200
        Re: [PATCH 2/3] cpufreq: schedutil: Fix selection algorithm while  reducing frequency Viresh Kumar <viresh.kumar@linaro.org> - 2017-06-12 05:50 +0200
          Re: [PATCH 2/3] cpufreq: schedutil: Fix selection algorithm while  reducing frequency "Rafael J. Wysocki" <rafael@kernel.org> - 2017-06-12 14:40 +0200
  [PATCH 3/3] cpufreq: intel_pstate: Provide resolve_freq() to fix regression Viresh Kumar <viresh.kumar@linaro.org> - 2017-06-09 12:20 +0200
    Re: [PATCH 3/3] cpufreq: intel_pstate: Provide resolve_freq() to fix regression Joel Fernandes <joelaf@google.com> - 2017-06-10 11:30 +0200
      Re: [PATCH 3/3] cpufreq: intel_pstate: Provide resolve_freq() to fix  regression Viresh Kumar <viresh.kumar@linaro.org> - 2017-06-12 05:50 +0200
  Re: [PATCH 0/3] cpufreq: schedutil: Fix 4.12 regressions "Rafael J. Wysocki" <rafael@kernel.org> - 2017-06-09 14:30 +0200
    Re: [PATCH 0/3] cpufreq: schedutil: Fix 4.12 regressions Viresh Kumar <viresh.kumar@linaro.org> - 2017-06-09 14:40 +0200
      Re: [PATCH 0/3] cpufreq: schedutil: Fix 4.12 regressions "Rafael J. Wysocki" <rafael@kernel.org> - 2017-06-09 15:30 +0200

csiph-web