linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Valentin Schneider <valentin.schneider@arm.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
	dietmar.eggemann@arm.com, rostedt@goodmis.org,
	bsegall@google.com, mgorman@suse.de,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched/fair: improve spreading of utilization
Date: Fri, 13 Mar 2020 11:00:21 +0000	[thread overview]
Message-ID: <jhjr1xwjz96.mognet@arm.com> (raw)
In-Reply-To: <20200312165429.990-1-vincent.guittot@linaro.org>


On Thu, Mar 12 2020, Vincent Guittot wrote:
>  kernel/sched/fair.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 3c8a379c357e..97a0307312d9 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -9025,6 +9025,14 @@ static struct rq *find_busiest_queue(struct lb_env *env,
>               case migrate_util:
>                       util = cpu_util(cpu_of(rq));
>
> +			/*
> +			 * Don't try to pull utilization from a CPU with one
> +			 * running task. Whatever its utilization, we will fail
> +			 * detach the task.
> +			 */
> +			if (nr_running <= 1)
> +				continue;
> +

Doesn't this break misfit? If the busiest group is group_misfit_task, it
is totally valid for the runqueues to have a single running task -
that's the CPU-bound task we want to upmigrate.

If the busiest rq has only a single running task, we'll skip the
detach_tasks() block and go straight to the active balance bits.
Misfit balancing totally relies on this, and IMO ASYM_PACKING does
too. Looking at voluntary_active_balance(), it seems your change also
goes against the one added by
  1aaf90a4b88a ("sched: Move CFS tasks to CPUs with higher capacity")

The bandaid here would be gate this 'continue' with checks against the
busiest_group_type, but that's only a loose link wrt
voluntary_active_balance().

>                       if (busiest_util < util) {
>                               busiest_util = util;
>                               busiest = rq;

  parent reply	other threads:[~2020-03-13 11:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-12 16:54 [PATCH] sched/fair: improve spreading of utilization Vincent Guittot
2020-03-13 10:26 ` Peter Zijlstra
2020-03-13 11:00 ` Valentin Schneider [this message]
2020-03-13 11:24   ` Vincent Guittot
2020-03-13 11:28     ` Valentin Schneider
2020-03-13 12:42       ` Valentin Schneider
2020-03-13 12:55         ` Vincent Guittot
2020-03-13 14:26           ` Vincent Guittot
2020-03-13 15:47             ` Valentin Schneider
2020-03-13 16:09               ` Vincent Guittot
2020-03-13 16:57                 ` Valentin Schneider
2020-03-13 17:12                   ` Vincent Guittot
2020-03-13 17:34                     ` Valentin Schneider
2020-03-20 12:58 ` [tip: sched/core] sched/fair: Improve " tip-bot2 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=jhjr1xwjz96.mognet@arm.com \
    --to=valentin.schneider@arm.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.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;
as well as URLs for NNTP newsgroup(s).