Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Apr 2021 06:02:14 GMT
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: e9fc871b0dec - stable/13 - vfs: replace vfs_smr_quiesce with vfs_smr_synchronize
Message-ID:  <202104100602.13A62Ef3015352@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by mjg:

URL: https://cgit.FreeBSD.org/src/commit/?id=e9fc871b0dec47b943dd2d09688aa9fe867bfc9b

commit e9fc871b0dec47b943dd2d09688aa9fe867bfc9b
Author:     Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2021-04-08 07:08:41 +0000
Commit:     Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2021-04-10 05:57:56 +0000

    vfs: replace vfs_smr_quiesce with vfs_smr_synchronize
    
    This ends up using a smr specific method.
    
    Suggested by:   markj
    Tested by:      pho
    
    (cherry picked from commit 72b3b5a941927f7a79611131f144eeb2dc9143c9)
---
 sys/kern/vfs_cache.c | 12 ++++++------
 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 ddeb87e269d7..b5fa21eea887 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -2678,7 +2678,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
@@ -2694,14 +2694,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.
 	 */
@@ -2724,14 +2724,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.
 	 */
@@ -3876,7 +3876,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 e37302aeb379..d26c8aa70d8e 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -1109,7 +1109,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())



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202104100602.13A62Ef3015352>