on Flash

The Benefits & Pitfalls of in Open Source Environments Thom Denholm -

Flash Memory Summit 2011 Santa Clara, CA 1 Agenda

. Growth of Linux and Flash Memory . Options for Managing Flash . Factors to Consider • System Boot vector • Discard Interface • Design Upgrades • Support Growth of Linux

45% 40% 35% 30% 25% 20% 15% 10% 2010 5% 0% 2011

Source: EE Times Embedded Market Study 2011 Growth of Flash Memory

. 2011 - $22 billion; 19.3 billion gigabytes Challenges of Working with Flash on Linux

. Flash must be “managed” . Driver required for more than basic functionality . Flash (YAFFS, JFFS2, UBIFS) Flash Management

ECC Block Use

NAND Software Driver

EZ-NAND OS e•MMC Software alternatives

Linux Kernel File System

Cache

Software Solution Configuration NAND Registers Erase Units to Disk Sectors

Physical Erase Block

Logical File Block Logical Erase Block File System Block Pitfalls

. Write Amplification . ECC - Bad Blocks . Wear Leveling Effectiveness – Dynamic Only

Uneven usage! Only dynamic data is wear leveled Underused Optimal Overused Wear Leveling Effectiveness – Complete

Nearly uniform wear across static & dynamic data Underused Optimal Overused FACTORS TO CONSIDER Boot Cycle uboot mtd Full Flash Management Discard interface

. File system delete

. Hardware notified

. Saves flash life, wear leveling Testing

350000

300000

Write 131072 bytes 250000 Nitro 200000 150000 Rewrite ext3 ext4 100000 Nitro ubifs

50000 jffs2

0 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 File System Connection

Linux Kernel

Flash File System

NAND File System Connection

Linux Kernel

New File System e•MMC Design Upgrades

. Flash Part End-of-Life . Kernel updates Support

. Evaluation

. Field Failures . Flash Image Tools