git: kernel - VM rework part 13 - Core pmap work, stabilize & optimize
dillon at crater.dragonflybsd.org
Tue May 21 10:26:27 PDT 2019
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Sun May 19 12:59:49 2019 -0700
kernel - VM rework part 13 - Core pmap work, stabilize & optimize
* Refactor the vm_page_hash hash again to get a better distribution.
* I tried to only hash shared objects but this resulted in a number of
edge cases where program re-use could miss the optimization.
* Add a sysctl vm.page_hash_vnode_only (default off). If turned on,
only vm_page's associated with vnodes will be hashed. This should
generally not be necessary.
* Refactor vm_page_list_find2() again to avoid all duplicate queue
checks. This time I mocked the algorithm up in userland and twisted
it until it did what I wanted.
* VM_FAULT_QUICK_DEBUG was accidently left on, turn it off.
* Do not remove the original page from the pmap when vm_fault_object()
must do a COW. And just in case this is ever added back in later,
don't do it using pmap_remove_specific() !!! Use pmap_remove_pages()
to avoid the backing scan lock.
vm_fault_page() will now do this removal (for procfs rwmem), the normal
vm_fault will of course replace the page anyway, and the umtx code
uses different recovery mechanisms now and should be ok.
* Optimize vm_map_entry_shadow() for the situation where the old
object is no longer shared. Get rid of an unnecessary transient
kmalloc() and vm_object_hold_shared().
Summary of changes:
sys/vm/vm_fault.c | 49 +++++++-----------
sys/vm/vm_map.c | 9 ++--
sys/vm/vm_page.c | 129 ++++++++++++++++++++++++++++++++++--------------
test/debug/vmpageinfo.c | 2 +-
4 files changed, 116 insertions(+), 73 deletions(-)
DragonFly BSD source repository
More information about the Commits