Block-level mapping (FTL)
Block-level mapping translates logical flash-block numbers to physical eraseblocks while retaining each page's offset.
Here block means a group of flash pages, not one host LBA. The logical page number splits into a block number, which the table translates, and an offset that stays fixed, so a logical page can sit at only one position inside its physical block. [1] With four pages per block, logical pages 2000 to 2003 share chunk 500, and a read of page 2002 adds offset 2 to the first physical page of the mapped block. [3]
The table shrinks by the ratio of block size to page size, a factor of 64 for 128 KB blocks of 2 KB pages. [1] The price is small writes, since updating one page forces the controller to read the other live pages of the block and rewrite all of them to a fresh block, which raises write amplification, and real blocks can be 256 KB or larger. [3] Fixed offsets also clash with large-block flash that must be programmed sequentially within a block. [1]
Classical hybrid FTLs keep data blocks block-mapped and send updates to a small pool of page-mapped log blocks, for example 3% of flash capacity, which are later merged back into data blocks. [1]
Relations
Advantages
- In the best case, a switch merge, a log block written fully and in order simply becomes the new data block, with no page copying. [1, 3]
Limitations
- Random updates end in full merges that copy pages from many data blocks, and in one financial trace about 20% of the full merges of a hybrid scheme involved 20 or more data blocks. [1]
Citations
- Gupta, Kim and Urgaonkar. DFTL: Demand-based Selective Caching of Page-level Address Mappings. ASPLOS 2009, sections 2-3 and 5.2.
- Arpaci-Dusseau. Operating Systems: Three Easy Pieces, chapter 44 Flash-based SSDs, version 1.10, sections 44.4-44.10.
Further reading
Sources & caveats
- dftl is the ASPLOS 2009 paper read in sections 2-3 and 5.2; ostep is a free university textbook, chapter 44, version 1.10, read in sections 44.4-44.10.
- The 2 KB page and 128 KB block geometry is the example in dftl, not a current device figure.
- Arithmetic: 128 KB / 2 KB = 64 pages per block, so a block-level table has 64 times fewer entries than a page-level one.