If we're stopping a secondary cpu, don't let sched_choosecpu() short-circuit
authorkettenis <kettenis@openbsd.org>
Sat, 26 Jul 2014 16:07:39 +0000 (16:07 +0000)
committerkettenis <kettenis@openbsd.org>
Sat, 26 Jul 2014 16:07:39 +0000 (16:07 +0000)
commit93a6d3839794d512216714b0772d7a3e14c9d9b4
tree9463c7e6763e46f84be6099bbd27ca56926cc48d
parent55a0d4fbe54fd5b415a30b93f423863e88bda3cb
If we're stopping a secondary cpu, don't let sched_choosecpu() short-circuit
and return the current current CPU, otherwise sched_stop_secondary_cpus()
will spin forever trying to empty its run queues.  Fixes hangs during suspend
that many people reported over the last couple of days.

ok bcook@, guenther@
sys/kern/kern_sched.c