public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [Patch] don't kick ALB in the presence of pinned task
@ 2005-08-02  0:42 Siddha, Suresh B
  2005-08-02  6:09 ` Nick Piggin
  2005-08-02  9:27 ` Ingo Molnar
  0 siblings, 2 replies; 16+ messages in thread
From: Siddha, Suresh B @ 2005-08-02  0:42 UTC (permalink / raw)
  To: mingo, nickpiggin; +Cc: akpm, linux-kernel, steiner

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;

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2005-08-12  1:45 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-02  0:42 [Patch] don't kick ALB in the presence of pinned task Siddha, Suresh B
2005-08-02  6:09 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox