All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Jeffrey Hugo <jhugo@codeaurora.org>
Cc: Ingo Molnar <mingo@redhat.com>,
	linux-kernel@vger.kernel.org,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Austin Christ <austinwc@codeaurora.org>,
	Tyler Baicar <tbaicar@codeaurora.org>,
	Timur Tabi <timur@codeaurora.org>,
	Morten Rasmussen <morten.rasmussen@arm.com>
Subject: Re: [PATCH V5 2/2] sched/fair: Remove group imbalance from calculate_imbalance()
Date: Wed, 5 Jul 2017 13:22:05 +0200	[thread overview]
Message-ID: <20170705112205.tyeprtki4vel5kpx@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <1496863138-11322-3-git-send-email-jhugo@codeaurora.org>

On Wed, Jun 07, 2017 at 01:18:58PM -0600, Jeffrey Hugo wrote:
> The group_imbalance path in calculate_imbalance() made sense when it was
> added back in 2007 with commit 908a7c1b9b80 ("sched: fix improper load
> balance across sched domain") because busiest->load_per_task factored into
> the amount of imbalance that was calculated. That is not the case today.

It would be nice to have some more information on which patch(es)
changed that.

> The group_imbalance path can only affect the outcome of
> calculate_imbalance() when the average load of the domain is less than the
> original busiest->load_per_task. In this case, busiest->load_per_task is
> overwritten with the scheduling domain load average. Thus
> busiest->load_per_task no longer represents actual load that can be moved.
> 
> At the final comparison between env->imbalance and busiest->load_per_task,
> imbalance may be larger than the new busiest->load_per_task causing the
> check to fail under the assumption that there is a task that could be
> migrated to satisfy the imbalance. However env->imbalance may still be
> smaller than the original busiest->load_per_task, thus it is unlikely that
> there is a task that can be migrated to satisfy the imbalance.
> Calculate_imbalance() would not choose to run fix_small_imbalance() when we
> expect it should. In the worst case, this can result in idle cpus.
> 
> Since the group imbalance path in calculate_imbalance() is at best a NOP
> but otherwise harmful, remove it.

load_per_task is horrible and should die. Ever since we did cgroup
support the number is complete crap, but even before that the concept
was dubious.

Most of the logic that uses the number stems from the pre-smp-nice era.

This also of course means that fix_small_imbalance() is probably a load
of crap. Digging through all that has been on the todo list for a long
while but somehow not something I've ever gotten to :/

  reply	other threads:[~2017-07-05 11:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-07 19:18 [PATCH V5 0/2] load_balance() fixes for affinity Jeffrey Hugo
2017-06-07 19:18 ` [PATCH V5 1/2] sched/fair: Fix load_balance() affinity redo path Jeffrey Hugo
2017-07-05 11:22   ` Peter Zijlstra
2017-07-05 22:48   ` [tip:sched/urgent] " tip-bot for Jeffrey Hugo
2017-06-07 19:18 ` [PATCH V5 2/2] sched/fair: Remove group imbalance from calculate_imbalance() Jeffrey Hugo
2017-07-05 11:22   ` Peter Zijlstra [this message]
2017-07-07 15:26     ` Jeffrey Hugo
2017-06-13 14:32 ` [PATCH V5 0/2] load_balance() fixes for affinity Jeffrey Hugo
2017-06-20 14:28   ` Jeffrey Hugo
2017-06-28 16:12     ` Jeffrey Hugo
2017-07-05  9:19       ` Peter Zijlstra

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=20170705112205.tyeprtki4vel5kpx@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=austinwc@codeaurora.org \
    --cc=dietmar.eggemann@arm.com \
    --cc=jhugo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=morten.rasmussen@arm.com \
    --cc=tbaicar@codeaurora.org \
    --cc=timur@codeaurora.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.