From: Morten Rasmussen <morten.rasmussen@arm.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Yuyang Du <yuyang.du@intel.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
Mike Galbraith <efault@gmx.de>,
wanpeng.li@hotmail.com, Peter Zijlstra <peterz@infradead.org>,
"H. Peter Anvin" <hpa@zytor.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@kernel.org>,
Benjamin Segall <bsegall@google.com>
Subject: Re: [tip:sched/core] sched/fair: Clean up scale confusion
Date: Fri, 20 May 2016 11:12:27 +0100 [thread overview]
Message-ID: <20160520101226.GA30663@e105550-lin.cambridge.arm.com> (raw)
In-Reply-To: <CAKfTPtBGn_N7Ox+=D=cBMF6Vo=0qMWhA6Qio5ZYYYXP2Wz1uHw@mail.gmail.com>
On Fri, May 13, 2016 at 09:23:50AM +0200, Vincent Guittot wrote:
> On 12 May 2016 at 21:42, Yuyang Du <yuyang.du@intel.com> wrote:
> > On Thu, May 12, 2016 at 03:31:27AM -0700, tip-bot for Peter Zijlstra wrote:
> >> Commit-ID: 1be0eb2a97d756fb7dd8c9baf372d81fa9699c09
> >> Gitweb: http://git.kernel.org/tip/1be0eb2a97d756fb7dd8c9baf372d81fa9699c09
> >> Author: Peter Zijlstra <peterz@infradead.org>
> >> AuthorDate: Fri, 6 May 2016 12:21:23 +0200
> >> Committer: Ingo Molnar <mingo@kernel.org>
> >> CommitDate: Thu, 12 May 2016 09:55:33 +0200
> >>
> >> sched/fair: Clean up scale confusion
> >>
> >> Wanpeng noted that the scale_load_down() in calculate_imbalance() was
> >> weird. I agree, it should be SCHED_CAPACITY_SCALE, since we're going
> >> to compare against busiest->group_capacity, which is in [capacity]
> >> units.
>
> In fact, load_above_capacity is only about load and not about capacity.
>
> load_above_capacity -= busiest->group_capacity is an optimization (may
> be a wronf one) of
> load_above_capacity -= busiest->group_capacity * SCHED_LOAD_SCALE /
> SCHED_CAPACITY_SCALE
>
> so we subtract load to load
I like your approach as you compute the desired minimum load, which is
essentially finding the number of NICE_0_LOAD task we want in the group,
and then determine how much excess load there is. So it becomes quite
clear that it is load.
While it preserves existing behaviour I would question the whole
NICE_0_LOAD assumption. It totally falls apart with PELT and if we have
tasks with nice != 0.
Also, it doesn't address the existing unit issue as load_above_capacity
is later multiplied by busiest->group_capacity when computing the
imbalance. As said in the other thread, we should either kill the
minimum load estimation that assumes always-running NICE_0_LOAD tasks,
or at least make sure the scaling of load_above_capacity is correct.
Patches attempting either solution are in the other thread.
next prev parent reply other threads:[~2016-05-20 10:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <tip-1be0eb2a97d756fb7dd8c9baf372d81fa9699c09@git.kernel.org>
2016-05-12 19:42 ` [tip:sched/core] sched/fair: Clean up scale confusion Yuyang Du
2016-05-13 7:23 ` Vincent Guittot
2016-05-20 10:12 ` Morten Rasmussen [this message]
2016-05-23 10:27 ` 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=20160520101226.GA30663@e105550-lin.cambridge.arm.com \
--to=morten.rasmussen@arm.com \
--cc=bsegall@google.com \
--cc=efault@gmx.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=vincent.guittot@linaro.org \
--cc=wanpeng.li@hotmail.com \
--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