git: b65ad70195d8 - main - cache: retire cache_fast_revlookup sysctl

Cy Schubert Cy.Schubert at cschubert.com
Mon Aug 23 13:51:52 UTC 2021


In message <202108231334.17NDYHm1005889 at gitrepo.freebsd.org>, Mateusz Guzik 
wri
tes:
> The branch main has been updated by mjg:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=b65ad70195d874ac28e6e65d2fd8acf5
> d9a79236
>
> commit b65ad70195d874ac28e6e65d2fd8acf5d9a79236
> Author:     Mateusz Guzik <mjg at FreeBSD.org>
> AuthorDate: 2021-08-23 13:29:42 +0000
> Commit:     Mateusz Guzik <mjg at FreeBSD.org>
> CommitDate: 2021-08-23 13:31:44 +0000
>
>     cache: retire cache_fast_revlookup sysctl

Why?

>     
>     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 na
> meidata", "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;/* num
> ber of cache entries allocat
>  
>  struct nchstats	nchstats;		/* cache effectiveness statisti
> cs */
>  
> -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 *rdi
> r, 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
>  
>



-- 
Cheers,
Cy Schubert <Cy.Schubert at cschubert.com>
FreeBSD UNIX:  <cy at FreeBSD.org>   Web:  https://FreeBSD.org
NTP:           <cy at nwtime.org>    Web:  https://nwtime.org

	The need of the many outweighs the greed of the few.




More information about the dev-commits-src-all mailing list