linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sched: smpnice try to wakeup modification
@ 2006-03-29  2:49 Tim Chen
  2006-03-29 22:49 ` Peter Williams
  0 siblings, 1 reply; 3+ messages in thread
From: Tim Chen @ 2006-03-29  2:49 UTC (permalink / raw)
  To: pwil3058; +Cc: linux-kernel

Peter,

If there is no load on this_cpu, (i.e. tl_per_task is 0), we will fail the  
"tl + target_load(cpu, idx) <= tl_per_task" check.  I think the original intention was
to put task on this_cpu if it has no load and when there's already one task on 
cpu. This helps spread tasks out for low load condition.

Thanks.

Tim

Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>

--- linux-2.6.16-mm2-a/kernel/sched.c	2006-03-28 16:00:37.091779904 -0800
+++ linux-2.6.16-mm2-b/kernel/sched.c	2006-03-28 16:09:08.237074008 -0800
@@ -1393,7 +1393,7 @@ static int try_to_wake_up(task_t *p, uns
 
 		if (this_sd->flags & SD_WAKE_AFFINE) {
 			unsigned long tl = this_load;
-			unsigned long tl_per_task = cpu_avg_load_per_task(this_cpu);
+			unsigned long sl_per_task = cpu_avg_load_per_task(cpu);
 
 			/*
 			 * If sync wakeup then subtract the (maximum possible)
@@ -1404,7 +1404,7 @@ static int try_to_wake_up(task_t *p, uns
 				tl -= current->load_weight;
 
 			if ((tl <= load &&
-				tl + target_load(cpu, idx) <= tl_per_task) ||
+				tl + target_load(cpu, idx) <= sl_per_task) ||
 				100*(tl + p->load_weight) <= imbalance*load) {
 				/*
 				 * This domain has SD_WAKE_AFFINE and


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

end of thread, other threads:[~2006-03-29 23:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-29  2:49 [PATCH] sched: smpnice try to wakeup modification Tim Chen
2006-03-29 22:49 ` Peter Williams
2006-03-29 23:13   ` Tim Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).