axfs advanced xip filing system jared hulbert numonyx april 15, 2008
DESCRIPTION
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 - PowerPoint PPT PresentationTRANSCRIPT
AXFSAdvanced XIP Filing System
Jared HulbertNumonyx
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?
eXecute 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 ext2 with specialized hardware
–Yes, for kernel code segments (xipImage)
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
SquashFS? New, better compression BUT…–Block device oriented architecture
–Didn’t see how to fit new concepts into arch
Features
Basic Attributes
–Read-only
–64bit
–Designed with CE requirements in mind
Compression
–4KB-4GB 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
Region DescriptorRegion Descriptor
Super BlockSuper Block
File InfoFile Info
XIP RegionXIP Region
Region DescriptorRegion Descriptor
Compressed RegionCompressed Region
Region DescriptorRegion Descriptor
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
Application Virtual PagesApplication Virtual Pages
Node IndexNode Index
XIPXIP CompressedCompressed
Node Type TableNode Type Table
inodeinode
XIP RegionXIP Region
Index 0
Index 1
Index 2
Index 1
Compressed RegionCompressed Region
cblock Offset Tablecblock Offset Table
Uncompressed cblockUncompressed cblock
Index 0 Index 2Index 1 Index 3
cnode Offset Tablecnode Offset Table
Index 3
/dev/mtd0
(NAND)
/dev/mtd0
(NAND)
Mount Options
/dev/mtd0
(NOR)
/dev/mtd0
(NOR)
AXFS
Image
AXFS
Image
/dev/sda0/dev/sda0
AXFS
Image
AXFS
Image
~/file.axfs
(-o loop)
~/file.axfs
(-o loop)
AXFS
Image
AXFS
Image
AXFS
Image
AXFS
Image
/dev/mtd0
(NOR)
/dev/mtd0
(NOR)
AXFS
Image
Part 1
(MMAP)
AXFS
Image
Part 1
(MMAP)
/dev/mtd1
(NAND)
/dev/mtd1
(NAND)
AXFS
Image
Part 2
(IO)
AXFS
Image
Part 2
(IO)
mount –t axfs –o block_dev=/dev/mtd1 /dev/mtd0 /mnt/axfs
Image Size Comparison
~1 year old Opie build from OpenEmbedded
0 16 32 48
AXFS
Squashfs
CRAMFS
JFFS2
AXFS(XIP)
CRAMFS(XIP)
MB
Total Memory Used
0 32 64 96
AXFS
SquashFS
JFFS2
MB Rootfs size RAM used
Fitting into Real Chips
0 32 64 96
AXFS
SquashFS
JFFS2
MB Rootfs size RAM used
Performance: direct comparison
PXA270
Linux-2.6.22
Opie build
– 520 MHz (CPU)– 208 MHz (memory clock)– 104 MHz (SDRAM bus)– 52 MHz (NOR flash bus)
– xipImage– CONFIG_PREEMPT=y– MTD updated to Sept 25 git pull– “mem=24MB” in kernel
commandline
– OpenEmbedded– ~1 year old
Performance: Direct Comparison
Root Filing System Comparison Video at:http://www.youtube.com/watch?v=fu6Yj7iKEiA
Performance: realistic comparison
Started with commercial phone– PXA270, 48MB RAM, 32MB NOR, 96MB 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
“SnD”– 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=HUqFrA4FYd0
Kernel Integration Status
Patches–VM_MIXEDMAP / pageless XIP patchset
– just got in –mm tree– 2.6.26?
–Physaddr in mtd->point()– Waiting on dwmw2
Todo Features–Added compression options (LZO, LZMA, etc)
–brd RAM disk support
Resources
Git treegit://git.infradead.org/home/jehulber/axfs.git
Sourceforge sitehttp://axfs.sf.net
App launch time
0
25
50
75
100
125
150
175
200
AXFS JFFS2 CRAMFS SquashFS AXFS JFFS2 CRAMFS SquashFS
24MB of RAM 32MB of RAM
Tim
e (s
)
Shuttle Video Launch Time (s) PDF Reader Launch Time (s)
Webbrowser Launch Time (s) SDL Quake Launch Time (s)