From: Peter Zijlstra <peterz@infradead.org>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: mingo@kernel.org, riel@redhat.com, linux-kernel@vger.kernel.org,
linaro-kernel@lists.linaro.org
Subject: Re: [PATCH] sched: fix spurious active migration
Date: Tue, 30 Sep 2014 20:41:29 +0200 [thread overview]
Message-ID: <20140930184129.GM4241@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <1412066468-4340-1-git-send-email-vincent.guittot@linaro.org>
On Tue, Sep 30, 2014 at 10:41:08AM +0200, Vincent Guittot wrote:
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 2a1e6ac..adad532 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -6425,13 +6425,14 @@ static struct sched_group *find_busiest_group(struct lb_env *env)
>
> if (env->idle == CPU_IDLE) {
> /*
> - * This cpu is idle. If the busiest group load doesn't
> - * have more tasks than the number of available cpu's and
> - * there is no imbalance between this and busiest group
> - * wrt to idle cpu's, it is balanced.
> + * This cpu is idle. If the busiest group is not overloaded
> + * and there is no imbalance between this and busiest group
> + * wrt to idle cpus, it is balanced. The imbalance becomes
> + * significant if the diff is greater than 1 otherwise we
> + * might end up to just move the imbalance on another group
> */
> - if ((local->idle_cpus < busiest->idle_cpus) &&
> - busiest->sum_nr_running <= busiest->group_weight)
> + if ((local->idle_cpus <= (busiest->idle_cpus + 1)) &&
So I'm thick and I don't get this one.. In fact I don't seem to
understand the existing code either.
If we're idle, and busiest is overloaded, we want to have tasks. Why
would we care about number of idle cpus etc..
> + !(busiest->group_type == group_overloaded))
Would not: busiest->group_type != group_overloaded, read more natural?
Also, would it make sense to make this the first condition?
> goto out_balanced;
> } else {
next prev parent reply other threads:[~2014-09-30 18:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-30 8:41 [PATCH] sched: fix spurious active migration Vincent Guittot
2014-09-30 9:38 ` Vincent Guittot
2014-09-30 10:07 ` Rik van Riel
2014-09-30 18:41 ` Peter Zijlstra [this message]
2014-10-01 7:02 ` Vincent Guittot
2014-10-01 13:38 ` [PATCH v2] " Vincent Guittot
2014-10-03 5:27 ` [tip:sched/core] sched: Improve sysbench performance by fixing " tip-bot for 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=20140930184129.GM4241@worktop.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=riel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.