All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Joel Fernandes <joel@joelfernandes.org>,
	Viresh Kumar <viresh.kumar@linaro.org>
Cc: Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-pm@vger.kernel.org,
	Vincent Guittot <vincent.guittot@linaro.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [V2] sched/schedutil: Don't set next_freq to UINT_MAX
Date: Thu, 17 May 2018 12:33:51 +0200	[thread overview]
Message-ID: <218097156.b89HneGrTB@aspire.rjw.lan> (raw)
In-Reply-To: <20180511204712.GA83958@joelaf.mtv.corp.google.com>

On Friday, May 11, 2018 10:47:12 PM CEST Joel Fernandes wrote:
> On Wed, May 09, 2018 at 04:05:24PM +0530, Viresh Kumar wrote:
> > The schedutil driver sets sg_policy->next_freq to UINT_MAX on certain
> > occasions to discard the cached value of next freq:
> > - In sugov_start(), when the schedutil governor is started for a group
> >   of CPUs.
> > - And whenever we need to force a freq update before rate-limit
> >   duration, which happens when:
> >   - there is an update in cpufreq policy limits.
> >   - Or when the utilization of DL scheduling class increases.
> > 
> > In return, get_next_freq() doesn't return a cached next_freq value but
> > recalculates the next frequency instead.
> > 
> > But having special meaning for a particular value of frequency makes the
> > code less readable and error prone. We recently fixed a bug where the
> > UINT_MAX value was considered as valid frequency in
> > sugov_update_single().
> > 
> > All we need is a flag which can be used to discard the value of
> > sg_policy->next_freq and we already have need_freq_update for that. Lets
> > reuse it instead of setting next_freq to UINT_MAX.
> > 
> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> > ---
> > V2:
> > - Rebased over the fix sent by Rafael
> > 
> >   lkml.kernel.org/r/2276196.ev9rMjHTR0@aspire.rjw.lan
> > 
> > - Remove the additional check from sugov_update_single() as well.
> > - This is for 4.18 now instead of stable kernels.
> 
> Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>

Applied, thanks!

      reply	other threads:[~2018-05-17 10:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-08  6:42 [PATCH] sched/schedutil: Don't set next_freq to UINT_MAX Viresh Kumar
2018-05-08 20:54 ` Rafael J. Wysocki
2018-05-09  8:41   ` Viresh Kumar
2018-05-09  8:56     ` Rafael J. Wysocki
2018-05-09  9:15       ` Viresh Kumar
2018-05-09  9:23         ` Rafael J. Wysocki
2018-05-09  9:30           ` Viresh Kumar
2018-05-09  9:32             ` Rafael J. Wysocki
2018-05-09  9:44 ` [PATCH] cpufreq: schedutil: Avoid using invalid next_freq Rafael J. Wysocki
2018-05-09  9:46   ` Viresh Kumar
2018-05-09 10:35   ` [PATCH V2] sched/schedutil: Don't set next_freq to UINT_MAX Viresh Kumar
2018-05-11 20:47     ` [V2] " Joel Fernandes
2018-05-17 10:33       ` Rafael J. Wysocki [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=218097156.b89HneGrTB@aspire.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=joel@joelfernandes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.