mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-20 00:33:57 +00:00
c90d075be4
swap_pager_swapoff_object()'s goal is to allocate pages for all valid swap blocks belonging to the object, for which there is no resident page. If the page corresponding to a block is already resident and valid, the block can simply be discarded. The existing implementation tries to minimize the number of I/Os used. For each cluster of swap blocks, it finds maximal runs of valid swap blocks not resident in memory, and valid resident pages. During this processing, the object lock may be dropped in several places: when calling getpages, or when blocking on a busy page in vm_page_grab_pages(). While the lock is dropped, another thread may free swap blocks, causing getpages to page in stale data. Fix the problem following a suggestion from Jeff: use getpages' readahead capability to perform clustering rather than doing it ourselves. The simplies the code a bit without reintroducing the old behaviour of performing one I/O per page. Reviewed by: jeff Reported by: dhw, gallatin Tested by: pho MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23664 |
||
---|---|---|
.. | ||
_vm_radix.h | ||
default_pager.c | ||
device_pager.c | ||
memguard.c | ||
memguard.h | ||
phys_pager.c | ||
pmap.h | ||
redzone.c | ||
redzone.h | ||
sg_pager.c | ||
swap_pager.c | ||
swap_pager.h | ||
uma.h | ||
uma_core.c | ||
uma_dbg.c | ||
uma_dbg.h | ||
uma_int.h | ||
vm.h | ||
vm_domainset.c | ||
vm_domainset.h | ||
vm_extern.h | ||
vm_fault.c | ||
vm_glue.c | ||
vm_init.c | ||
vm_kern.c | ||
vm_kern.h | ||
vm_map.c | ||
vm_map.h | ||
vm_meter.c | ||
vm_mmap.c | ||
vm_object.c | ||
vm_object.h | ||
vm_page.c | ||
vm_page.h | ||
vm_pageout.c | ||
vm_pageout.h | ||
vm_pagequeue.h | ||
vm_pager.c | ||
vm_pager.h | ||
vm_param.h | ||
vm_phys.c | ||
vm_phys.h | ||
vm_radix.c | ||
vm_radix.h | ||
vm_reserv.c | ||
vm_reserv.h | ||
vm_swapout.c | ||
vm_swapout_dummy.c | ||
vm_unix.c | ||
vnode_pager.c | ||
vnode_pager.h |