[PATCH git-sched 1/3] no need for 'affine wakeup' balancing in select_task_rq_fair() when task_cpu(p) == this_cpu

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ingo Molnar <mingo@...>
Cc: Steven Rostedt <srostedt@...>, Gregory Haskins <ghaskins@...>, LKML Kernel <linux-kernel@...>
Date: Sunday, December 9, 2007 - 2:36 pm

From: Dmitry Adamushko <dmitry.adamushko@gmail.com>

No need to do a check for 'affine wakeup and passive balancing possibilities' in
select_task_rq_fair() when task_cpu(p) == this_cpu.

I guess, this part got missed upon introduction of per-sched_class select_task_rq()
in try_to_wake_up().

Signed-off-by: Dmitry Adamushko <dmitry.adamushko@gmail.com>

---

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index f881fc5..2208692 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -925,6 +925,9 @@ static int select_task_rq_fair(struct task_struct *p, int sync)
 	this_cpu = smp_processor_id();
 	new_cpu  = cpu;
 
+	if (cpu == this_cpu)
+		goto out_set_cpu;
+
 	for_each_domain(this_cpu, sd) {
 		if (cpu_isset(cpu, sd->span)) {
 			this_sd = sd;


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH git-sched 1/3] no need for 'affine wakeup' balancing ..., Dmitry Adamushko, (Sun Dec 9, 2:36 pm)