From owner-dev-commits-src-all@freebsd.org Mon Aug 23 13:34:17 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6C06366BB3C; Mon, 23 Aug 2021 13:34:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GtYB120Rkz3rnF; Mon, 23 Aug 2021 13:34:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F42015149; Mon, 23 Aug 2021 13:34:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17NDYHmO005890; Mon, 23 Aug 2021 13:34:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17NDYHm1005889; Mon, 23 Aug 2021 13:34:17 GMT (envelope-from git) Date: Mon, 23 Aug 2021 13:34:17 GMT Message-Id: <202108231334.17NDYHm1005889@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: b65ad70195d8 - main - cache: retire cache_fast_revlookup sysctl MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b65ad70195d874ac28e6e65d2fd8acf5d9a79236 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2021 13:34:17 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=b65ad70195d874ac28e6e65d2fd8acf5d9a79236 commit b65ad70195d874ac28e6e65d2fd8acf5d9a79236 Author: Mateusz Guzik AuthorDate: 2021-08-23 13:29:42 +0000 Commit: Mateusz Guzik CommitDate: 2021-08-23 13:31:44 +0000 cache: retire cache_fast_revlookup sysctl Sponsored by: Rubicon Communications, LLC ("Netgate") --- 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 199da865e39c..732dbbe53cef 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, ""); @@ -3440,7 +3438,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); } @@ -3845,7 +3843,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