UBI memory leak after creating and removing volumes

Artem Bityutskiy dedekind at infradead.org
Tue Feb 17 10:24:19 EST 2009


On Tue, 2009-02-17 at 14:33 +0000, John.Smith at pace.com wrote:
> After 0, 1000 and 2000 iterations of a test of creating 2 UBI volumes,
> then removing them, /proc/slab_allocators shows these three items
> obviously increasing:
> 
> inode_cache: 327 alloc_inode+0x140/0x148         
> inode_cache: 3329 alloc_inode+0x140/0x148        
> inode_cache: 6329 alloc_inode+0x140/0x148        
> (3 objects per iteration)
> 
> sysfs_dir_cache: 1402 sysfs_new_dirent+0x2c/0xa0 
> sysfs_dir_cache: 15402 sysfs_new_dirent+0x2c/0xa0
> sysfs_dir_cache: 29402 sysfs_new_dirent+0x2c/0xa0
> (14 objects per iteration)
> 
> dentry_cache: 669 d_alloc+0x30/0x214             
> dentry_cache: 3823 d_alloc+0x30/0x214            
> dentry_cache: 6823 d_alloc+0x30/0x214            
> (3 objects per iteration)

Hmm, may be this is related to sysfs? Every time you create or delete
a volume UBIFS creates/deletes sysfs entries. May be some are forgotten,
or it messes up kobject refcounting, so the kobjects are never released.

> I don't know how to track these things down fully. But I 
> believe they relate to the elevator queue.

Hmm? Sorry, did not realize how elevator may be involved into
UBI volume creation/deletion. You mean when we create a volume,
userspace udev is called, and creates device node on your host
FS, which involves elevators? You can try disabling udev then.

Anyway, too late, I have to go home ow.

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




More information about the linux-mtd mailing list