]> git.baikalelectronics.ru Git - kernel.git/commit
UBI: add slab cache for ubi_scan_leb objects
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Sun, 31 Oct 2010 15:54:14 +0000 (17:54 +0200)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Sun, 6 Feb 2011 17:19:23 +0000 (19:19 +0200)
commit4400edec3b7de62a6cde1788f49c11f1d90ba43a
treeb30ab51df8df7c4ed9ef3adb68b234064816497f
parent6b1050598af176331e4c72aa86ebffc920d526cc
UBI: add slab cache for ubi_scan_leb objects

During scanning UBI allocates one struct ubi_scan_leb object for each PEB,
so it can end up allocating thousands of them. Use slab cache to reduce
memory consumption for these 48-byte objects, because currently used
'kmalloc()' ends up allocating 64 bytes per object, instead of 48.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
drivers/mtd/ubi/build.c
drivers/mtd/ubi/scan.c
drivers/mtd/ubi/scan.h