From: Valentin Schneider <valentin.schneider@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>,
Morten Rasmussen <Morten.Rasmussen@arm.com>
Subject: Re: [PATCH v2 1/3] sched/fair: fix rounding issue for asym packing
Date: Wed, 19 Dec 2018 15:30:06 +0000 [thread overview]
Message-ID: <913b1033-cc8e-d109-6096-c3a73ec0c87c@arm.com> (raw)
In-Reply-To: <CAKfTPtDwUqf1tKxOkJ-rU2FHUL63=smEtCRu5dqwYZC7zjvtJw@mail.gmail.com>
On 19/12/2018 15:20, Vincent Guittot wrote:
[...]
>> Oh yes, I never said it didn't work - I was doing some investigation on
>> the reason as to why we'd need this fix, because it's wasn't explicit from
>> the commit message.
>>
>> The rounding errors are countered by the +1, yes, but I'd rather remove
>> the errors altogether and go for the snippet I suggested in my previous
>> reply.
>
> except that you don't always want to migrate all group load.
> I prefer keeping current algorithm and fix it for now. Trying "new"
> thing can come in a 2nd step
We already set the imbalance as the whole group load, we just introduce
rounding errors inbetween. As I've already said:
in update_sg_lb_stats() we do:
sgs->avg_load = (sgs->group_load*SCHED_CAPACITY_SCALE) / sgs->group_capacity;
and in check_asym_packing() we do:
env->imbalance = DIV_ROUND_CLOSEST(
sds->busiest_stat.avg_load * sds->busiest_stat.group_capacity,
SCHED_CAPACITY_SCALE)
So we end up with something like:
group_load * SCHED_CAPACITY_SCALE * group_capacity
imbalance = --------------------------------------------------
group_capacity * SCHED_CAPACITY_SCALE
Which we could reduce down to:
imbalance = group_load
and not get any rounding errors.
next prev parent reply other threads:[~2018-12-19 15:30 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-14 16:01 [PATCH v2 0/3] sched/fair: some fixes for asym_packing Vincent Guittot
2018-12-14 16:01 ` [PATCH v2 1/3] sched/fair: fix rounding issue for asym packing Vincent Guittot
2018-12-18 17:32 ` Valentin Schneider
2018-12-19 8:32 ` Vincent Guittot
2018-12-19 11:58 ` Valentin Schneider
2018-12-19 13:39 ` Vincent Guittot
2018-12-19 14:59 ` Valentin Schneider
2018-12-19 15:05 ` Vincent Guittot
2018-12-19 15:11 ` Valentin Schneider
2018-12-19 15:20 ` Vincent Guittot
2018-12-19 15:30 ` Valentin Schneider [this message]
2018-12-19 15:54 ` Vincent Guittot
2018-12-14 16:01 ` [PATCH v2 2/3] sched/fair: trigger asym_packing during idle load balance Vincent Guittot
2018-12-17 16:59 ` Valentin Schneider
2018-12-18 8:17 ` Vincent Guittot
2018-12-18 12:00 ` Valentin Schneider
2018-12-14 16:01 ` [PATCH v2 3/3] sched/fair: fix unnecessary increase of balance interval Vincent Guittot
2018-12-17 16:56 ` Valentin Schneider
2018-12-18 9:32 ` Vincent Guittot
2018-12-18 11:46 ` Valentin Schneider
2018-12-18 13:23 ` Vincent Guittot
2018-12-18 14:09 ` Valentin Schneider
2018-12-19 8:27 ` Vincent Guittot
2018-12-19 11:16 ` Valentin Schneider
2018-12-19 13:29 ` Vincent Guittot
2018-12-19 15:54 ` Valentin Schneider
2018-12-19 16:54 ` 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=913b1033-cc8e-d109-6096-c3a73ec0c87c@arm.com \
--to=valentin.schneider@arm.com \
--cc=Morten.Rasmussen@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.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
all inboxes | Powered by JetHome®