Both vnode_pager_input_smlfs() and vnode_pager_generic_getpages() increment runningbufspace, but also both delegate io completion handling on the pbuf to either plain bdone() or filesystem-specific strategy routine. Accidentally, for e.g. UFS it is g_vfs_strategy()/g_vfs_done(). The later calls bufdone() which handles runningbufspace reclamation. For plain bdone() io done handler, nothing would return accounted b_runningbufspace back. Do it in the new helper vnode_pager_input_bdone(), as well as in vnode_pager_generic_getpages_done() explicitly. Note that potential multiple calls to runningbufwakeup() for the same pbuf or buf completion are safe. runningbufwakeup() clears accounting for the buffer, so second and later calls are nop. The problem was found due to tarfs using small vnode pager input but not g_vfs_strategy(). Reported by: des Reviewed by: markj, sjg Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D39263 |
||
---|---|---|
.. | ||
_vm_phys.h | ||
_vm_radix.h | ||
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_core.c | ||
uma_dbg.c | ||
uma_dbg.h | ||
uma_int.h | ||
uma.h | ||
vm_domainset.c | ||
vm_domainset.h | ||
vm_dumpset.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_dummy.c | ||
vm_swapout.c | ||
vm_unix.c | ||
vm.h | ||
vnode_pager.c | ||
vnode_pager.h |