[PATCH] sched: smpnice try to wakeup modification

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>

--- 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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux