kernel - VM rework part 11 - Core pmap work to remove terminal PVs
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 18 May 2019 06:18:11 +0000 (23:18 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 20 May 2019 19:39:25 +0000 (12:39 -0700)
commit567a6398ff240e51859411e86413d3fa7ac9b2fe
treee093c292f2f904e5044ba5e84f1c0db90d5011ea
parentae442b2e7307f6cfa20b0e4664eaa9ea2c554f69
kernel - VM rework part 11 - Core pmap work to remove terminal PVs

* Remove pv_entry_t belonging to terminal PTEs.  The pv_entry's for
  PT, PD, PDP, and PML4 remain.  This reduces kernel memory use for
  pv_entry's by 99%.

  The pmap code now iterates vm_object->backing_list (of vm_map_backing
  structures) to run-down pages for various operations.

* Remove vm_page->pv_list.  This was one of the biggest sources of
  contention for shared faults.  However, in this first attempt I
  am leaving all sorts of ref-counting intact so the contention has
  not been entirely removed yet.

* Current hacks:

  - Dynamic page table page removal currently disabled because the
    vm_map_backing scan needs to be able to deterministically
    run-down PTE pointers.  Removal only occurs at program exit.

  - PG_DEVICE_IDX probably isn't being handled properly yet.

  - Shared page faults not yet optimized.

* So far minor improvements in performance across the board.
  This is realtively unoptimized.  The buildkernel test improves
  by 2% and the zero-fill fault test improves by around 10%.

  Kernel memory use is improved (reduced) enormously.
sys/platform/pc64/include/pmap.h
sys/platform/pc64/x86_64/pmap.c
sys/vm/vm_fault.c
sys/vm/vm_map.c
sys/vm/vm_object.c
sys/vm/vm_object.h