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: <20190129194213.GA2979@hirez.programming.kicks-ass.net>
Date:   Tue, 29 Jan 2019 20:42:13 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Patrick Bellasi <patrick.bellasi@....com>
Cc:     Vincent Guittot <vincent.guittot@...aro.org>,
        Ingo Molnar <mingo@...nel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Morten Rasmussen <Morten.Rasmussen@....com>,
        Paul Turner <pjt@...gle.com>, Ben Segall <bsegall@...gle.com>,
        Thara Gopinath <thara.gopinath@...aro.org>,
        pkondeti@...eaurora.org, Quentin Perret <quentin.perret@....com>,
        Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
Subject: Re: [PATCH v7 2/2] sched/fair: update scale invariance of PELT

On Thu, Jan 24, 2019 at 02:04:32PM +0000, Patrick Bellasi wrote:

> > So if I'm not mistaken we then have 3 cases:
> > 
> >  1) runnable == util <= capacity
> > 
> >     no contention, idle
> > 
> >  2) runnable == util > capacity
> > 
> >     no contention, no idle
> > 
> >  3) runnable > util
> > 
> >     contention, no idle
> > 
> > For 1) we can use: 'util'
> > For 2) we can use: 'capacity'
> > For 3) we can use: 'util * capacity >> 10'
> > 
> > (note that 2 is a special case of 3 when u=1)
> > 
> > This should work right?
> 
> I think there is a case, similar to 2, in which the new 'util' could
> potentially be used. That's the case for example of a 20% (estimated)
> utilization task running alone on a 15% capacity CPU, for a single
> activation. In that case such a task will complete and be dequeued
> with:
> 
>    runnable == util > capacity
> 
> The problem is that we need to be sure there was not contention... and
> that seems to be difficult to detect.

When there is contention runnable and util should diverge. Given this is
all discrete stuff, there's a few funnies, but who cares about those :-)

> > Now, instead of doing complicated things like that, you instead figure
> > that when there's no idle there's also no dequeue happening and we can
> > simply short-cut by skipping the entire thing, forgetting everything
> > about 2,3.
> > 
> > Did I get that right?
> 
> More or less... just saying that 1 is the only easy to detect scenario
> in which we are granted the utilization represents an actual bandwidth
> request and thus the only safe values to sample for estimated
> utilization. For the other cases, since anyway:
> 
>    util_est := max(max(ewma, last_util), util_avg)
> 
> util_est will just keep representing a safe and actually measured
> lower-bound for the expected utilization of a task, without
> side-affecting the EWMA which has a "slow" update dynamic.

Right, so maybe we should expound the comment here a bit; but otherwise
I'm inclined to merge that v9 Vincent posted.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ