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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <PH0PR11MB5880F84715F490999F790A62DA9D9@PH0PR11MB5880.namprd11.prod.outlook.com>
Date:   Tue, 18 Apr 2023 12:25:05 +0000
From:   "Zhang, Qiang1" <qiang1.zhang@...el.com>
To:     Uladzislau Rezki <urezki@...il.com>
CC:     "paulmck@...nel.org" <paulmck@...nel.org>,
        "frederic@...nel.org" <frederic@...nel.org>,
        "joel@...lfernandes.org" <joel@...lfernandes.org>,
        "qiang.zhang1211@...il.com" <qiang.zhang1211@...il.com>,
        "rcu@...r.kernel.org" <rcu@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] rcu/kvfree: Make drain_page_cache() call return directly
 if cache is disabled

> If the rcu_min_cached_objs is set to zero at boot params, the
> krcp->page_cache_work will not be triggered to fill page cache,
> and the put_cached_bnode() also does not fill page cache, this
> also means the krcp->bkvcache is always empty, so not need to
> acquire unnecessary krcp->lock to get page from krcp->bkvcache,
> this commit therefore make drain_page_cache() return directly if
> the rcu_min_cached_objs is zero.
> 
> Signed-off-by: Zqiang <qiang1.zhang@...el.com>
> ---
>  kernel/rcu/tree.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index c8ba2be026fa..ce995fc1c644 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -2924,6 +2924,9 @@ drain_page_cache(struct kfree_rcu_cpu *krcp)
>  	struct llist_node *page_list, *pos, *n;
>  	int freed = 0;
>  
> +	if (rcu_min_cached_objs)
> +		return 0;
> +
>
>Should we check for zero?
>

I am so sorry,  It's my mistake. I will resend.

Thanks
Zqiang

>
>--
>Uladzislau Rezki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ