User: Password:
|
|
Subscribe / Log in / New account

Re: Major regression on hackbench with SLUB (more numbers)

From:  Al Viro <viro-AT-ZenIV.linux.org.uk>
To:  Christoph Lameter <clameter-AT-sgi.com>
Subject:  Re: Major regression on hackbench with SLUB (more numbers)
Date:  Wed, 26 Dec 2007 22:16:32 +0000
Message-ID:  <20071226221631.GD27894@ZenIV.linux.org.uk>
Cc:  Theodore Tso <tytso-AT-mit.edu>, Andi Kleen <andi-AT-firstfloor.org>, Willy Tarreau <w-AT-1wt.eu>, Steven Rostedt <rostedt-AT-goodmis.org>, Linus Torvalds <torvalds-AT-linux-foundation.org>, Ingo Molnar <mingo-AT-elte.hu>, Peter Zijlstra <a.p.zijlstra-AT-chello.nl>, LKML <linux-kernel-AT-vger.kernel.org>, Andrew Morton <akpm-AT-linux-foundation.org>, Christoph Hellwig <hch-AT-infradead.org>, "Rafael J. Wysocki" <rjw-AT-sisk.pl>
Archive-link:  Article

On Wed, Dec 26, 2007 at 01:31:35PM -0800, Christoph Lameter wrote:
> On Mon, 24 Dec 2007, Theodore Tso wrote:
> 
> > So two questions: why isn't -f the default?  And is /sys/slab
> 
> Because it gives misleading output. It displays the name of the first 
> of multiple slabs that share the same storage structures.

Erm...  Let me spell it out: current lifetime rules are completely broken.
As it is, create/destroy/create cache sequence will do kobject_put() on
kfree'd object.  Even without people playing with holding sysfs files
open or doing IO on those.

a) you have kobject embedded into struct with the lifetime rules of its
own.  When its refcount hits zero you kfree() the sucker, even if you
still have references to embedded kobject.

b) your symlinks stick around.  Even when cache is long gone you still
have a sysfs symlink with its embedded kobject as a target.  They are
eventually removed when cache with the same name gets created.  _Then_
you get the target kobject dropped - when the memory it used to be in
had been freed for hell knows how long and reused by something that would
not appreciate slub.c code suddenly deciding to decrement some word in
that memory.

c) you leak references to these kobject; kobject_del() only removes it
from the tree undoing the effect of kobject_add() and you still need
kobject_put() to deal with the last reference.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



(Log in to post comments)


Copyright © 2007, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds