Reduce allocations and possible failures in uvm_pagermapin/out().
authormpi <mpi@openbsd.org>
Thu, 30 Jun 2022 20:28:42 +0000 (20:28 +0000)
committermpi <mpi@openbsd.org>
Thu, 30 Jun 2022 20:28:42 +0000 (20:28 +0000)
commit14f5534dc07ca6bbe14b903910cee2dc2614e8de
tree86335a991a57e80188ec8b26d03eee5786cc6578
parent16ddeba761e80d2d65008b6173d765968913c7c1
Reduce allocations and possible failures in uvm_pagermapin/out().

. If a direct map exists use it to map single-page allocations
. Use pmap_kenter_pa() instead of pmap_enter() in all other cases.

This speeds up file-based mmap up to 75% when I/O are performed and it
also reduces possible allocations failtures in the page daemon making
it more stable in OOM situations.

ok kettenis@, beck@
sys/uvm/uvm_pager.c