lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFX2Jf=8cDNmjUBCRE-n6N9khkRRrq0ABtsX4V=j830Mi1spwQ@mail.gmail.com>
Date: Wed, 4 Sep 2024 15:45:49 -0400
From: Anna Schumaker <anna@...nel.org>
To: Kaixiong Yu <yukaixiong@...wei.com>
Cc: akpm@...ux-foundation.org, mcgrof@...nel.org, ysato@...rs.sourceforge.jp, 
	dalias@...c.org, glaubitz@...sik.fu-berlin.de, luto@...nel.org, 
	tglx@...utronix.de, bp@...en8.de, dave.hansen@...ux.intel.com, hpa@...or.com, 
	viro@...iv.linux.org.uk, brauner@...nel.org, jack@...e.cz, kees@...nel.org, 
	j.granados@...sung.com, willy@...radead.org, Liam.Howlett@...cle.com, 
	vbabka@...e.cz, lorenzo.stoakes@...cle.com, trondmy@...nel.org, 
	chuck.lever@...cle.com, jlayton@...nel.org, neilb@...e.de, 
	okorniev@...hat.com, Dai.Ngo@...cle.com, tom@...pey.com, davem@...emloft.net, 
	edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com, paul@...l-moore.com, 
	jmorris@...ei.org, linux-sh@...r.kernel.org, linux-kernel@...r.kernel.org, 
	linux-fsdevel@...r.kernel.org, linux-mm@...ck.org, linux-nfs@...r.kernel.org, 
	netdev@...r.kernel.org, linux-security-module@...r.kernel.org, 
	wangkefeng.wang@...wei.com
Subject: Re: [PATCH v2 -next 11/15] sunrpc: use vfs_pressure_ratio() helper

On Mon, Sep 2, 2024 at 11:31 PM Kaixiong Yu <yukaixiong@...wei.com> wrote:
>
> Use vfs_pressure_ratio() to simplify code.
>
> Signed-off-by: Kaixiong Yu <yukaixiong@...wei.com>
> Reviewed-by: Kees Cook <kees@...nel.org>
> ---
>  net/sunrpc/auth.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c
> index 04534ea537c8..3d2b51d7e934 100644
> --- a/net/sunrpc/auth.c
> +++ b/net/sunrpc/auth.c
> @@ -489,7 +489,7 @@ static unsigned long
>  rpcauth_cache_shrink_count(struct shrinker *shrink, struct shrink_control *sc)
>
>  {
> -       return number_cred_unused * sysctl_vfs_cache_pressure / 100;
> +       return vfs_pressure_ratio(number_cred_unused);

Looks fairly straightforward to me.

Acked-by: Anna Schumaker <anna.schumaker@...cle.com>

>  }
>
>  static void
> --
> 2.25.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ