From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Ken Chen <kenchen@google.com>
Cc: mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched: fix sched-domain avg_load calculation.
Date: Fri, 08 Apr 2011 13:15:50 +0200 [thread overview]
Message-ID: <1302261350.9086.120.camel@twins> (raw)
In-Reply-To: <20110408002322.3A0D812217F@elm.corp.google.com>
On Thu, 2011-04-07 at 17:23 -0700, Ken Chen wrote:
> In function find_busiest_group(), the sched-domain avg_load isn't
> calculated at all if there is a group imbalance within the domain.
> This will cause erroneous imbalance calculation. The reason is
> that calculate_imbalance() sees sds->avg_load = 0 and it will dump
> entire sds->max_load into imbalance variable, which is used later
> on to migrate entire load from busiest CPU to the puller CPU. It
> has two really bad effect:
>
> 1. stampede of task migration, and they won't be able to break out
> of the bad state because of positive feedback loop: large load
> delta -> heavier load migration -> larger imbalance and the cycle
> goes on.
>
> 2. severe imbalance in CPU queue depth. This causes really long
> scheduling latency blip which affects badly on application that
> has tight latency requirement.
>
> The fix is to have kernel calculate domain avg_load in both cases.
> This will ensure that imbalance calculation is always sensible and
> the target is usually half way between busiest and puller CPU.
Indeed so, it looks like I broke that in 866ab43efd32. Out of curiosity,
what kind of workload did you observe this on?
next prev parent reply other threads:[~2011-04-08 11:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-08 0:23 [PATCH] sched: fix sched-domain avg_load calculation Ken Chen
2011-04-08 11:15 ` Peter Zijlstra [this message]
2011-04-08 19:29 ` Ken Chen
2011-04-11 10:46 ` [tip:sched/urgent] sched: Fix " tip-bot for Ken Chen
2011-04-11 11:00 ` 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=1302261350.9086.120.camel@twins \
--to=a.p.zijlstra@chello.nl \
--cc=kenchen@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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