]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
vfs: manage mnt_ref with atomics
authormjg <mjg@FreeBSD.org>
Mon, 16 Sep 2019 21:31:02 +0000 (21:31 +0000)
committermjg <mjg@FreeBSD.org>
Mon, 16 Sep 2019 21:31:02 +0000 (21:31 +0000)
commitbec2ffc72ab27f17354881026adfb47440a2d5c5
tree7539b6a9846e42ce0748a4b2b802d04cc936aa52
parentb221bed0fa08c91dc7c3bc348983fa139fa36afa
vfs: manage mnt_ref with atomics

New primitive is introduced to denote sections can operate locklessly
on aspects of struct mount, but which can also be disabled if necessary.
This provides an opportunity to start scaling common case modifications
while providing stable state of the struct when facing unmount, write
suspendion or other events.

mnt_ref is the first counter to start being managed in this manner with
the intent to make it per-cpu.

Reviewed by: kib, jeff
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D21425
sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c
sys/kern/subr_pcpu.c
sys/kern/vfs_default.c
sys/kern/vfs_mount.c
sys/kern/vfs_mountroot.c
sys/kern/vfs_subr.c
sys/sys/mount.h
sys/vm/uma.h