diff options
author | Mateusz Guzik <mjg@FreeBSD.org> | 2021-04-08 07:08:41 +0000 |
---|---|---|
committer | Mateusz Guzik <mjg@FreeBSD.org> | 2021-04-08 11:14:45 +0000 |
commit | 72b3b5a941927f7a79611131f144eeb2dc9143c9 (patch) | |
tree | 8bd390ee58b3514203b9e2f48f897a8ab87168b5 | |
parent | 4d9488674f3a36a2d12d11cad170cb1bd1c14a6d (diff) | |
download | src-72b3b5a941927f7a79611131f144eeb2dc9143c9.tar.gz src-72b3b5a941927f7a79611131f144eeb2dc9143c9.zip |
vfs: replace vfs_smr_quiesce with vfs_smr_synchronize
This ends up using a smr specific method.
Suggested by: markj
Tested by: pho
-rw-r--r-- | sys/kern/vfs_cache.c | 12 | ||||
-rw-r--r-- | sys/sys/vnode.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index c4b6fdd468db..8819ef483af5 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -2683,7 +2683,7 @@ cache_vnode_init(struct vnode *vp) * * This will force a fs lookup. * - * Synchronisation is done in 2 steps, calling vfs_smr_quiesce each time + * Synchronisation is done in 2 steps, calling vfs_smr_synchronize each time * to observe all CPUs not performing the lookup. */ static void @@ -2699,14 +2699,14 @@ cache_changesize_set_temp(struct nchashhead *temptbl, u_long temphash) */ atomic_store_long(&nchash, temphash); atomic_thread_fence_rel(); - vfs_smr_quiesce(); + vfs_smr_synchronize(); /* * At this point everyone sees the updated hash value, but they still * see the old table. */ atomic_store_ptr(&nchashtbl, temptbl); atomic_thread_fence_rel(); - vfs_smr_quiesce(); + vfs_smr_synchronize(); /* * At this point everyone sees the updated table pointer and size pair. */ @@ -2729,14 +2729,14 @@ cache_changesize_set_new(struct nchashhead *new_tbl, u_long new_hash) */ atomic_store_ptr(&nchashtbl, new_tbl); atomic_thread_fence_rel(); - vfs_smr_quiesce(); + vfs_smr_synchronize(); /* * At this point everyone sees the updated pointer value, but they * still see the old size. */ atomic_store_long(&nchash, new_hash); atomic_thread_fence_rel(); - vfs_smr_quiesce(); + vfs_smr_synchronize(); /* * At this point everyone sees the updated table pointer and size pair. */ @@ -3881,7 +3881,7 @@ cache_fplookup_lockout(void) if (on) { atomic_store_char(&cache_fast_lookup_enabled, false); atomic_thread_fence_rel(); - vfs_smr_quiesce(); + vfs_smr_synchronize(); } } diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 3bb6936a27b2..f45824e3dc89 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -1112,7 +1112,7 @@ int vn_dir_check_exec(struct vnode *vp, struct componentname *cnp); #define VFS_SMR() vfs_smr #define vfs_smr_enter() smr_enter(VFS_SMR()) #define vfs_smr_exit() smr_exit(VFS_SMR()) -#define vfs_smr_quiesce() quiesce_all_critical() +#define vfs_smr_synchronize() smr_synchronize(VFS_SMR()) #define vfs_smr_entered_load(ptr) smr_entered_load((ptr), VFS_SMR()) #define VFS_SMR_ASSERT_ENTERED() SMR_ASSERT_ENTERED(VFS_SMR()) #define VFS_SMR_ASSERT_NOT_ENTERED() SMR_ASSERT_NOT_ENTERED(VFS_SMR()) |