From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: Morten Rasmussen <morten.rasmussen@arm.com>,
Vincent Guittot <vincent.guittot@linaro.org>
Cc: peterz@infradead.org, mingo@kernel.org,
linux-kernel@vger.kernel.org, yuyang.du@intel.com,
pjt@google.com, bsegall@google.com
Subject: Re: [PATCH v2] sched/fair: update scale invariance of PELT
Date: Fri, 28 Apr 2017 18:08:36 +0100 [thread overview]
Message-ID: <9e629311-7da1-afab-a493-3300f11836d8@arm.com> (raw)
In-Reply-To: <20170428155258.GA12012@e105550-lin.cambridge.arm.com>
On 28/04/17 16:52, Morten Rasmussen wrote:
> Hi Vincent,
[...]
> As mentioned above, waiting time, i.e. !running && weight, is not
> scaled, which causes trouble for load.
I ran some rt-app-based tests on a system with frequency and cpu invariance.
(1) Two periodic 20% tasks with 12ms period on a cpu (capacity=1024) at
625Mhz (max 1100Mhz) starting to run at the same time, so one task
(task1) is wakeup preempted. (I'm only considering the phase of the test
run where this is a stable condition, i.e. task1 is always wakeup
preempted by task2).
So the runtime of a task is 0.2*12ms*1100/625 = 4.2ms.
At the beginning of the preemption period, __update_load_avg_se(task1)
is called with running=0 and weight=0, at the end with running=0 and
weight=1024.
When task1 finally runs there are two calls with (running=1,
weight=1024) before the next wakeup preemption period for task1 starts
again with (running=0, weight=0).
Task task2 which doesn't suffer from wakeup preemption starts running
with (running=0, weight=0), then there are 2 calls with (running=1,
weight=1024) before it starts running again with (running=0, weight=0).
Task1 is runnable for 8.4ms and sleeps for 3.6ms whereas task is
runnable for 4.2ms and sleeps for 7.8ms.
The load signal of task1 is ~600 whereas the the load of task2 is ~200.
(2) Two periodic 20% tasks with 12ms period on a cpu (capacity=1024) at
1100Mhz (max 1100Mhz) starting to run at the same time, so one task
(task1) is wakeup preempted.
So the runtime of one task is 0.2*12ms*1100/1100 = 2.4ms.
Task1 is runnable for 4.8ms and sleeps for 7.2ms whereas task is
runnable for 2.4ms and sleeps for 9.6ms.
The load signal of task1 is ~400 whereas the the load of task2 is ~200.
Like Morten said, the scaling for load works differently on different
OPP's. Scaling for utilization looks fine.
IMHO, the implementation of your scale_time() function can't take
preemption into consideration.
I also did tests comparing the time_scaling implementation with tip
(contribution scaling) (two periodic tasks 20%/16ms at 625Mhz/1100Mhz
and 20%/32ms at 625Mhz/1100Mhz) showing this as a difference between
time_scaling and tip.
-- Dietmar
[...]
next prev parent reply other threads:[~2017-04-28 17:08 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-10 9:18 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
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 [this message]
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=9e629311-7da1-afab-a493-3300f11836d8@arm.com \
--to=dietmar.eggemann@arm.com \
--cc=bsegall@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=morten.rasmussen@arm.com \
--cc=peterz@infradead.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
all inboxes | Powered by JetHome®