Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Mar 2022 19:56:48 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: f85d71e72e1f - stable/13 - cache: retire cache_fast_revlookup sysctl
Message-ID:  <202203051956.225JumIR018083@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=f85d71e72e1fe07ffecdab0d3db9a30214d33f52

commit f85d71e72e1fe07ffecdab0d3db9a30214d33f52
Author:     Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2021-08-23 13:29:42 +0000
Commit:     Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2022-03-05 19:49:57 +0000

    cache: retire cache_fast_revlookup sysctl
    
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
    
    (cherry picked from commit b65ad70195d874ac28e6e65d2fd8acf5d9a79236)
---
 sys/kern/vfs_cache.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
index cf2e2dd72e63..7273126a008c 100644
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -253,6 +253,8 @@ SDT_PROBE_DEFINE3(vfs, fplookup, lookup, done, "struct nameidata", "int", "bool"
 SDT_PROBE_DECLARE(vfs, namei, lookup, entry);
 SDT_PROBE_DECLARE(vfs, namei, lookup, return);
 
+static char __read_frequently cache_fast_lookup_enabled = true;
+
 /*
  * This structure describes the elements in the cache of recent
  * names looked up by namei.
@@ -443,10 +445,6 @@ static u_long __exclusive_cache_line	numcache;/* number of cache entries allocat
 
 struct nchstats	nchstats;		/* cache effectiveness statistics */
 
-static bool __read_frequently cache_fast_revlookup = true;
-SYSCTL_BOOL(_vfs, OID_AUTO, cache_fast_revlookup, CTLFLAG_RW,
-    &cache_fast_revlookup, 0, "");
-
 static bool __read_mostly cache_rename_add = true;
 SYSCTL_BOOL(_vfs, OID_AUTO, cache_rename_add, CTLFLAG_RW,
     &cache_rename_add, 0, "");
@@ -3444,7 +3442,7 @@ vn_fullpath_any_smr(struct vnode *vp, struct vnode *rdir, char *buf,
 
 	VFS_SMR_ASSERT_ENTERED();
 
-	if (!cache_fast_revlookup) {
+	if (!atomic_load_char(&cache_fast_lookup_enabled)) {
 		vfs_smr_exit();
 		return (-1);
 	}
@@ -3848,7 +3846,6 @@ DB_SHOW_COMMAND(vpath, db_show_vpath)
 #endif
 
 static int cache_fast_lookup = 1;
-static char __read_frequently cache_fast_lookup_enabled = true;
 
 #define CACHE_FPL_FAILED	-2020
 



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