mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: Christoph Lameter <clameter@sgi.com>
Cc: linux-kernel@vger.kernel.org
Subject: SLUB: kmem_cache_destroy doesn't
Date: Thu, 12 Apr 2007 17:27:33 +1000	[thread overview]
Message-ID: <17949.57189.565653.289035@notabene.brown> (raw)


I tried out SLOB in latest mm.
raid5 uses kmem_cache_create to create a cache, a deletes it with
kmem_cache_destroy.

After I change the name for the slab to not include a '/' the create
worked fine, but the destroy seems incomplete.
If I stop an array and restart it, the second kmem_cache_create fails
because it thinks the name is already in use.

If I look in sysfs, I can see it there.
And 

  # cat /sys/slab/raid5-md1/aliases
  -1

is a bit suspicious.

And

void kmem_cache_destroy(struct kmem_cache *s)
{
	down_write(&slub_lock);
	if (s->refcount)
		s->refcount--;
	else {
		list_del(&s->list);
		WARN_ON(kmem_cache_close(s));
		sysfs_slab_remove(s);
		kfree(s);
	}
	up_write(&slub_lock);
}

looks a bit odd.
I would have thought the test should be:

        if (s->refcount > 1)

??

(2.6.21-rc6-mm1 to be precise)

NeilBrown

             reply	other threads:[~2007-04-12  7:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-12  7:27 Neil Brown [this message]
2007-04-12 16:38 ` Christoph Lameter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17949.57189.565653.289035@notabene.brown \
    --to=neilb@suse.de \
    --cc=clameter@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®