From: Peter Zijlstra <peterz@infradead.org>
To: Joel Fernandes <joelaf@google.com>
Cc: linux-kernel@vger.kernel.org, kernel-team@android.com,
Vincent Guittot <vincent.guittot@linaro.org>,
Juri Lelli <juri.lelli@arm.com>,
Brendan Jackman <brendan.jackman@arm.com>,
Dietmar Eggeman <dietmar.eggemann@arm.com>,
Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCH] sched/fair: Make PELT signal more accurate
Date: Mon, 7 Aug 2017 15:40:22 +0200 [thread overview]
Message-ID: <20170807134022.bvql3s5lrfgh3e5q@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20170804154023.26874-1-joelaf@google.com>
On Fri, Aug 04, 2017 at 08:40:23AM -0700, Joel Fernandes wrote:
> The PELT signal (sa->load_avg and sa->util_avg) are not updated if the
> amount accumulated during a single update doesn't cross a period
> boundary.
> This is fine in cases where the amount accrued is much smaller than
> the size of a single PELT window (1ms) however if the amount accrued
> is high then the relative error (calculated against what the actual
> signal would be had we updated the averages) can be quite high - as
> much 3-6% in my testing.
The max accumulate we can have and not cross a boundary is 1023*1024 ns.
At which point we get a divisor of LOAD_AVG_MAX - 1024 + 1023.
So for util_sum we'd have a increase of 1023*1024/(47742-1) = ~22. Which
on the total signal for util (1024) is ~2.1%
Where does the 3-6% come from?
> Inorder to fix this, this patch does the average update by also
> checking how much time has elapsed since the last update and update
> the averages if it has been long enough (as a threshold I chose
> 128us).
This of course does the divisions more often; anything on performance
impact?
next prev parent reply other threads:[~2017-08-07 13:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-04 15:40 Joel Fernandes
2017-08-07 13:24 ` Vincent Guittot
2017-08-08 23:11 ` Joel Fernandes
2017-08-09 10:23 ` Vincent Guittot
2017-08-09 17:51 ` Joel Fernandes
2017-08-10 7:17 ` Vincent Guittot
2017-08-10 10:37 ` Peter Zijlstra
2017-08-10 15:22 ` Joel Fernandes
2017-08-07 13:40 ` Peter Zijlstra [this message]
2017-08-08 23:37 ` Joel Fernandes
2017-08-10 23:11 ` Joel Fernandes
2017-08-11 2:47 ` [lkp-robot] [sched/fair] dca93994f6: unixbench.score -8.1% regression kernel test robot
2017-08-11 15:57 ` Joel Fernandes
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=20170807134022.bvql3s5lrfgh3e5q@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=brendan.jackman@arm.com \
--cc=dietmar.eggemann@arm.com \
--cc=joelaf@google.com \
--cc=juri.lelli@arm.com \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--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
all inboxes | Powered by JetHome®