Re: [PATCH 1/2] SLUB: Fix merged slab cache names

From: Pekka Enberg
Date: Tue Sep 14 2010 - 13:49:11 EST


On 14.9.2010 20.47, Christoph Lameter wrote:
On Tue, 14 Sep 2010, Pekka Enberg wrote:

Put this into mm/slub.c as slub only flag? What is the difference from
refcount == 1?
I can put it in mm/slub.c but I was worried about someone reusing the bit for
something else.
Allocate from the other end like __OBJECT_POISON.
I'll do that. Thanks!
Do you mean refcount == 2? You don't know during kmem cache release time if
someone was merged to the cache or not.
Ok. Keeping the original name. Why dont we do strdup by default and always
do a kfree(s->name) on close?

I tried that. It gets very nasty during bootstrap.
Add it only to kmem_cache_create() not to kmem_cache_open. That is not
used during bootstrap. The bootstrap caches do not matter since they are
never freed
I tried that too. It doesn't work because we get merged to kmalloc caches and can't do kfree() on them.

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