From: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
To: mingo@elte.hu, nickpiggin@yahoo.com.au
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org, steiner@sgi.com
Subject: [Patch] don't kick ALB in the presence of pinned task
Date: Mon, 1 Aug 2005 17:42:21 -0700 [thread overview]
Message-ID: <20050801174221.B11610@unix-os.sc.intel.com> (raw)
Jack Steiner brought this issue at my OLS talk.
Take a scenario where two tasks are pinned to two HT threads in a physical
package. Idle packages in the system will keep kicking migration_thread
on the busy package with out any success.
We will run into similar scenarios in the presence of CMP/NUMA.
Patch appended.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
--- linux-2.6.13-rc4/kernel/sched.c~ 2005-08-01 10:50:27.085884216 -0700
+++ linux-2.6.13-rc4/kernel/sched.c 2005-08-01 14:39:04.147573872 -0700
@@ -2098,6 +2098,16 @@
if (unlikely(sd->nr_balance_failed > sd->cache_nice_tries+2)) {
spin_lock(&busiest->lock);
+
+ /* don't kick the migration_thread, if the curr
+ * task on busiest cpu can't be moved to this_cpu
+ */
+ if (!cpu_isset(this_cpu, busiest->curr->cpus_allowed)) {
+ spin_unlock(&busiest->lock);
+ all_pinned = 1;
+ goto out_one_pinned;
+ }
+
if (!busiest->active_balance) {
busiest->active_balance = 1;
busiest->push_cpu = this_cpu;
@@ -2135,6 +2145,7 @@
out_balanced:
spin_unlock(&this_rq->lock);
+out_one_pinned:
schedstat_inc(sd, lb_balanced[idle]);
sd->nr_balance_failed = 0;
next reply other threads:[~2005-08-02 0:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-02 0:42 Siddha, Suresh B [this message]
2005-08-02 6:09 ` [Patch] don't kick ALB in the presence of pinned task Nick Piggin
2005-08-02 9:43 ` Ingo Molnar
2005-08-02 10:06 ` Nick Piggin
2005-08-02 21:12 ` Siddha, Suresh B
2005-08-02 9:27 ` Ingo Molnar
2005-08-09 23:08 ` allow the load to grow upto its cpu_power (was Re: [Patch] don't kick ALB in the presence of pinned task) Siddha, Suresh B
2005-08-10 0:27 ` Nick Piggin
2005-08-10 2:03 ` Siddha, Suresh B
2005-08-11 3:09 ` Nick Piggin
2005-08-11 18:14 ` Siddha, Suresh B
2005-08-11 23:49 ` Nick Piggin
2005-08-12 0:39 ` Siddha, Suresh B
2005-08-12 1:24 ` Nick Piggin
2005-08-12 1:44 ` Siddha, Suresh B
2005-08-10 7:16 ` Ingo Molnar
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=20050801174221.B11610@unix-os.sc.intel.com \
--to=suresh.b.siddha@intel.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=nickpiggin@yahoo.com.au \
--cc=steiner@sgi.com \
/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