[PATCH] Enhancement to current 1:1 mapping handling in JFFS2

zhao forrest zhao_fusheng at hotmail.com
Thu Sep 22 04:37:45 EDT 2005


Hi,

This patch gave a possible method to improve the current 1:1
mapping handling in JFFS2.

Data structure:
1 A slab cache for struct jffs2_eraseblock; is created, so
struc jffs2_eraseblock is allocated from this slab cache.
2 A pointer array is created by kmalloc(), and the pointer
point to the struct jffs2_eraseblock allocated from slab cache.

By storing pointers instead of "struct jffs2_eraseblock"s into
continuous memory space, we reduce the pressure of continuous
memory space requirement.

On a 32-bit system, 128K continuous memory allocated by kmalloc()
can hold 32K pointers. 
So if the eraseblock size is 4K, it can support 128M flash memory.
if the eraseblock size is 8K, it can support 256M flash memory.

I think this patch can support most of flashes now. If there's
size limitation report in the future, we can add another level of
pointers to meet the requirement.

Your comments are welcome!

Thanks,
Forrest

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1on1mapping.patch
Type: application/octet-stream
Size: 15114 bytes
Desc: not available
Url : http://lists.infradead.org/pipermail/linux-mtd/attachments/20050922/1f691121/attachment.obj 


More information about the linux-mtd mailing list