* In the need_user_resched_remote we need to use wakeup_mycpu to avoid
sending out IPIs triggering a deep IPI recursion panic.
* In the setrunqueue case use wakeup_mycpu as an optimization, since we
know that we are on the same CPU as the helper thread we want to wake
up.
In-discussion-with: Matt Dillon
Reported-by: ftigeot
spin_unlock(&bsd4_spin);
if ((dd->upri & ~PPQMASK) > (lp->lwp_priority & ~PPQMASK)) {
if (dd->uschedcp == NULL) {
- wakeup(&dd->helper_thread);
+ wakeup_mycpu(&dd->helper_thread);
} else {
need_user_resched();
}
bsd4_pcpu_t dd = &bsd4_pcpu[gd->gd_cpuid];
need_user_resched();
- wakeup(&dd->helper_thread);
+
+ /* Call wakeup_mycpu to avoid sending IPIs to other CPUs */
+ wakeup_mycpu(&dd->helper_thread);
}
#endif