一句话:提出NF2FS,将NOR Flash文件系统的数据组织与磨损均衡粗粒度到文件级并协同设计,缓解I/O放大并防止快磨损。
NOR flash因小封装、高可靠等特性,在RAM受限微控制器中日益流行。现有NOR flash文件系统为满足RAM限制,将块级数据组织与磨损均衡迁移到NOR flash上,但细粒度块级管理导致频繁索引更新和扫描,引发严重I/O放大,且二者解耦进一步恶化问题。NF2FS基于应用文件通常较小、I/O模式确定的观察,将数据组织放松为扁平文件布局以加速文件/目录扫描,并用粗粒度文件交换实现磨损均衡,同时在文件系统内协同二者。作者在FreeRTOS中实现NF2FS,采用全日志布局、双位图空间分配器和类soft-update崩溃一致性等技术。实验表明,NF2FS显著优于现有工作,并能防止NOR flash快速磨损。
NOR flash has been increasingly popular for RAM-restricted microcontrollers due to its small package, high reliability, etc. To satisfy RAM restrictions, existing NOR flash file systems migrate their functionalities, i.e., block-level data organization and wear leveling (WL), from RAM to NOR flash. However, such fine-grained block-level management introduces frequent index updates and NOR flash scanning, leading to severe I/O amplification, which further deteriorates as they are decoupled in existing NOR flash file systems. To address the problem, we propose NF2FS, a NOR flash-friendly file system. Our key insight is that applications running on NOR flash usually have (1) small file sizes, therefore block-based data organization can be converted to flat file layout (for fast file/dir scanning); (2) deterministic I/O patterns, thereby WL can be achieved through coarse file swapping. As a result, NF2FS relaxes data organization and WL to a coarse-grained file level, which are then cooperated within the file system. We implement NF2FS in FreeRTOS using a range of techniques, including the all-logging layout, along with efficient layout management approaches such as dual bitmap space allocator and soft-update-like crash consistency. Experiments suggest that NF2FS significantly outperforms existing works and can prevent quick NOR flash wear-out.
@inproceedings{HuangPXZYSD25,
title = {Simplifying and Accelerating NOR Flash I/O Stack for RAM-Restricted Microcontrollers},
author = {Hao Huang and Yanqi Pan and Wen Xia and Xiangyu Zou and Darong Yang and Liang Shi and Hongwei Du},
booktitle = {ASPLOS},
year = {2025},
doi = {10.1145/3676641.3716272}
}