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: <alpine.DEB.2.00.1201230846290.7674@router.home>
Date:	Mon, 23 Jan 2012 08:48:53 -0600 (CST)
From:	Christoph Lameter <cl@...ux.com>
To:	Pekka Enberg <penberg@...nel.org>
cc:	Zhao Jin <cronozhj@...il.com>, mpm@...enic.com,
	rientjes@...gle.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2][RESEND] slab: avoid unnecessary touching of a partial
 slab

On Mon, 23 Jan 2012, Pekka Enberg wrote:

> > diff --git a/mm/slab.c b/mm/slab.c
> > index 82e0a0e..2d7a0f4 100644
> > --- a/mm/slab.c
> > +++ b/mm/slab.c
> > @@ -3121,11 +3121,10 @@ retry:
> > 		check_slabp(cachep, slabp);
> >
> > 		/* move slabp to correct slabp list: */
> > -		list_del(&slabp->list);
> > 		if (slabp->free == BUFCTL_END)
> > -			list_add(&slabp->list, &l3->slabs_full);
> > -		else
> > -			list_add(&slabp->list, &l3->slabs_partial);
> > +			list_move(entry, &l3->slabs_full);
> > +		else if (entry != l3->slabs_partial.next)

Why is the check for entry necessary? We are holding a lock that
prevents modifications to the list after all.

Just a list_move when the partial slab is drained seems to be sufficient.
--
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