]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r212115:
authormdf <mdf@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 15 Sep 2010 15:53:05 +0000 (15:53 +0000)
committermdf <mdf@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 15 Sep 2010 15:53:05 +0000 (15:53 +0000)
commit1dada07c09ab31e456a902cd2f6f80db7943fdb2
tree7b25201e960ec7599f3c690d9236fadb31c0f24e
parent8b14afa490d78b6488ff8a65590296eff3d02a6e
MFC r212115:

Fix a bug with sched_affinity() where it checks td_pinned of another
thread in a racy manner, which can lead to attempting to migrate a
thread that is pinned to a CPU.  Instead, have sched_switch() determine
which CPU a thread should run on if the current one is not allowed.

KASSERT in sched_bind() that the thread is not yet pinned to a CPU.

KASSERT in sched_switch() that only migratable threads or those moving
due to a sched_bind() are changing CPUs.

Note that this is direct commit as ipi_cpu() only exists in CURRENT.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212666 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/kern/sched_ule.c