kernel - Fix MP races in recent vm_object work
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 10 Jun 2011 07:32:22 +0000 (00:32 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 10 Jun 2011 07:32:22 +0000 (00:32 -0700)
commit212f39f54bb99e0b059f26faa762e7ff99a6bebf
treea892023a22d8c74618f6280aab9240aa46b8ad34
parent3d39a00b0c506b7226994b29a0a0a5c093b02d9e
kernel - Fix MP races in recent vm_object work

* lwkt_token_swap() needs a critical section to ensure that an interrupt
  does not catch it mid-swap.

* Adjust vm_object_terminate() and vm_object_vnterminate() mechanics to
  require that the object be locked and to eat the lock.

* Use vm_object_hold/drop in vm_map_copy_entry() (object must be locked
  upon call to vm_object_collapse()).

* Acquire object locks in various places and swap the token order as
  needed to chain locks in various loops.

* Shift some code around in vm_object.c
sys/kern/lwkt_token.c
sys/kern/vfs_subr.c
sys/vm/vm_map.c
sys/vm/vm_object.c