1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-27 08:00:11 +00:00
freebsd/sys/vm
Doug Moore 75694e650e swap_pager: speedup meta_transfer
Add a parameter to swp_pager_meta_build, for the benefit of
swp_pager_meta_transfer.

swp_pager_meta_transfer calls swp_pager_xfer_source, which may look up
the same trie entry twice - first, by calling sw_pager_meta_lookup,
and then as the first step in swp_pager_meta_build. A boolean
parameter to swp_pager_meta_build tells that function not to replace a
previously assigned swapblk with a new one, and setting it in this
call makes the first meta_lookup call unnecessary.

swp_pager_meta_transfer calls swp_pager_xfer_source, which may release
and reacquire the source object write lock, because the call to
swp_pager_meta_build may acquire and then release the destination
object write block. But it probably doesn't, so fiddling with the
source object write block was probably unnecessary. This boolean
parameter to swp_pager_meta_build tells it to return immediately if
memory allocation problems are about to require a lock
release/reacquisitiion, so that the caller can release/reacquire the
source object write lock only if truly necessary, around a second call
the swp_pager_meta_build with that boolean parameter not set. This
should make manipulation of the source object write lock rarer.

Reviewed by:	alc, kib (previous version)
Tested by:	pho
Differential Revision:	https://reviews.freebsd.org/D45781
2024-07-07 18:19:22 -05:00
..
_vm_phys.h Revert "subr_pctrie: use ilog2(x) instead of fls(x)-1" 2024-06-03 13:07:42 -05:00
_vm_radix.h
device_pager.c cdev_pager_allocate(): ensure that the cdev_pager_ops ctr is called only once 2024-05-12 04:13:00 +03:00
memguard.c
memguard.h
phys_pager.c
pmap.h pmap: move the smp_targeted_tlb_shutdown pointer stuff to amd64 pmap.h 2024-06-06 08:15:08 +03:00
redzone.c
redzone.h
sg_pager.c
swap_pager.c swap_pager: speedup meta_transfer 2024-07-07 18:19:22 -05:00
swap_pager.h
uma_align_mask.h
uma_core.c uma: Fix improper uses of UMA_MD_SMALL_ALLOC 2024-05-26 07:27:37 +02:00
uma_dbg.c
uma_dbg.h
uma_int.h
uma.h
vm_domainset.c
vm_domainset.h
vm_dumpset.h
vm_extern.h vm: Change the return types of kernacc and useracc to bool 2024-05-10 13:43:56 -07:00
vm_fault.c pmap: Skip some superpage promotion attempts that will fail 2024-06-04 00:38:05 -05:00
vm_glue.c vm: Change the return types of kernacc and useracc to bool 2024-05-10 13:43:56 -07:00
vm_init.c Adjust comments referencing vm_mem_init() 2024-05-27 18:37:40 -03:00
vm_kern.c
vm_kern.h vm: improve kstack_object pindex calculation to avoid pindex holes 2024-04-10 17:37:20 +02:00
vm_map.c vm: Reduce address space fragmentation 2024-06-13 15:13:45 -05:00
vm_map.h
vm_meter.c
vm_mmap.c
vm_object.c vm: Eliminate a redundant call to vm_reserv_break_all() 2024-06-05 12:39:47 -05:00
vm_object.h
vm_page.c spelling: specifiy -> specify 2024-06-22 00:49:40 -05:00
vm_page.h vm_page: Let vm_page_init_page() take a pool parameter 2024-06-13 21:18:59 -04:00
vm_pageout.c vm_pageout_scan_inactive: take a lock break 2024-05-24 08:52:58 -07:00
vm_pageout.h
vm_pagequeue.h vm_pageout_scan_inactive: take a lock break 2024-05-24 08:52:58 -07:00
vm_pager.c pbuf_ctor(): Stop using LK_NOWAIT, use LK_NOWITNESS 2024-05-26 10:20:52 -07:00
vm_pager.h
vm_param.h
vm_phys.c vm_phys: Make sure that vm_phys_enq_chunk() stays in bounds 2024-06-14 15:55:02 -04:00
vm_phys.h vm_page: Implement lazy page initialization 2024-06-13 21:19:00 -04:00
vm_radix.c uma: Deduplicate uma_small_alloc 2024-05-25 19:24:46 +02:00
vm_radix.h vm_radix: define vm_radix_insert_lookup_lt and use in vm_page_rename 2024-06-06 10:26:50 -07:00
vm_reserv.c Revert "subr_pctrie: use ilog2(x) instead of fls(x)-1" 2024-06-03 13:07:42 -05:00
vm_reserv.h vm_reserv: Add vm_reserv_is_populated 2024-04-07 12:28:52 -05:00
vm_swapout_dummy.c
vm_swapout.c vm: improve kstack_object pindex calculation to avoid pindex holes 2024-04-10 17:37:20 +02:00
vm_unix.c
vm.h pmap: Skip some superpage promotion attempts that will fail 2024-06-04 00:38:05 -05:00
vnode_pager.c Stop treating size 0 as unknown size in vnode_create_vobject(). 2024-05-23 06:08:14 +00:00
vnode_pager.h Add vnode_pager_clean_{a,}sync(9) 2024-01-11 18:44:53 +02:00