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: <1472519215.5512.30.camel@perches.com>
Date:   Mon, 29 Aug 2016 18:06:55 -0700
From:   Joe Perches <joe@...ches.com>
To:     Aruna Ramakrishna <aruna.ramakrishna@...cle.com>,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Cc:     Mike Kravetz <mike.kravetz@...cle.com>,
        Christoph Lameter <cl@...ux.com>,
        Pekka Enberg <penberg@...nel.org>,
        David Rientjes <rientjes@...gle.com>,
        Joonsoo Kim <iamjoonsoo.kim@....com>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v4 resend] mm/slab: Improve performance of gathering
 slabinfo stats

On Mon, 2016-08-29 at 17:44 -0700, Aruna Ramakrishna wrote:
> This patch optimizes 'cat /proc/slabinfo' by maintaining a counter for
> total number of allocated slabs per node, per cache.
[]
> We tested this after
> growing the dentry cache to 70GB, and the performance improved from 2s to
> 5ms.

Seems sensible, thanks.

One completely trivial note:
> diff --git a/mm/slab.c b/mm/slab.c
[]
> @@ -1394,24 +1395,27 @@ slab_out_of_memory(struct kmem_cache *cachep, gfp_t gfpflags, int nodeid)
>  	for_each_kmem_cache_node(cachep, node, n) {
>  		unsigned long active_objs = 0, num_objs = 0, free_objects = 0;
>  		unsigned long active_slabs = 0, num_slabs = 0;
> +		unsigned long num_slabs_partial = 0, num_slabs_free = 0;
> +		unsigned long num_slabs_full;
[]
> +		num_slabs_full = num_slabs -
> +			(num_slabs_partial + num_slabs_free);

vs

> @@ -4111,6 +4119,8 @@ void get_slabinfo(struct kmem_cache *cachep, struct slabinfo *sinfo)
>  	unsigned long num_objs;
>  	unsigned long active_slabs = 0;
>  	unsigned long num_slabs, free_objects = 0, shared_avail = 0;
> +	unsigned long num_slabs_partial = 0, num_slabs_free = 0;
> +	unsigned long num_slabs_full = 0;
[]
> +	num_slabs_full = num_slabs - (num_slabs_partial + num_slabs_free);

It seems odd to have different initialization styles
for num_slabs_full.  It seems the second one doesn't
need to be initialized.

It'd also be nicer I think if the two declarations
blocks had more similar layouts.

Maybe in a follow-on patch.  Or not.  Your choice.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ