sched: no need for 'affine wakeup' balancing
authorDmitry Adamushko <dmitry.adamushko@gmail.com>
Fri, 25 Jan 2008 20:08:21 +0000 (21:08 +0100)
committerIngo Molnar <mingo@elte.hu>
Fri, 25 Jan 2008 20:08:21 +0000 (21:08 +0100)
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>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched_fair.c

index f881fc5e035cd810f911337056c5b7879f1658af..2208692dc4a004714d02f27a6579e74fa71d52ef 100644 (file)
@@ -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;