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]
Date:	Fri, 26 Aug 2011 22:46:56 +0800
From:	Zhao Jin <cronozhj@...il.com>
To:	Christoph Lameter <cl@...ux.com>
Cc:	penberg@...nel.org, mpm@...enic.com, trivial@...nel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] slab: avoid unnecessary touching of a partial slab

On Fri, 2011-08-26 at 09:08 -0500, Christoph Lameter wrote:
> On Fri, 26 Aug 2011, Zhao Jin wrote:
> 
> > In cache_alloc_refill(), after refilling from a partial slab, if the
> > slab remains partial, it would be deleted from and then added again to
> > the partial list. As the slab is the first element in the list before
> > deletion, such behavior has no effect. This patch avoids touching the
> > slab in this case.
> 
> The list_del/list_add action is a list_move.

But in cache_alloc_refill(), it is the first slab (that is: its list
field is pointed by the l3->slabs_partial.next) that is picked from the
partial list for refilling. Assume it remains partial after that. Since
list_add inserts a new element after the head (l3->slabs_partial), the
position of the slab in the partial list won't change after
list_del/list_add: it will be still the first element. Therefore,
list_del/list_add has done nothing actually in this case.

Regards,
zhj


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ