This further optimizes the 'kick wakeup' scheduler feature:
- do not kick any CPU on UP
- no need to mark the target task for reschedule - it's enough to send an
interrupt to that CPU, that will initiate a signal processing pass.
resched_task(rq->curr);
}
success = 1;
- } else
- if (unlikely(kick) && task_running(rq, p))
- resched_task(rq->curr);
+ }
+#if CONFIG_SMP
+ else
+ if (unlikely(kick) && task_running(rq, p) && (p->thread_info->cpu != smp_processor_id()))
+ smp_send_reschedule(p->thread_info->cpu);
+#endif
p->state = TASK_RUNNING;
}
task_rq_unlock(rq, &flags);