Copyright 2009, Toshiba Corporation.Evaluation of UBI and UBIFSTOSHIBA CORPORATIONCore Technology CenterEmbedded System Technology Development Dept.UW
10Topic 2 : Flash space overhead• The factor of UBIfor BadBlock(changeable bykernel config(default 1 % = 20PEB)usedusedreservedreservedreservedreserve
11Topic 2 : Flash space overhead• The factor of UBIFSreserved by UBINAND (MTD 32MB, UBI 1 volume)2024 EBs24 EBsSuperblock/Masterblock (3)Log/LPT/... (
12• The actual total size of user dataConditions:– MTD partition size: 32MB, UBI volume number: 1– LZO compression enable– Random Data Random Data (Th
13• Typical Data BlockLEB 893 lprops: free 3072, dirty 368 (used 12432), flags 0x0UBIFS(2024 EBs)Main Area (2007 EBs)4For Internal-Vol,Wearleveing, Sc
14Topic 2 : Flash space overhead• Cause Free space at the tail of PEBhttp://www.linux-mtd.infradead.org/doc/ubifs.html#L_spaceacc“Flash space accounti
15Topic 3 : UBI scrubbing on preempt kernel• UBI “Scrubbing” function– When a bit-flip (ECC 1 bit error) is detected in a physical erase block, the bl
16Topic 3 : UBI scrubbing on preempt kernel• Patch– The lock of LEB is released before queuing a scrubbing. – It is not necessary to hold the lock whe
17Topic 4 : Sub-page write verify• MTD NAND “Verify NAND page writes” function– is the write verify function per a NAND physical page.– is implemented
18Topic 4 : Sub-page write verify• PatchThe function for write verifying with column (offset) and size is added to MTD NAND structure in MTD NAND driv
19Topic 4 : Sub-page write verify[drivers/mtd/mtd/nand/nand_base.c]static int nand_do_write_ops(struct mtd_info *mtd, loff_t to,struct mtd_oob_ops *op
2Agenda• Background• Topic1. Boot time2. Flash space overhead3. UBI scrubbing on preempt kernel4. Sub-page write verify5. Error handling• Summary• Ref
20Topic 5 : UBIFS/UBI error handling• UBIFS became read-only when an error occurs. – for protect data from any further corruption– http://www.linux-mt
21Summary• Boot Time– The initializations time of MTD NAND driver and UBI depends on the size.• The optimization of building BBT in MTD driver and rea
22References– MTD, JFFS2, UBIFS, UBIhttp://www.linux-mtd.infradead.org/– YAFFS2http://www.yaffs.net/– LogFShttp://www.logfs.com/logfs/– CE Linux Forum
3Background• Large size NAND flash memory is commonly used in embedded systems & Flash File systems for Larger size NAND are necessary.• UBI : U
4BackgroundNAND NOR DataFlash AG-AND OneNAND ECC’dNORMTD device, MTD APIVFSJFFS2 YAFFS2 LogFS UBIFSUBIBlockDeviceHDDSystem Call I/FFlash memoryVFS: Vi
5Background• Software– Linux kernel : Vanilla kernel 2.6.20.19 + Original patch for embedded systems– UBIFS / UBI : Vanilla kernel 2.6.30– MTD
6Topic 1 : Boot timeThe correlation between the time and the sizeMTD 32MB partition, UBI 1 volume (Toshiba NAND)0100200300400500600700800900MTD 32 MB
7Topic 1 : Boot timeThe MTD NAND driver initialization is slow.The time is not depend on the size of MTD partition, is depend on the size of NAND chip
8Topic 1 : Boot timeThe UBI initialization is slow.The time is depend on the size of MTD partition.• CauseThe reading of EC (Erase Counter) and VID (V
9Topic 2 : Flash space overhead• Problem“df” command reports too few free space.The result of df on 32 MB (32768 1k-blocks) MTD partition...• Factors“
Commentaires sur ces manuels