Re: [PATCH] mm/slab: add a leak decoder callback

2013-01-15 Thread Zach Brown
The merge processing occurs during kmem_cache_create and you are setting up the decoder field afterwards! Wont work. In the thread I suggested providing the callback at destruction: http://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg21130.html I liked that it limits accesibility of

Re: [PATCH] mm/slab: add a leak decoder callback

2013-01-15 Thread Liu Bo
On Tue, Jan 15, 2013 at 04:30:52PM +, Christoph Lameter wrote: On Mon, 14 Jan 2013, Liu Bo wrote: This adds a leak decoder callback so that kmem_cache_destroy() can use to generate debugging output for the allocated objects. Interesting idea. @@ -3787,6 +3789,9 @@ static int

Re: [PATCH] mm/slab: add a leak decoder callback

2013-01-15 Thread Liu Bo
On Tue, Jan 15, 2013 at 09:01:05AM -0800, Zach Brown wrote: The merge processing occurs during kmem_cache_create and you are setting up the decoder field afterwards! Wont work. In the thread I suggested providing the callback at destruction:

[PATCH] mm/slab: add a leak decoder callback

2013-01-13 Thread Liu Bo
This adds a leak decoder callback so that kmem_cache_destroy() can use to generate debugging output for the allocated objects. Callers like btrfs are using their own leak tracking which will manage allocated objects in a list(or something else), this does indeed the same thing as what slab does.