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] [thread-next>] [day] [month] [year] [list]
Message-ID: <a747d233-5e27-20c3-7e06-cee8d9f2bda1@oracle.com>
Date:	Wed, 17 Aug 2016 12:25:33 -0700
From:	Aruna Ramakrishna <aruna.ramakrishna@...cle.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	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 v3] mm/slab: Improve performance of gathering slabinfo
 stats


On 08/17/2016 12:03 PM, Eric Dumazet wrote:
> On Wed, 2016-08-17 at 11:20 -0700, Aruna Ramakrishna wrote:
> ]
>> -		list_for_each_entry(page, &n->slabs_full, lru) {
>> -			if (page->active != cachep->num && !error)
>> -				error = "slabs_full accounting error";
>> -			active_objs += cachep->num;
>> -			active_slabs++;
>> -		}
>
> Since you only removed this loop, you could track only number of
> full_slabs.
>
> This would avoid messing with n->num_slabs all over the places in fast
> path.
>
> Please also update slab_out_of_memory()
>

Eric,

Right now, n->num_slabs is modified only when a slab is detached from 
slabs_free (i.e. in drain_freelist and free_block) or when a new one is 
attached in cache_grow_end. None of those 3 calls are in the fast path, 
right? Tracking just full_slabs would also involve similar changes: 
decrement when a slab moves from full to partial during free_block, and 
increment when it moves from partial/free to full after allocation in 
fixup_slab_list. So I don't see what the real difference/advantage is.

I will update slab_out_of_memory and remove the slabs_full list 
traversal there too.

Thanks,
Aruna


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ