All of lore.kernel.org
 help / color / mirror / Atom feed
From: Valentin Schneider <valentin.schneider@arm.com>
To: Vincent Guittot <vincent.guittot@linaro.org>,
	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
Cc: john.stultz@linaro.org, qais.yousef@arm.com
Subject: Re: [PATCH] sched/fair: fix find_idlest_group() to handle CPU affinity
Date: Wed, 4 Dec 2019 23:22:01 +0000	[thread overview]
Message-ID: <738ad52b-d94e-c31a-3d40-56a0aba64453@arm.com> (raw)
In-Reply-To: <1575483700-22153-1-git-send-email-vincent.guittot@linaro.org>

On 04/12/2019 18:21, Vincent Guittot wrote:
> Because of CPU affinity, the local group can be skipped which breaks the
> assumption that statistics are always collected for local group. With
> uninitialized local_sgs, the comparison is meaningless and the behavior
> unpredictable. This can even end up to use local pointer which is to
> NULL in this case.
> 
> If the local group has been skipped because of CPU affinity, we return
> the idlest group.
> 

I stared at find_idlest_group() before the rework out of curiosity and
AFAICT the "never visit local group" thing was there already. However, we
would only use the load and spare capacity of that group, and the relevant
variables where initialized to ULONG_MAX and 0 respectively. This would lead
us to return 'idlest' (or 'most_spare_sg', but it's the same as 'idlest' now).

So IMO this is just restoring the previous behaviour, which is what we want
methinks.

Reviewed-by: Valentin Schneider <valentin.schneider@arm.com>

  reply	other threads:[~2019-12-04 23:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-04 18:21 [PATCH] sched/fair: fix find_idlest_group() to handle CPU affinity Vincent Guittot
2019-12-04 23:22 ` Valentin Schneider [this message]
2019-12-10 10:36 ` Qais Yousef
2019-12-17  1:08 ` John Stultz
2019-12-17 12:39 ` [tip: sched/urgent] sched/fair: Fix " 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=738ad52b-d94e-c31a-3d40-56a0aba64453@arm.com \
    --to=valentin.schneider@arm.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=john.stultz@linaro.org \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=qais.yousef@arm.com \
    --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 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.