From: Peter Zijlstra <peterz@infradead.org>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Ingo Molnar <mingo@kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Morten Rasmussen <Morten.Rasmussen@arm.com>,
Yuyang Du <yuyang.du@intel.com>, Paul Turner <pjt@google.com>,
Ben Segall <bsegall@google.com>
Subject: Re: [PATCH v2] sched/fair: update scale invariance of PELT
Date: Thu, 13 Apr 2017 18:13:07 +0200 [thread overview]
Message-ID: <20170413161307.q7g3wtlvh3c76zvp@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <CAKfTPtANR173Hr1K4TOR1DbD6N6qty8V0eTgbKmVmfQUxkJ0Zw@mail.gmail.com>
On Thu, Apr 13, 2017 at 05:16:20PM +0200, Vincent Guittot wrote:
> On 13 April 2017 at 15:39, Peter Zijlstra <peterz@infradead.org> wrote:
> > OK, so the reason util_avg varies is because we compute it wrong. And I
> > think we can easily fix that once we pull out all the factors (which
> > would mean your patch and the pulling out of weight patch which still
> > needs to be finished).
>
> That would be great to remove this unwanted variation.
So the problem with the _avg stuff is that we include the d3 segment,
that is the unfinished current window. Since we only re-compute the _avg
whenever we roll over, the intent already seems to be to only compute it
on completed windows.
But because 'complicated/expensive', its hard to not include d3 and thus
we get the wobble.
Once we compute pure running/runnable sums, without extra contrib
factors, we can simply subtract our d3 term from sum when doing the
division and change the divider to LOAD_AVG_MAX*y, getting the stable
_avg over all completed windows.
(you could do the same with factors, but then we get to do a bunch of
extra multiplications which aren't free).
> >
> > But you're comparing against util_sum here, that behaves slightly
> > different. I think you want 'util_sum >= 1024 * (LOAD_AVG_MAX - 1024)'
> > instead.
>
> yes, the variation happens on the util_sum
Well, for util_sum its simple to ignore the current window, which is
what the suggested equation does (note that LOAD_AVG_MAX*y ==
LOAD_AVG_MAX-1024).
next prev parent reply other threads:[~2017-04-13 16:13 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-10 9:18 [PATCH v2] sched/fair: update scale invariance of PELT Vincent Guittot
2017-04-10 17:38 ` Peter Zijlstra
2017-04-11 7:52 ` Vincent Guittot
2017-04-11 8:53 ` Peter Zijlstra
2017-04-11 9:40 ` Vincent Guittot
2017-04-11 10:41 ` Peter Zijlstra
2017-04-11 10:49 ` Peter Zijlstra
2017-04-11 13:09 ` Vincent Guittot
2017-04-12 11:28 ` Peter Zijlstra
2017-04-12 14:50 ` Vincent Guittot
2017-04-12 15:44 ` Peter Zijlstra
2017-04-13 9:42 ` Vincent Guittot
2017-04-13 13:32 ` Peter Zijlstra
2017-04-13 14:59 ` Vincent Guittot
2017-04-13 18:06 ` Peter Zijlstra
2017-04-14 8:47 ` Vincent Guittot
2017-04-11 12:08 ` Vincent Guittot
2017-04-11 9:12 ` Peter Zijlstra
2017-04-11 9:46 ` Vincent Guittot
2017-04-13 13:39 ` Peter Zijlstra
2017-04-13 15:16 ` Vincent Guittot
2017-04-13 16:13 ` Peter Zijlstra [this message]
2017-04-14 8:49 ` Vincent Guittot
2017-04-19 16:31 ` Vincent Guittot
2017-04-28 15:52 ` Morten Rasmussen
2017-04-28 17:08 ` Dietmar Eggemann
2017-05-03 17:11 ` Vincent Guittot
2017-04-28 22:09 ` Peter Zijlstra
2017-05-01 9:00 ` Peter Zijlstra
2017-05-02 13:38 ` Vincent Guittot
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=20170413161307.q7g3wtlvh3c76zvp@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=pjt@google.com \
--cc=vincent.guittot@linaro.org \
--cc=yuyang.du@intel.com \
/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).