]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Merge the vm_page hold and wire mechanisms.
authormarkj <markj@FreeBSD.org>
Mon, 8 Jul 2019 19:46:20 +0000 (19:46 +0000)
committermarkj <markj@FreeBSD.org>
Mon, 8 Jul 2019 19:46:20 +0000 (19:46 +0000)
commit039f74039e57a5d79cda830161af71a1e9c4050e
treee482e7f7b0ba782bac82424cbd9c7fb5b41fc9f6
parent85531b7acc50470c6bea9642fa783d0916284e23
Merge the vm_page hold and wire mechanisms.

The hold_count and wire_count fields of struct vm_page are separate
reference counters with similar semantics.  The remaining essential
differences are that holds are not counted as a reference with respect
to LRU, and holds have an implicit free-on-last unhold semantic whereas
vm_page_unwire() callers must explicitly determine whether to free the
page once the last reference to the page is released.

This change removes the KPIs which directly manipulate hold_count.
Functions such as vm_fault_quick_hold_pages() now return wired pages
instead.  Since r328977 the overhead of maintaining LRU for wired pages
is lower, and in many cases vm_fault_quick_hold_pages() callers would
swap holds for wirings on the returned pages anyway, so with this change
we remove a number of page lock acquisitions.

No functional change is intended.  __FreeBSD_version is bumped.

Reviewed by: alc, kib
Discussed with: jeff
Discussed with: jhb, np (cxgbe)
Tested by: pho (previous version)
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D19247
32 files changed:
share/man/man9/Makefile
share/man/man9/vm_page_hold.9 [deleted file]
sys/amd64/amd64/pmap.c
sys/amd64/vmm/vmm.c
sys/arm/arm/pmap-v4.c
sys/arm/arm/pmap-v6.c
sys/arm64/arm64/pmap.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
sys/compat/linuxkpi/common/src/linux_page.c
sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c
sys/dev/cxgbe/tom/t4_cpl_io.c
sys/dev/cxgbe/tom/t4_ddp.c
sys/dev/cxgbe/tom/t4_tom.h
sys/i386/i386/pmap.c
sys/kern/kern_exec.c
sys/kern/sys_process.c
sys/kern/uipc_shm.c
sys/mips/mips/pmap.c
sys/net/bpf_zerocopy.c
sys/powerpc/aim/mmu_oea.c
sys/powerpc/aim/mmu_oea64.c
sys/powerpc/booke/pmap.c
sys/riscv/riscv/pmap.c
sys/sparc64/sparc64/pmap.c
sys/sys/param.h
sys/vm/vm_fault.c
sys/vm/vm_glue.c
sys/vm/vm_object.c
sys/vm/vm_page.c
sys/vm/vm_page.h
sys/vm/vm_pageout.c
sys/vm/vm_swapout.c