Week 11 - 4
Week 11 - 4
FTL Interface
FTL
Block Manager Manager Mapping Table
(Engine)
Data Garbage
Wear Leveler
Separator Collector
Block FTL
– Hybrid mapping
• Block mapping + page mapping
12
13
14
15
0
1
4
LPN 0
14
LPN 1
LPN 2
LPN 3 10
LPN 4 5
LPN 5 6
LPN 6 7
LPN 7
LPN 8
LPN 9 2
LPN 10 8
LPN 11 11
LPN 12 13
LPN 13
LPN 14
LPN 15 15
9
3
12
FTL Overview.8 Jihong Kim (SNU)
Page & Block Mappings
• Page mapping
– Pros
• Can map any logical page to any physical page
• Efficient flash page utilization
– Cons
• mapping table is large
– E.g., 16GB flash, 2KB flash page, requires 32MB SRAM
– As flash size increases, SRAM size must scale
– Too expensive!
• Block mapping
– Pros
• Mapping table size reduced by a factor of (block size / page size)
~ 64 times
– Cons
• Page number offset within a block is fixed
• Garbage collection overheads grow
Update Yes
Yes
request?
No
Write! valid
Data is written
valid to
valid
a log block.
valid
soon” (Engine)
Data
• Hot data identification has a Wear Leveler Separat
Garbage
Collector
or
critical impact on
– The performance (due to
GC)
– The lifespan (due to WL)
Yes Frequently No
updated data?
Hot Cold
FTL Overview.14block block Jihong Kim (SNU)
Garbage Collection
• Get a free block by FTL Interface
blocks Garbage
Data
Wear Leveler
• GC Flow Separator Collector
Address Translation
Address Translation Table
Overwrite X
Page 0
Valid page
Page 1
Invalid page
Page 2
Page 3 Free page
Block 0 Block 1
Garbage Collection
(3 copies and 1
erasure)
FTL
Spare Area
R
E
A
D
root
Dentry Dentry
File System
Dentry Dentry
Storage Systems
R
E Mapping Table
A
D
NAND flash
Sup memoryInod
Mapping inod Director inod
erblo e
Information e y entry e
ck table
FTL Overview.22 Jihong Kim (SNU)
Overview of
NAND Flash Memory
Jihong Kim
Dept. of CSE, SNU
Content
No Overwrites
c.f.) DRAM
Read
Erase
Controller
Plane 0 Plane 1
Block n-1
Block n-3
I/O 0
Plane : unit of multi operation
Row decoder
~
Drivers
I/O 7
Planes consist of multiple blocks
…
… …
in the row direction
Block 4
(SLC : 64 pages / MLC : 128 pages) Block 2
Block 0
Planes consists of 8ea I/O group
Page Buffer & Drivers (4~8~16KB)
in the column direction Peripheral & Charge pump
…
…
W/L
Row Decoder
Page Page Page … Page Page Page Page … Page
0 1 2 N-1 0 1 2 N-1
Block 2 Block 3
Block 0 Block 1
B/L
Sense Amp Sense Amp
…
…
W/L
Row Decoder
Page N-2 WLN-2
Page Page Page … Page Page Page Page … Page
0 1 2 N-1 0 1 2 N-1
Block 2 Block 3
Page 2 WL2
Block 0 Block 1 Page 1 WL1
B/L
Sense Amp Sense Amp Page 0 WL0
Peripheral Circuit (Column Decoder)
…
Data Spare
NAND Flash Overview.6
Jihong Kim (SNU)
Increasing NAND Capacity: Scaling
x2 Scaling
Flash Cell
0 00 01
1 10 11
Single-Level Cell Multi-Level Cell
(SLC) (MLC)
10
0
Double density 00
01
1
11
Single Level Memory Cell (SLC) Multi-Level Memory Cell (MLC)
In order to reduce the bit per cost (or acquire the high capacity),
multi-level cell technology is introduced
Vth
slow cell medium cell fast cell
Select
WL level
(VSEL) VREAD
# of cells
On Off
Vth
15
NAND Flash Overview.15
Jihong Kim (SNU)
NAND Operation – Erase
CG CG
0V e- e- e- e- e- e- 0V float FG float
e- e- e- e- e- e-
Vsub (0V) Vsub (>20V)
• Data Retention
• NAND Endurance
• Read Disturbs
Data Retention
1 Year at 30 °C?
Read Disturb Problem
• Read disturb occurs when a page is read in a block
Block 0
1111111 1111111 Read 1111111
1111111 1111111 1111111
1111000 Read 1111000 1111000
0000000 0000000 0000000 Read
Read Disturb
Data corruption
1111111 1111110
1111111 1111111
1111000 1111000
0000000 Read 0000000 Read
No
flow !!
CG
FG # of error pages
Program Erase
Error probability
# of cell
VREAD
“Unexpected disturb errors”
CG
FG e-
# of cell
e- e- e- e- e-
Endurance
∑∆𝑾𝒗𝒕𝒉
Perfor-
mance NAND Retention
Vth
Flash
Margin
Memory ∆𝑾𝒗𝒕𝒉
∆𝑾𝒗𝒕𝒉
Read
Capacity
Disturb
Tuning
Control
24 / 21
Write Performance vs. Retention
Normal write
1 0 1 1 0 1 0 1 1 1 0 0 0 1 1 1
1 0 1 1 0 1 0 1 1 1 0 0 0 1 1 1
Slow write
1 0 1 1 0 1 0 1 1 1 0 0 0 1 1 1
25
Capacity vs. Write Performance
What happens in a NAND page-write
1 0 1 1 0 1 0 1 1 1 0 0 0 1 1 1
00 01 10 11 2) Multi-step writing
(e.g., ISPP – Incremental Step Pulse Program)
26
FTL: Address Mapping
Techniques
Part 1
Jihong Kim
Dept. of CSE, SNU
Contents
• Introduction
• Page-level Mapping
• Block-level Mapping
• Replacement Block Scheme
• Hybrid Mapping
Applications
Operating Systems
mapping table
Block 3
f 1 3
mapping table f
f Block 3
12 3 update
1024 4
LBA address
Block 1
a
d 3 b
c
d
Block 2
f
g
Block-level h
mapping table
Block 3
d 1
LBA address e
Block 1
a
d 3 b
c
d
Invalid Block 2
f
copy g
Block-level ah
mapping table
Block 3
d 31 a
update b
c
d
update
block#
free blocks
Block 2
f
Block-level g
ah
mapping table
Block 3
d 3 a
update b
c
d
update
free blocks
1
2
3
Invalid 3
4
Invalid Invalid
4 4
Write! valid
Data is written
valid to
valid
the log block
valid
valid
valid valid
valid
valid
valid valid
Free blocks
FTL Mapping Part 1 (Jihong Kim/SNU) 27
BAST
• Merge Operation (2)
– Partial merge
Data Block Data
Log Block
valid
valid
valid
valid
valid
valid
valid
valid
Free blocks
FTL Mapping Part 1 (Jihong Kim/SNU) 28
BAST
• Merge Operation (3)
– Switch merge
Data Block Data
Log Block
Block
valid
valid
valid
valid
valid
valid
valid
valid
Free blocks
FTL Mapping Part 1 (Jihong Kim/SNU) 29
BAST
• Good performance in sequential write
• But, frequent merge operation
– In random write patterns
– In complicated application
• Chiang, M., Lee, P., and Chang, R. “Using data clustering to improve cleaning performance for
flash memory,” Softw. Pract. Exper., vol. 29, pp. 267-290, 1999.
• Kim, H., and Lee, S. “A New Flash Memory Management for Flash Storage System,” 23rd
International Computer Software and Applications Conference, 1999.
• Gal, E., and Toledo, S. “Algorithms and data structures for flash memories,” ACM Comput.
Surv., vol. 37, pp. 138-163, 2005.
• H. Kim et al, “BPLRU: A Buffer Management Scheme for Improving Random Writes in Flash
Storage,” Proceedings of the 6th USENIX Conference on File and Storage Technologies, 2008.