public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Patrick Bellasi <patrick.bellasi@arm.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Peter Zijlstra <peterz@infradead.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: Wed, 28 Nov 2018 14:40:39 +0000	[thread overview]
Message-ID: <20181128144039.GC23094@e110439-lin> (raw)
In-Reply-To: <CAKfTPtBsKc7v5gc=XUrzO-_4kahGfdNteo=t9W5fLv0Ee8co_w@mail.gmail.com>

On 28-Nov 14:33, Vincent Guittot wrote:
> On Wed, 28 Nov 2018 at 12:53, Patrick Bellasi <patrick.bellasi@arm.com> wrote:
> >
> > On 28-Nov 11:02, Peter Zijlstra wrote:
> > > On Wed, Nov 28, 2018 at 10:54:13AM +0100, Vincent Guittot wrote:
> > >
> > > > Is there anything else that I should do for these patches ?
> > >
> > > IIRC, Morten mention they break util_est; Patrick was going to explain.
> >
> > I guess the problem is that, once we cross the current capacity,
> > strictly speaking util_avg does not represent anymore a utilization.
> >
> > With the new signal this could happen and we end up storing estimated
> > utilization samples which will overestimate the task requirements.
> >
> > We will have a spike in estimated utilization at next wakeup, since we
> > use MAX(util_avg@dequeue_time, ewma). Potentially we also inflate the EWMA in
> > case we collect multiple samples above the current capacity.
> 
> TBH I don't see how it's different from current implementation with a
> task that was scheduled on big core and now wakes up on little core.
> The util_est is overestimated as well.

While running below the capacity of a CPU, either big or LITTLE, we
can still measure the actual used bandwidth as long as we have idle
time. If the task is then moved into a lower capacity core, I think
it's still safe to assume that, likely, it would need more capacity.

Why do you say it's the same ?

With your new signal instead, once we cross the current capacity,
utilization is just not anymore utilization. Thus, IMHO it make sense
avoid to accumulate a sample for what we call "estimated utilization".

I would also say that, with the current implementation which caps
utilization to the current capacity, we get better estimation in
general. At least we can say with absolute precision:

   "the task needs _at least_ that amount of capacity".

Potentially we can also flag the task as being under-provisioned, in
case there was not idle time, and _let a policy_ decide what to do
with it and the granted information we have.

While, with your new signal, once we are over the current capacity,
the "utilization" is just a sort of "random" number at best useful to
drive some conclusions about how long the task has been delayed.

IOW, I fear that we are embedding a policy within a signal which is
currently representing something very well defined: how much cpu
bandwidth a task used. While, latency/under-provisioning policies
perhaps should be better placed somewhere else.

Perhaps I've missed it in some of the previous discussions:
have we have considered/discussed this signal-vs-policy aspect ?

-- 
#include <best/regards.h>

Patrick Bellasi

  parent reply	other threads:[~2018-11-28 14:40 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 [this message]
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

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=20181128144039.GC23094@e110439-lin \
    --to=patrick.bellasi@arm.com \
    --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=peterz@infradead.org \
    --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