kernel - refactor vm_page busy
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 18 Oct 2017 06:25:24 +0000 (23:25 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 18 Oct 2017 06:25:24 +0000 (23:25 -0700)
commitbc0aa189232f6ec6bb245aef2b91ed26a1a72459
treef0d49e85deadd971538b820048ffbe0eda05d7b8
parentd07f5241eb2c4ceea221840fae247bb2e2a47f5e
kernel - refactor vm_page busy

* Move PG_BUSY, PG_WANTED, PG_SBUSY, and PG_SWAPINPROG out of m->flags.

* Add m->busy_count with PBUSY_LOCKED, PBUSY_WANTED, PBUSY_SWAPINPROG,
  and PBUSY_MASK (for the soft-busy count).

* Add support for acquiring a soft-busy count without a hard-busy.
  This requires that there not already be a hard-busy.  The purpose
  of this is to allow a vm_page to be 'locked' in a shared manner
  via the soft-busy for situations where we only intend to read from
  it.
18 files changed:
sys/dev/drm/drm_vm.c
sys/dev/drm/i915/i915_gem.c
sys/dev/drm/ttm/ttm_bo_vm.c
sys/kern/vfs_bio.c
sys/kern/vfs_cluster.c
sys/vm/device_pager.c
sys/vm/swap_pager.c
sys/vm/vm_contig.c
sys/vm/vm_fault.c
sys/vm/vm_map.c
sys/vm/vm_mmap.c
sys/vm/vm_page.c
sys/vm/vm_page.h
sys/vm/vm_page2.h
sys/vm/vm_pageout.c
sys/vm/vm_swap.c
sys/vm/vm_swapcache.c
sys/vm/vnode_pager.c