We should only call need_resched() if the priority is lower than the priority of the current running process.
We should only call need_resched() if the priority is lower than the
priority of the current running process.

In amd64 a call to need_resched() sends an IPI to the other cpu.

This fixes aja@ problem where he would move the mouse and see 60000
IPIs being sent.

Thanks to mikeb@ for bringing that subject up tuesday.
Actually found this after inquiring guenther@ about some changes in
mi_switch().

ok guenther@ aja@

orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars