]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
vmspace: Convert to refcount(9)
authormarkj <markj@FreeBSD.org>
Wed, 4 Nov 2020 16:30:56 +0000 (16:30 +0000)
committermarkj <markj@FreeBSD.org>
Wed, 4 Nov 2020 16:30:56 +0000 (16:30 +0000)
commit25fc94b8d9d1e8762536543f35fcba461053114b
tree1c7f51e9c681dd9fb848fddfd59209fbb179cbc3
parent9df82a28512af35925c0d5dcb0f975f086da09df
vmspace: Convert to refcount(9)

This is mostly mechanical except for vmspace_exit().  There, use the new
refcount_release_if_last() to avoid switching to vmspace0 unless other
processes are sharing the vmspace.  In that case, upon switching to
vmspace0 we can unconditionally release the reference.

Remove the volatile qualifier from vm_refcnt now that accesses are
protected using refcount(9) KPIs.

Reviewed by: alc, kib, mmel
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D27057
sys/dev/cxgbe/tom/t4_ddp.c
sys/kern/init_main.c
sys/kern/kern_exec.c
sys/kern/vfs_aio.c
sys/vm/vm_glue.c
sys/vm/vm_map.c
sys/vm/vm_map.h