Flash Translation Layer write 1101 logical: 0 1 2 3 4 5 6 7 00 00 00 00 10 11 11 11 physical: 01 10 11 00 01 01 11 11 block 0 block 1
Flash Translation Layer write 1101 logical: 0 1 2 3 4 5 6 7 00 00 00 00 10 11 11 11 physical: 01 10 11 00 01 01 11 11 block 0 block 1
Flash Translation Layer logical: 0 1 2 3 4 5 6 7 00 00 00 00 10 11 11 11 physical: 01 10 11 00 01 01 11 11 block 0 block 1
Flash Translation Layer logical: 0 1 2 3 4 5 6 7 must eventually be garbage collected 00 00 00 00 10 11 11 11 physical: 01 10 11 00 01 01 11 11 block 0 block 1
FTL Could be implemented as device driver or in firmware (usually the latter). � Where to store mapping? SRAM. � Physical pages can be in three states: - valid, invalid, free
States free valid invalid
States program free valid erase invalid
States program free valid relocate erase or TRIM invalid
SSD Architecture SSD: looks like disk (Traditional block API) SRAM: FTL mapping tbl
Problem: Big Mapping Table Assume 200GB device, 2KB pages, 4-byte entries. � SRAM needed: (200GB / 2KB) * 4 bytes = 400 MB. � Too big, SRAM is expensive!
Page Translations logical: 0 1 2 3 4 5 6 7 00 00 00 00 10 01 11 11 physical: 01 10 11 00 01 01 11 11 block 0 block 1
2-Page Translations logical: 0 1 2 3 4 5 6 7 00 00 00 00 10 01 11 11 physical: 01 10 11 00 01 01 11 11 block 0 block 1
Larger Mappings Advantage: larger mappings decrease table size. � Disadvantage?
2-Page Translations logical: 0 1 2 3 4 5 6 7 00 00 00 00 10 01 11 11 physical: 01 10 11 00 01 01 11 11 block 0 block 1
2-Page Translations write 1011 logical: 0 1 2 3 4 5 6 7 00 00 00 00 10 01 11 11 physical: 01 10 11 00 01 01 11 11 block 0 block 1
2-Page Translations write 1011 logical: 0 1 2 3 4 5 6 7 copy 00 00 00 00 10 01 10 01 physical: 01 10 11 00 01 01 11 01 block 0 block 1
2-Page Translations write 1011 logical: 0 1 2 3 4 5 6 7 00 00 00 00 10 01 10 01 physical: 01 10 11 00 01 01 11 01 block 0 block 1
2-Page Translations write 1011 logical: 0 1 2 3 4 5 6 7 00 00 00 00 10 01 10 01 physical: 01 10 11 00 01 01 11 01 block 0 block 1
Larger Mappings Advantage: larger mappings decrease table size. � Disadvantages? - more read-modify-write updates - more garbage - less flexibility for placement
Hybrid FTL Use course-grained mapping for most (e.g., 95%) of data. Map at block level. � Use fine-grained mapping for recent data. Map at page level.
Log Blocks Write changed pages to designated log blocks. � After blocks become full, merge changes with old data. � Eventually garbage collect old pages.
Merging Merging technique depends on I/O pattern. � Three merge types: - full merge - partial merge - switch merge
Merging Merging technique depends on I/O pattern. � Three merge types: - full merge - partial merge - switch merge
… logical: 0 1 2 3 11 11 11 11 11 11 11 11 A B C D physical: 11 11 11 11 11 11 11 11 block 0 block 1 (log) block 2
write D2 … logical: 0 1 2 3 11 11 11 11 11 11 11 11 A B C D physical: 11 11 11 11 11 11 11 11 block 0 block 1 (log) block 2
write D2 … logical: 0 1 2 3 11 11 11 11 11 11 11 A B C D D2 physical: 11 11 11 11 11 11 11 block 0 block 1 (log) block 2
… logical: 0 1 2 3 11 11 11 11 11 11 11 A B C D D2 physical: 11 11 11 11 11 11 11 block 0 block 1 (log) block 2
… logical: 0 1 2 3 11 11 11 11 11 11 11 A B C D D2 physical: 11 11 11 11 11 11 11 block 0 block 1 (log) block 2 eventually, we need to get rid of red arrows, as these represent expensive mappings
… logical: 0 1 2 3 11 11 11 11 11 11 11 A B C D D2 physical: 11 11 11 11 11 11 11 block 0 block 1 (log) block 2
… logical: 0 1 2 3 11 11 11 A B C D D2 A B C D2 physical: 11 11 11 block 0 block 1 (log) block 2
… logical: 0 1 2 3 11 11 11 A B C D D2 A B C D2 physical: 11 11 11 block 0 block 1 (log) block 2
… logical: 0 1 2 3 11 11 11 A B C D D2 A B C D2 physical: 11 11 11 block 0 block 1 (log) block 2
… logical: 0 1 2 3 garbage 11 11 11 A B C D D2 A B C D2 physical: 11 11 11 block 0 block 1 (log) block 2
Recommend
More recommend