linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Patrick Bellasi <patrick.bellasi@arm.com>
Cc: Vincent Guittot <vincent.guittot@linaro.org>,
	Ingo Molnar <mingo@kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Morten Rasmussen <Morten.Rasmussen@arm.com>,
	Paul Turner <pjt@google.com>, Ben Segall <bsegall@google.com>,
	Thara Gopinath <thara.gopinath@linaro.org>,
	pkondeti@codeaurora.org, Quentin Perret <quentin.perret@arm.com>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Subject: Re: [PATCH v7 2/2] sched/fair: update scale invariance of PELT
Date: Tue, 29 Jan 2019 20:42:13 +0100	[thread overview]
Message-ID: <20190129194213.GA2979@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20190124140432.2kiprlxzw2cpf35f@e110439-lin>

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.

      reply	other threads:[~2019-01-29 19:42 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-20 10:55 [PATCH v7 0/2] sched/fair: update scale invariance of PELT Vincent Guittot
2018-11-20 10:55 ` [PATCH v7 1/2] sched/fair: move rq_of helper function Vincent Guittot
2018-11-20 10:55 ` [PATCH v7 2/2] sched/fair: update scale invariance of PELT Vincent Guittot
2018-11-28  9:54   ` Vincent Guittot
2018-11-28 10:02     ` Peter Zijlstra
2018-11-28 11:53       ` Patrick Bellasi
2018-11-28 13:33         ` Vincent Guittot
2018-11-28 13:35           ` Vincent Guittot
2018-11-28 14:40           ` Patrick Bellasi
2018-11-28 14:55             ` Vincent Guittot
2018-11-28 15:21               ` Patrick Bellasi
2018-11-28 15:42                 ` Vincent Guittot
2018-11-28 16:35                   ` Patrick Bellasi
2018-11-29 10:43                     ` Vincent Guittot
2018-11-29 15:00                       ` Patrick Bellasi
2018-11-29 16:19                         ` Vincent Guittot
2019-01-10 15:30                           ` Patrick Bellasi
2019-01-11 14:29                             ` Vincent Guittot
2018-11-29 12:53         ` Peter Zijlstra
2018-11-29 15:13           ` Patrick Bellasi
2019-01-24  9:07             ` Peter Zijlstra
2019-01-24 14:04               ` Patrick Bellasi
2019-01-29 19:42                 ` Peter Zijlstra [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=20190129194213.GA2979@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=Morten.Rasmussen@arm.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=patrick.bellasi@arm.com \
    --cc=pjt@google.com \
    --cc=pkondeti@codeaurora.org \
    --cc=quentin.perret@arm.com \
    --cc=rjw@rjwysocki.net \
    --cc=srinivas.pandruvada@linux.intel.com \
    --cc=thara.gopinath@linaro.org \
    --cc=vincent.guittot@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).