kernel - simplify vm pager ops, add pre-faulting for zero-fill pages.
* Remove the behind and ahead arguments to struct pagerops->pgo_getpages,
and pagerops->pgo_haspage.
Adjust pgo_getpages() to pgo_getpage(), change *_pager_getpages() to
*_pager_getpage(), etc. Add a sequential access flag to the call.
The VM system is no longer responsible for dealing with read-ahead on
pager ops. The individual pagers are now responsible.
The vnode pager now specifies the sequential access heuristic based on
the hint passed to it. HAMMER uses this hint to issue readaheads via
the buffer cache.
* Move, rename, and consolidate pmap_prefault(). Remove this function
from all platform sources and place it in vm/vm_fault.c. Add a
simple platform-specific pmap_prefault_ok() function to test particular
virtual addresses.
* The new prefault code is called vm_prefault(). Enhance the code to
also prefault and make writable (when it can) zero-fill pages.
The new zero-fill prefault feature improves buildworld times by
over 5% by greatly reducing the number of VM faults taken during
normal program operation. This particularly helps larger applications
and concurrent applications in SMP systems.
The code is conditionalized such that small applications (which do not
benefit much from prefaulting zero-fill) still run about as fast as
they did before.
* Fix an issue in vm_fault() where the vm_map was being unlocked before
the prefault code was called when it really needs to be unlocked
after the prefault code is called.
19 files changed: