kernel - Fix pageout / sbusy race
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 8 Apr 2018 01:03:23 +0000 (18:03 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 8 Apr 2018 01:03:23 +0000 (18:03 -0700)
commit793bf44fb8ccf3087cd7a1f304257b8b560d3dc6
treedd1d934d511d1e297617478441f5a3a03ae287d1
parentc309c6d4b7544672e5babaa14ab7290f4a777e79
kernel - Fix pageout / sbusy race

* For now, vm_page_sbusy_try() cannot safely increment m->busy_count,
  and then decrement it if it turns out to be busy.  This interferes
  with any other thread that is holding the page hard-busy and expects
  the soft-busy mask to remain 0.

* Eventually we should be able to rework the fetchadd optimization back
  in.  Use atomic_cmpset_*() for now though.
sys/vm/vm_page.c