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>,
Valentin Schneider <valentin.schneider@arm.com>,
Morten Rasmussen <Morten.Rasmussen@arm.com>
Subject: Re: [PATCH v2] sched/fair: fix 1 task per CPU
Date: Thu, 13 Dec 2018 14:12:11 +0100 [thread overview]
Message-ID: <20181213131211.GK2237@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <CAKfTPtBG_gcWzi4RUWF_c2aazqxDPHbb2rGWHvWND6pQHQxPGw@mail.gmail.com>
On Thu, Dec 13, 2018 at 12:04:20PM +0100, Vincent Guittot wrote:
> On Thu, 13 Dec 2018 at 11:44, Peter Zijlstra <peterz@infradead.org> wrote:
> >
> > On Mon, Sep 10, 2018 at 04:43:09PM +0200, Vincent Guittot wrote:
> > > When CPUs have different capacity because of RT/DL tasks or
> > > micro-architecture or max frequency differences, there are situation where
> > > the imbalance is not correctly set to migrate waiting task on the idle CPU.
> > >
> > > The UC uses the force_balance case:
> > >
> > > if (env->idle != CPU_NOT_IDLE && group_has_capacity(env, local) &&
> > > busiest->group_no_capacity)
> > > goto force_balance;
> > >
> > > But calculate_imbalance fails to set the right amount of load to migrate
> > > a task because of the special condition:
> > >
> > > busiest->avg_load <= sds->avg_load || local->avg_load >= sds->avg_load)
> > >
> > > Add in fix_small_imbalance, this special case that triggered the force
> > > balance in order to make sure that the amount of load to migrate will be
> > > enough.
> >
> > So I think this patch is going in the wrong direction for a number of
> > reasons:
> >
> > - we'd like to get rid of fix_small_imbalance(), and this adds to it;
> >
> > - the whole load_per_task stuff is terminally broken, it _cannot_ work
> > right.
> >
> >
> > What I've suggested in the past is parameterizing the load balancer and
> > picking different criteria to balance on:
>
> This patch is clearly a fix of the current implementation.
> What you suggest below makes sense but implies a significant rework in
> the calculate_imbalance and the load_balancer in general and will need
> more time to reach a stable state.
> Nevertheless, I will have a look at that
>
> I imagine that your feedback for https://lkml.org/lkml/2018/10/2/283
> will be the same ?
No; those actually look ok. It is mostly that I really don't think
load_per_task makes any kind of sense.
It sorta works when all tasks are of the same weight, but if you start
using nice -- or way worse, cgroups -- then the number is complete
bollocks.
next prev parent reply other threads:[~2018-12-13 13:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-10 14:43 Vincent Guittot
2018-09-14 3:22 ` Valentin Schneider
2018-09-14 16:26 ` Vincent Guittot
2018-12-13 8:05 ` Vincent Guittot
2018-12-13 10:44 ` Peter Zijlstra
2018-12-13 11:04 ` Vincent Guittot
2018-12-13 13:12 ` Peter Zijlstra [this message]
2018-12-13 15:14 ` 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=20181213131211.GK2237@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=Morten.Rasmussen@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=valentin.schneider@arm.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®