kernel - Fix vm_object token deadlock
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 20 Nov 2011 17:47:47 +0000 (09:47 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 20 Nov 2011 17:47:47 +0000 (09:47 -0800)
commitbdea739c3640a6c0dad2c22379358730d1c512c9
tree4944d4c8b40490976ca9b74d82cbe10e3ab76470
parentddfc7d9104aad56b6e48069cca77141f3f3dac7f
kernel - Fix vm_object token deadlock

* vm_page_alloc() needs an exclusive vm_object token when recycling
  random cache pages into the free queue.  Because these are effectively
  random pages it is possible for this exclusive token to interfere
  with a shared token already held by the thread.

* Make sure we can actually get the token.  If we cannot we deactivate
  the page instead.
sys/vm/vm_page.c