Flash Translation Layers III - AndroBenchcsl.skku.edu/uploads/ICE3028S14/6-ftl3.pdf ·...

26
Jin-Soo Kim ([email protected]) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Flash Translation Layers III

Transcript of Flash Translation Layers III - AndroBenchcsl.skku.edu/uploads/ICE3028S14/6-ftl3.pdf ·...

Page 1: Flash Translation Layers III - AndroBenchcsl.skku.edu/uploads/ICE3028S14/6-ftl3.pdf · 2014-04-12 · ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim (jinsookim@skku.edu)

Jin-Soo Kim ([email protected])

Computer Systems Laboratory

Sungkyunkwan University

http://csl.skku.edu

Flash Translation

Layers III

Page 2: Flash Translation Layers III - AndroBenchcsl.skku.edu/uploads/ICE3028S14/6-ftl3.pdf · 2014-04-12 · ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim (jinsookim@skku.edu)

ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim ([email protected]) 2

Contents

▪ Superblock FTL

▪ DFTL

▪ μ-FTL

Page 3: Flash Translation Layers III - AndroBenchcsl.skku.edu/uploads/ICE3028S14/6-ftl3.pdf · 2014-04-12 · ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim (jinsookim@skku.edu)

Superblock FTL

Reference: Superblock FTL: A Superblock-based Flash Translation Layer with a Hybrid Address Translation Scheme

Page 4: Flash Translation Layers III - AndroBenchcsl.skku.edu/uploads/ICE3028S14/6-ftl3.pdf · 2014-04-12 · ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim (jinsookim@skku.edu)

ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim ([email protected]) 4

Superblock FTL

▪ A superblock shares log blocks

▪ Up to M log blocks per superblock

▪ Block mapping at the superblock level, Page mapping within a superblock

▪ Hot/cold pages separation

▪ Map cache

▪ The amount of mapping information increased

Page 5: Flash Translation Layers III - AndroBenchcsl.skku.edu/uploads/ICE3028S14/6-ftl3.pdf · 2014-04-12 · ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim (jinsookim@skku.edu)

ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim ([email protected]) 5

Example

▪ W = <{1,2}, {8}, {1,2}, {12}, {13}, {9}>

• Write ({1,2}, AB)

• Write ({8}, C)

• Write ({1,2}, DE)

• Write ({12}, F)

• Write ({13}, G)

• Write ({9}, H)

0 1 2 3

4 5 6 7

8 9 10 11

12 13 14 15

Data blocks

LPN 0 LPN 1 LPN 2 LPN 3 LPN 4 LPN 5 LPN 6 LPN 7

LPN 8 LPN 9 LPN 10 LPN 11 LPN 12 LPN 13 LPN 14 LPN 15

A B D E

Log blocks

C F G H

LSBN 0 LSBN 1

Page 6: Flash Translation Layers III - AndroBenchcsl.skku.edu/uploads/ICE3028S14/6-ftl3.pdf · 2014-04-12 · ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim (jinsookim@skku.edu)

ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim ([email protected]) 6

Mapping Information

▪ PGD (Page Global Directory)

▪ PMD (Page Middle Directory)

▪ PTE (Page Table Entry)

Page 7: Flash Translation Layers III - AndroBenchcsl.skku.edu/uploads/ICE3028S14/6-ftl3.pdf · 2014-04-12 · ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim (jinsookim@skku.edu)

ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim ([email protected]) 7

Comparison

ANAND Log block scheme

FAST Superblock

FTL Page

mapping

Data blocks

Terminology Data blocks Data blocks Data blocks D-blocks Data blocks

Management scheme

In-order In-order In-order Out-of-order Out-of-order

The degree of sharing

1 1 1 Min(P, S) P

Update blocks

Terminology Replacement

blocks Log blocks

Sequential / random log

blocks U-blocks

Update blocks

Management scheme

In-order Out-of-order Out-of-order Out-of-order Out-of-order

The degree of sharing

1 1 1 (sequential) or P (random)

Min(P, S) P

Page 8: Flash Translation Layers III - AndroBenchcsl.skku.edu/uploads/ICE3028S14/6-ftl3.pdf · 2014-04-12 · ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim (jinsookim@skku.edu)

DFTL

Reference: DFTL: A Flash Translation Layer Employing Demand-based Selective Caching of Page-level Address Mappings

Page 9: Flash Translation Layers III - AndroBenchcsl.skku.edu/uploads/ICE3028S14/6-ftl3.pdf · 2014-04-12 · ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim (jinsookim@skku.edu)

ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim ([email protected]) 9

DFTL

▪ Page mapping

▪ Keeps full mapping on flash to reduce SRAM use

▪ Demand-based selective caching of page-level address mappings in SRAM

▪ Exploits temporal locality in workloads

▪ Data pages vs. Translation pages

Page 10: Flash Translation Layers III - AndroBenchcsl.skku.edu/uploads/ICE3028S14/6-ftl3.pdf · 2014-04-12 · ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim (jinsookim@skku.edu)

ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim ([email protected]) 10

DFTL Architecture

Page 11: Flash Translation Layers III - AndroBenchcsl.skku.edu/uploads/ICE3028S14/6-ftl3.pdf · 2014-04-12 · ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim (jinsookim@skku.edu)

ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim ([email protected]) 11

DFTL Example

▪ Read request to DLPN 1280

(512 mappings/ translation page)

Page 12: Flash Translation Layers III - AndroBenchcsl.skku.edu/uploads/ICE3028S14/6-ftl3.pdf · 2014-04-12 · ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim (jinsookim@skku.edu)

ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim ([email protected]) 12

Garbage Collection

▪ Current data block: updated data pages

▪ Current translation block: updated translation pages

▪ GC invoked if the number of free blocks < GC_threshold

▪ Selecting a victim block: simple cost-benefit policy

Page 13: Flash Translation Layers III - AndroBenchcsl.skku.edu/uploads/ICE3028S14/6-ftl3.pdf · 2014-04-12 · ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim (jinsookim@skku.edu)

μ-FTL

Reference: μ-FTL: A Memory-efficient Flash Translation Layer Supporting Multiple Mapping Granularities

Page 14: Flash Translation Layers III - AndroBenchcsl.skku.edu/uploads/ICE3028S14/6-ftl3.pdf · 2014-04-12 · ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim (jinsookim@skku.edu)

ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim ([email protected]) 14

μ-FTL

▪ Minimally-updated FTL

▪ Supports multiple mapping granularities

• Based on extents

• Reduce the amount of mapping information

▪ Requires more sophisticated index structure

• μ-Tree is used to store the mapping info.

▪ Tunable memory footprint

• Frequently accessed mapping info. cached

Page 15: Flash Translation Layers III - AndroBenchcsl.skku.edu/uploads/ICE3028S14/6-ftl3.pdf · 2014-04-12 · ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim (jinsookim@skku.edu)

ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim ([email protected]) 15

Example

▪ W = <{1}, {2}, {8}, {1}, {2}, {12,13}, {9}>

• write ({1}, A)

• write ({2}, B)

• write ({8}, C)

• write ({1}, D)

• write ({2}, E)

• write ({12,13}, FG)

• write ({9}, H)

0 1 2 3

4 5 6 7

8 9 12 13

10 11 14 15

Data blocks

LPN 0, 1 LPN 1, 1 LPN 2, 1 LPN 3, 1 LPN 4, 4 LPN 8, 1 LPN 9, 1

LPN 10, 2 LPN 12, 2 LPN 14, 2

A B C D

Log blocks

E F G H

Page 16: Flash Translation Layers III - AndroBenchcsl.skku.edu/uploads/ICE3028S14/6-ftl3.pdf · 2014-04-12 · ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim (jinsookim@skku.edu)

ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim ([email protected]) 16

μ-FTL Architecture

Write

Bitmap Cache μ-Tree

Cache

Partition 1

Partition 2

Partition 3

Partition 4 μ-Tree

Free block list

Data

Extent update

Bitmap update

Bitmap update flush

Cache full

Cache miss

Page 17: Flash Translation Layers III - AndroBenchcsl.skku.edu/uploads/ICE3028S14/6-ftl3.pdf · 2014-04-12 · ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim (jinsookim@skku.edu)

ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim ([email protected]) 17

Conclusion

▪ Garbage collection issues

▪ Mapping information management issues

▪ Platform-dependent issues

0%

10%

20%

30%

40%

50%

60%

70%

80%

90%

100%

Rela

tive O

verh

ead

Mapping

GCExtra

GCBase

Write

Page 18: Flash Translation Layers III - AndroBenchcsl.skku.edu/uploads/ICE3028S14/6-ftl3.pdf · 2014-04-12 · ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim (jinsookim@skku.edu)

CAFTL (Content-Aware FTL)

Reference: CAFTL - A Content-Aware FTL Enhancing the Lifespan of Flash Memory based Solid State Drives (2011)

Page 19: Flash Translation Layers III - AndroBenchcsl.skku.edu/uploads/ICE3028S14/6-ftl3.pdf · 2014-04-12 · ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim (jinsookim@skku.edu)

ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim ([email protected]) 19

CAFTL

▪ Deduplication

• Reduce write traffic to flash memory by removing unnecessary duplicate writes

Page 20: Flash Translation Layers III - AndroBenchcsl.skku.edu/uploads/ICE3028S14/6-ftl3.pdf · 2014-04-12 · ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim (jinsookim@skku.edu)

ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim ([email protected]) 20

Identifying duplicate blocks

▪ Fingerprint

• Byte-by-byte comparison is slow

• Identify duplicate blocks by comparing SHA-1 hash values

▪ Fingerprint Store

• Store and search in the most likely-to-be-duplicated fingerprints

Page 21: Flash Translation Layers III - AndroBenchcsl.skku.edu/uploads/ICE3028S14/6-ftl3.pdf · 2014-04-12 · ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim (jinsookim@skku.edu)

ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim ([email protected]) 21

Architecture

Page 22: Flash Translation Layers III - AndroBenchcsl.skku.edu/uploads/ICE3028S14/6-ftl3.pdf · 2014-04-12 · ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim (jinsookim@skku.edu)

ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim ([email protected]) 22

Two-level indirect mapping

H Z L R

Flash Memory

LPN 0 LPN 1 LPN 2 LPN 3 LPN 4 LPN 5 LPN 6 LPN 7 LPN 8 LPN 9 LPN 10 LPN 11 LPN 12 LPN 13 LPN 14 LPN 15

Primary Map

Secondary Map

F A E T

C B I

W

L L C T

W R B Z

Flash Memory

LPN 0 LPN 1 LPN 2 LPN 3 LPN 4 LPN 5 LPN 6 LPN 7 LPN 8 LPN 9 LPN 10 LPN 11 LPN 12 LPN 13 LPN 14 LPN 15

Mapping Table

A F T I

T F E H

VPN 0 VPN 1 VPN 2 VPN 3 VPN 4 VPN 5

Conventional FTL CAFTL

Page 23: Flash Translation Layers III - AndroBenchcsl.skku.edu/uploads/ICE3028S14/6-ftl3.pdf · 2014-04-12 · ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim (jinsookim@skku.edu)

ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim ([email protected]) 23

▪ W = <{1}, {2}, {0}, {11}, {4}, {7}>

• write ({1}, F)

• write ({2}, F)

• write ({0}, A)

• write ({11}, E)

Example (1)

Flash Memory

LPN 0 LPN 1 LPN 2 LPN 3 LPN 4 LPN 5 LPN 6 LPN 7 LPN 8 LPN 9 LPN 10 LPN 11 LPN 12 LPN 13 LPN 14 LPN 15

Primary Map

Secondary Map

F A E

VPN 0 VPN 1 VPN 2 VPN 3 VPN 4 VPN 5

Page 24: Flash Translation Layers III - AndroBenchcsl.skku.edu/uploads/ICE3028S14/6-ftl3.pdf · 2014-04-12 · ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim (jinsookim@skku.edu)

ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim ([email protected]) 24

▪ W = <{1}, {2}, {0}, {11}, {4}, {7}>

• write ({1}, F)

• write ({2}, F)

• write ({0}, A)

• write ({11}, E)

• write ({4}, T)

Example (2)

Flash Memory

LPN 0 LPN 1 LPN 2 LPN 3 LPN 4 LPN 5 LPN 6 LPN 7 LPN 8 LPN 9 LPN 10 LPN 11 LPN 12 LPN 13 LPN 14 LPN 15

Primary Map

Secondary Map

F A E T

VPN 0 VPN 1 VPN 2 VPN 3 VPN 4 VPN 5

Page 25: Flash Translation Layers III - AndroBenchcsl.skku.edu/uploads/ICE3028S14/6-ftl3.pdf · 2014-04-12 · ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim (jinsookim@skku.edu)

ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim ([email protected]) 25

▪ W = <{1}, {2}, {0}, {11}, {4}, {7}>

• write ({1}, F)

• write ({2}, F)

• write ({0}, A)

• write ({11}, E)

• write ({4}, T)

• write ({7}, T)

Example (3)

Flash Memory

LPN 0 LPN 1 LPN 2 LPN 3 LPN 4 LPN 5 LPN 6 LPN 7 LPN 8 LPN 9 LPN 10 LPN 11 LPN 12 LPN 13 LPN 14 LPN 15

Primary Map

Secondary Map

F A E T

VPN 0 VPN 1 VPN 2 VPN 3 VPN 4 VPN 5

Page 26: Flash Translation Layers III - AndroBenchcsl.skku.edu/uploads/ICE3028S14/6-ftl3.pdf · 2014-04-12 · ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim (jinsookim@skku.edu)

ICE3028: Embedded Systems Design (Spring 2014) – Jin-Soo Kim ([email protected]) 26

Performance Evaluation