kernel - Preliminary vm_page hash lookup (2), cleanups, page wiring
commite05899ceef0e1a34c88b6d12dd59538f627df6d4
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 23 Mar 2019 22:29:14 +0000 (23 15:29 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 27 Mar 2019 03:32:47 +0000 (26 20:32 -0700)
treeba8fa06292a6e7296c2a7119ad54a686a544dea7
parent16b1cc2d7d7a49c5814426aec69bdb2191cd8d20
kernel - Preliminary vm_page hash lookup (2), cleanups, page wiring

* Correct a bug in vm.fault_quick operation.  Soft-busied pages cannot
  be safely wired or unwired.  This fixes a wire/unwire race related panic.

* Optimize vm_page_unhold() to normally not have to obtain any spin-locks
  at all, since related pages are almost never in the PQ_HOLD VM page
  queue.  This leaves open a minor race condition where pages with
  a hold_count of 0 can accumulate in PQ_HOLD.

* Add vm_page_scan_hold() to the pageout daemon.  Unconditionally scan
  PQ_HOLD very slowly to remove any pages whos hold_count is 0.

* REFACTOR PAGE WIRING.  Wiring vm_page's no longer removes them from
  whatever paging queue they are on.  Instead, proactively remove
  such pages from the queue only when we need to (typically in the
  pageout code).

* Remove unused PV_FLAG_VMOBJECT.

* Fix missing atomic-op in pc64/x86_64/efirt.c

* Do not use m->md.pv_list for pagetable pages.  It is now only used for
  terminal pages.

* Properly initialize pv_flags to 0 when a pv_entry is allocated.

* Add debugging to detect managed pmap_enter()s without an object.

* Conditionalize the setting of PG_MAPPED and PG_WRITEABLE in the
  pmap code to avoid unnecessary cpu cache mastership changes.

* Move assertions in vm_pageout.c that could trigger improperly due
  to a race.
sys/platform/pc64/include/pmap.h
sys/platform/pc64/x86_64/efirt.c
sys/platform/pc64/x86_64/pmap.c
sys/vm/vm_fault.c
sys/vm/vm_page.c
sys/vm/vm_page.h
sys/vm/vm_pageout.c