kernel - Optimize vm_page_wakeup(), vm_page_hold(), vm_page_unhold()
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 23 Mar 2019 21:11:42 +0000 (14:11 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 27 Mar 2019 03:32:47 +0000 (20:32 -0700)
commit16b1cc2d7d7a49c5814426aec69bdb2191cd8d20
treedb973777273deab4996ee48f76311d4b6eaa7858
parent70f3bb08d2f3591da58cfd610bc1fd7ba862256f
kernel - Optimize vm_page_wakeup(), vm_page_hold(), vm_page_unhold()

* vm_page_wakeup() does not need to acquire the vm_page spin-lock.
  The caller holding the page busied is sufficient.

* vm_page_hold() does not need to acquire the vm_page spin-lock as
  the caller is expected to hold the page busied, soft-busied,
  or stabilized via an interlock (such as the vm_object interlock).

* vm_page_unhold() only needs to acquire the vm_page spin-lock on
  the 1->0 transition of m->hold_count.
sys/vm/vm_page.c
sys/vm/vm_pageout.c