AXFS Advanced XIP Filing System Jared Hulbert Numonyx
AXFS Advanced XIP Filing System Jared Hulbert Numonyx April 15, 2008
Agenda • Goal/History • Features • Architecture • Test Results • Kernel Integration
Project Goals Supportable solution for application XIP Fine grained control on compression Flexible use of all system memories – NOR, NAND, RAM
What is Application XIP? e. Xecute In Place of userspace code – Run code from where it is stored on Flash – Saves memory – No paging = higher performance “I thought the kernel supported XIP? ” – Yes, for ext 2 with specialized hardware – Yes, for kernel code segments (xip. Image)
Why a New Filesystem? CRAMFS XIP patches used to work BUT. . . – ~9 years old and haven’t been merged? ? ? – patches broke, real bad, every year – File level compression choice Squash. FS? New, better compression BUT… – Block device oriented architecture – Didn’t see how to fit new concepts into arch
Features Basic Attributes –Read-only – 64 bit –Designed with CE requirements in mind Compression – 4 KB-4 GB compression block size –Page by page uncompression map for XIP Flexible Mount –MTD (NAND/NOR) –block device –split across XIP NOR and non-XIP NAND Tools –GPL mkfs. axfs –Supported propriety image builder available
Onmedia Format Super Block Region Descriptor File Info XIP Region Compressed Region Superblock – Points to many region descriptor Region Descriptor – Describes / points to one region Regions – Each data type / table has own region – permissions, file names, file node info, file data, etc.
Data Flow inode Node Index XIP Region XIP Index 0 Node Type Table Compressed cblock Offset Table Index 1 Compressed Region cnode Offset Table Index 2 Uncompressed cblock Index 0 Index 1 Index 2 Index 3 Application Virtual Pages Index 1 Index 3
Mount Options mount –t axfs –o block_dev=/dev/mtd 1 /dev/mtd 0 /mnt/axfs /dev/sda 0 ~/file. axfs /dev/mtd 0 (-o loop) (NAND) (NOR) AXFS Image AXFS Image Part 1 (MMAP) /dev/mtd 1 (NAND) AXFS Image Part 2 (IO)
Image Size Comparison ~1 year old Opie build from Open. Embedded
Total Memory Used
Fitting into Real Chips
Performance: direct comparison PXA 270 – – 520 MHz (CPU) 208 MHz (memory clock) 104 MHz (SDRAM bus) 52 MHz (NOR flash bus) Linux-2. 6. 22 – – xip. Image CONFIG_PREEMPT=y MTD updated to Sept 25 git pull “mem=24 MB” in kernel commandline Opie build – Open. Embedded – ~1 year old
Performance: Direct Comparison Root Filing System Comparison Video at: http: //www. youtube. com/watch? v=fu 6 Yj 7 i. KEi. A
Performance: realistic comparison Started with commercial phone – PXA 270, 48 MB RAM, 32 MB NOR, 96 MB NAND – 297 MHz (CPU) / 97 MHz (SDRAM bus) /48 MHz (NOR flash bus) – code in CRAMFS from NOR – data in NAND “XIP” – code in AXFS from NOR – data in NAND “Sn. D” – code in CRAMFS from NAND – data on NAND
Performance: realistic comparison XIP vs. SND: Realistic Performance Comparison Video at: http: //www. youtube. com/watch? v=HUq. Fr. A 4 FYd 0
Kernel Integration Status Patches – VM_MIXEDMAP / pageless XIP patchset – just got in –mm tree – 2. 6. 26? – Physaddr in mtd->point() – Waiting on dwmw 2 Todo Features – Added compression options (LZO, LZMA, etc) – brd RAM disk support
Resources Git tree git: //git. infradead. org/home/jehulber/axfs. git Sourceforge site http: //axfs. sf. net
App launch time
- Slides: 20