public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Ken Chen <kenchen@google.com>
Cc: Vladimir Davydov <VDavydov@parallels.com>,
	"mingo@elte.hu" <mingo@elte.hu>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Subject: [PATCH] sched: fixed erroneous all_pinned logic.
Date: Sat, 09 Apr 2011 13:14:43 +0200	[thread overview]
Message-ID: <1302347683.9086.1247.camel@twins> (raw)
In-Reply-To: <BANLkTi=ernzNawaR5tJZEsV_QVnfxqXmsQ@mail.gmail.com>

On Fri, 2011-04-08 at 12:20 -0700, Ken Chen wrote:
> sched: fixed erroneous all_pinned logic.
> 
> The scheduler load balancer has specific code to deal with cases of
> unbalanced system due to lots of unmovable tasks (for example because
> of hard CPU affinity). In those situation, it exclude the busiest CPU
> that has pinned tasks for load balance consideration such that it can
> perform second 2nd load balance pass on the rest of the system.  This
> all works as designed if there is only one cgroup in the system.
> 
> However, when we have multiple cgroups, this logic has false positive
> and triggers multiple load balance passes despite there are actually
> no pinned tasks at all.
> 
> The reason it has false positive is that the all pinned logic is deep
> in the lowest function of can_migrate_task() and is too low level.
> load_balance_fair() iterate each task group and calls balance_tasks()
> to migrate target load.  Along the way, balance_tasks() will also set
> a all_pinned variable.  Given that task-groups are iterated, this
> all_pinned variable is essentially the status of last group in the
> scanning process.  Task group can have number of reasons that no load
> being migrated, none due to cpu affinity.  However, this status bit
> is being propagated back up to the higher level load_balance(), which
> incorrectly think that no tasks were moved.  It kick off the all pinned
> logic and start multiple passes attempt to move load onto puller CPU.
> 
> Moved the all_pinned aggregation up at the iterator level. This ensures
> that the status is aggregated over all task-groups, not just last one
> in the list.
> 
> Signed-off-by: Ken Chen <kenchen@google.com> 

Thanks Ken!

  reply	other threads:[~2011-04-09 11:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-08  0:24 Subject: [PATCH] sched: fixed erroneous all_pinned logic Ken Chen
2011-04-08 10:57 ` Vladimir Davydov
2011-04-08 11:49   ` Peter Zijlstra
2011-04-08 19:20     ` Ken Chen
2011-04-09 11:14       ` Peter Zijlstra [this message]
2011-04-11 10:46       ` [tip:sched/urgent] sched: Fix " tip-bot for Ken Chen
2011-04-08 18:25   ` Subject: [PATCH] sched: fixed " Ken Chen
2011-04-08 11:39 ` 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=1302347683.9086.1247.camel@twins \
    --to=a.p.zijlstra@chello.nl \
    --cc=VDavydov@parallels.com \
    --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