UBI memory leak after creating and removing volumes

Artem Bityutskiy dedekind at infradead.org
Tue Feb 17 07:23:57 EST 2009


On Tue, 2009-02-17 at 12:01 +0000, John.Smith at pace.com wrote:
> Hello, 
> I am using a 2.6.18 Kernel, patched with MTD from Kernel 2.6.21, and
> UBI from the mainline kernel a few days later on 1 May 2007.  The
> whole is running on an embedded MIPS device.
> 
> I have NAND, and UBI, and gluebi, and jffs2.  I use jffs2, mounted on
> an mtdblock device. Broadly, it all works.
> 
> I am experiencing a memory leak revealed in recent stress tests.  The
> stress tests create and delete many UBI volumes, and are are broadly
> equivelent to the following:

Can you please enable /proc/slab_allocators - it tracks all allocators
and if we have a leak - it may point to the function which is guilty.

To have /proc/slab_allocators, do the following:

1. Enable SLAB, not SLUB. In kernel config menu got to
   "General setup  --->", then
   "Choose SLAB allocator (SLUB (Unqueued Allocator))  --->"
   and choose SLAB.

2. Go to the root menu, then go to
   "Kernel hacking  --->" and enable
   "[*]   Debug slab memory allocations" and
   "[*]     Memory leak debugging"

Recompile the kernel, and you will have a nice instrumentation to find
memory leak - the /proc/slab_allocators file. Please, play with this.

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)




More information about the linux-mtd mailing list