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] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 18 May 2018 14:33:53 +0100
From:   Patrick Bellasi <patrick.bellasi@....com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     "Rafael J. Wysocki" <rafael@...nel.org>,
        Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
        Juri Lelli <juri.lelli@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...e.de>,
        Len Brown <lenb@...nel.org>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Mel Gorman <mgorman@...hsingularity.net>,
        the arch/x86 maintainers <x86@...nel.org>,
        Linux PM <linux-pm@...r.kernel.org>,
        Viresh Kumar <viresh.kumar@...aro.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [RFC/RFT] [PATCH 02/10] cpufreq: intel_pstate: Conditional
 frequency invariant accounting

On 18-May 13:29, Peter Zijlstra wrote:
> On Fri, May 18, 2018 at 11:57:42AM +0100, Patrick Bellasi wrote:
> > Thus, my simple (maybe dumb) questions are:
> > - why can't we just fold turbo boost frequency into the existing concepts?
> > - what are the limitations of such a "simple" approach?
> 
> Perhaps... but does this not further complicate the whole capacity vs
> util thing we already have in say the misfit patches?

Not sure about that...

> And the  util_fits_capacity() thing from the EAS ones.

In this case instead, if we can track somehow (not saying we can)
what is the currently available "transient maximum capacity"...
then a util_fits_capacity() should just look at that.

If the transient capacity is already folded into cpu_capacity, as it
is now for RT and IRQ pressure, then likely we don't have to change
anything.

> The thing is, we either need to dynamically scale the util or the
> capacity or both. I think for Thermal there are patches out there that
> drop the capacity.

Not sure... but I would feel more comfortable by something which caps
the maximum capacity. Meaning, eventually you can fill up the maximum
possible capacity only "up to" a given value, because of thermal or other
reasons most of the scheduler maybe doesn't even have to know why?

> But we'd then have to do the same for turbo/vector and all the other
> stuff as well. Otherwise we risk things like running at low U with 0%
> idle and not triggering the tipping point between eas and regular
> balancing.

Interacting with the tipping point and/or OPP changes is indeed an
interesting side of the problem I was not considering so far...

But again, the tipping point could not be defined as a delta
with respect to the "transient maximum capacity" ?

> So either way around we need to know the 'true' max, either to fudge
> util or to fudge capacity.

Right, but what I see from a concepts standpoint is something like:

     +--+--+   cpu_capacity_orig (CONSTANT at boot time)
     |  |  |
     |  |  |       HW generated constraints
     |  v  |
     +-----+   cpu_capacity_max (depending on thermal/turbo boost)
     |  |  |
     |  |  |       SW generated constraints
     |  v  |
     +-----+   cpu_capacity (depending on RT/IRQ pressure)
     |  |  |
     |  |  |       tipping point delta
     +--v--+
     |     |   Energy Aware mode available capacity
     +-----+

Where all the wkp/lb heuristics are updated to properly consider the
cpu_capacity_max metrics whenever it comes to know what is the max
speed we can reach now on a CPU.

> And I'm not sure we can know in some of these cases :/

Right, this schema will eventually work only under the hypothesis that
"somehow" we can update cpu_capacity_max from HW events.

Not entirely sure that's possible and/or at which time granularity on
all different platforms.

> And while Vincent's patches might have been inspired by another problem,
> they do have the effect of always allowing util to go to 1, which is
> nice for this.

Sure, that's a nice point, but still I have the feeling that always
reaching u=1 can defeat other interesting properties of a task,
For example, comparing task requirements in different CPUs and/or at
different times, which plays a big role for energy aware task
placement decisions.

-- 
#include <best/regards.h>

Patrick Bellasi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ