freebsd-dev/sys/vm
Konstantin Belousov 6470c8d3db Rework v_object lifecycle for vnodes.
Current implementation of vnode_create_vobject() and
vnode_destroy_vobject() is written so that it prepared to handle the
vm object destruction for live vnode.  Practically, no filesystems use
this, except for some remnants that were present in UFS till today.
One of the consequences of that model is that each filesystem must
call vnode_destroy_vobject() in VOP_RECLAIM() or earlier, as result
all of them get rid of the v_object in reclaim.

Move the call to vnode_destroy_vobject() to vgonel() before
VOP_RECLAIM().  This makes v_object stable: either the object is NULL,
or it is valid vm object till the vnode reclamation.  Remove code from
vnode_create_vobject() to handle races with the parallel destruction.

Reviewed by:	markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D21412
2019-08-29 07:50:25 +00:00
..
_vm_radix.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
default_pager.c SPDX: wrong license. 2017-11-30 15:45:42 +00:00
device_pager.c Add a return value to vm_page_remove(). 2019-06-26 17:37:51 +00:00
memguard.c Add a vm_page_wired() predicate. 2019-06-02 01:00:17 +00:00
memguard.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
phys_pager.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
pmap.h correct pmap_ts_referenced return type 2019-07-03 19:59:56 +00:00
redzone.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
redzone.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
sg_pager.c Change the vm_ooffset_t type to unsigned. 2018-12-02 13:16:46 +00:00
swap_pager.c Use an atomic reference count for paging in progress so that callers do not 2019-08-19 23:09:38 +00:00
swap_pager.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
uma_core.c Handle UMA_ANYDOMAIN in kstack_import(). 2019-08-25 21:14:46 +00:00
uma_dbg.c Fix compilation failures on different arches that have vm_machdep.c not 2019-01-15 19:33:47 +00:00
uma_dbg.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
uma_int.h Add two new kernel options to control memory locality on NUMA hardware. 2019-08-06 21:50:34 +00:00
uma.h Handle UMA_ANYDOMAIN in kstack_import(). 2019-08-25 21:14:46 +00:00
vm_domainset.c Add a !NUMA definition for vm_domainset_iter_policy_ref_init(). 2018-10-24 17:09:20 +00:00
vm_domainset.h Refactor domainset iterators for use by malloc(9) and UMA. 2018-10-23 16:35:58 +00:00
vm_extern.h Add malloc_domainset(9) and _domainset variants to other allocator KPIs. 2018-10-30 18:26:34 +00:00
vm_fault.c Fix OOM handling of some corner cases. 2019-08-16 09:43:49 +00:00
vm_glue.c Wire pages in vm_page_grab() when appropriate. 2019-08-28 16:08:06 +00:00
vm_init.c Do not reserve KVA for paging bufs in vm_ksubmap_init(), since now 2019-01-16 20:14:16 +00:00
vm_kern.c Unconditionally enable debug.vm_lowmem. 2019-08-21 16:01:17 +00:00
vm_kern.h Do not reserve KVA for paging bufs in vm_ksubmap_init(), since now 2019-01-16 20:14:16 +00:00
vm_map.c vm_map_simplify_entry considers merging an entry with its two 2019-08-25 07:06:51 +00:00
vm_map.h vm_map_simplify_entry considers merging an entry with its two 2019-08-25 07:06:51 +00:00
vm_meter.c Provide separate accounting for user-wired pages. 2019-05-13 16:38:48 +00:00
vm_mmap.c Control implicit PROT_MAX() using procctl(2) and the FreeBSD note 2019-07-02 19:07:17 +00:00
vm_object.c vm: only lock tmpfs vnode shared in vm_object_deallocate 2019-08-28 19:28:27 +00:00
vm_object.h Rework v_object lifecycle for vnodes. 2019-08-29 07:50:25 +00:00
vm_page.c Fix a few nits in vm_pqbatch_process_page(). 2019-08-26 20:20:10 +00:00
vm_page.h Make vm_pqbatch_submit_page() externally visible. 2019-08-23 19:49:29 +00:00
vm_pageout.c Fix OOM handling of some corner cases. 2019-08-16 09:43:49 +00:00
vm_pageout.h Fix OOM handling of some corner cases. 2019-08-16 09:43:49 +00:00
vm_pagequeue.h Simplify vm_page_dequeue() and fix an assertion. 2019-08-21 16:11:12 +00:00
vm_pager.c Do not reserve KVA for paging bufs in vm_ksubmap_init(), since now 2019-01-16 20:14:16 +00:00
vm_pager.h Permit vm_pager_has_page() to run with a shared lock. Introduce 2019-08-19 22:25:28 +00:00
vm_param.h Move phys_avail definition into MI code. It is consumed in the MI layer and 2019-08-16 00:45:14 +00:00
vm_phys.c Remove unnecessary debugging from r351181 that caused powerpc build to fail. 2019-08-18 08:07:31 +00:00
vm_phys.h Encapsulate phys_avail manipulation in a set of simple routines. Add a 2019-08-18 07:06:31 +00:00
vm_radix.c vm: stop passing M_ZERO when allocating radix nodes 2018-06-24 13:08:05 +00:00
vm_radix.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
vm_reserv.c Allocate amd64's page array using pages and page directory pages from the 2019-08-18 23:07:56 +00:00
vm_reserv.h Allocate amd64's page array using pages and page directory pages from the 2019-08-18 23:07:56 +00:00
vm_swapout_dummy.c SPDX: Consider code from Carnegie-Mellon University. 2017-11-30 15:48:35 +00:00
vm_swapout.c Make vm_pqbatch_submit_page() externally visible. 2019-08-23 19:49:29 +00:00
vm_unix.c Provide separate accounting for user-wired pages. 2019-05-13 16:38:48 +00:00
vm.h Move vm_ndomains to vm.h where it can be used with a single header include 2018-03-27 03:27:02 +00:00
vnode_pager.c Rework v_object lifecycle for vnodes. 2019-08-29 07:50:25 +00:00
vnode_pager.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00