lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <218097156.b89HneGrTB@aspire.rjw.lan>
Date:   Thu, 17 May 2018 12:33:51 +0200
From:   "Rafael J. Wysocki" <rjw@...ysocki.net>
To:     Joel Fernandes <joel@...lfernandes.org>,
        Viresh Kumar <viresh.kumar@...aro.org>
Cc:     Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        linux-pm@...r.kernel.org,
        Vincent Guittot <vincent.guittot@...aro.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [V2] sched/schedutil: Don't set next_freq to UINT_MAX

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@...aro.org>
> > ---
> > V2:
> > - Rebased over the fix sent by Rafael
> > 
> >   lkml.kernel.org/r/2276196.ev9rMjHTR0@...ire.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@...lfernandes.org>

Applied, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ