• Save
Flash memory
Upcoming SlideShare
Loading in...5
×
 

Flash memory

on

  • 753 views

Flash memory — how it works, and how we use it from Linux, SSDs and ‘real’ flash file systems

Flash memory — how it works, and how we use it from Linux, SSDs and ‘real’ flash file systems

Statistics

Views

Total Views
753
Views on SlideShare
733
Embed Views
20

Actions

Likes
0
Downloads
0
Comments
1

2 Embeds 20

http://www.ustudy.in 15
http://ustudy.in 5

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • sir please sen this ppt to mail id is hrsunil1234@gmail.com
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Flash memory Flash memory Presentation Transcript

  • Flash Memory David Woodhouse david@woodhou.se Kernel Recipes September 2012Software and Services Group
  • Overview• What is flash?• What makes flash “special”?• How to use flash effectively... and safely• Flash Translation Layers• Other approaches• Linux support for flash Software and Services Group 2 2
  • The flash cell Diagram © Wikipedia user Cyferz CC BY-SA 3.0Source Bit Line Line Word Line Control Gate Floating Gate N P N Software and Services Group 3 3 View slide
  • NOR flash Diagram © Wikipedia user Cyferz CC BY-SA 3.0 Bit LineN N, GND N N, GND N N, GND N P Software and Services Group 4 4 View slide
  • NAND flash Diagram © Wikipedia user Cyferz CC BY-SA 3.0 Bit LineN N N N N N N N N N N P Software and Services Group 5 5
  • NAND flash: one string I/O Software and Services Group 6 6
  • NAND flash: one eraseblock Page I/O I/O16896 bits per page I/O(2048 bytes + 64 bytes) I/O 64 pages per eraseblock Software and Services Group 7 7
  • Data loss on flash• Charge loss over time• Charge builds up in insulator• Write disturb• Read disturb Software and Services Group 8 8
  • Programming NAND flash Other Programmed Other Page Page Page +10V +20V +10V+10V I/O 0V I/O+10V I/O 0V I/O Programmed cells Software and Services Group 9 9
  • Write disturb Other Programmed Other Page Page Page +10V +20V +10V+10V I/O 0V I/O+10V I/O 0V I/O Disturbed cells Software and Services Group 10 10
  • Read disturb Other Read Other Page Page Page +5V 0V +5V0V I/O0V I/O0V I/O0V I/O Disturbed cells Software and Services Group 11 11
  • Single Level CellVoltage Distribution of 0-level cells Vt – threshold voltage Distribution of 1-level cells Software and Services Group 12 12
  • Multi Level CellVoltage Distribution of (0,0) cells Distribution of (1,0) cells Distribution of (0,1) cells Distribution of (1,1) cells Software and Services Group 13 13
  • NAND electrical interface CE RE WEAddress Latch Enable (ALE)Command Latch Enable (CLE) NAND Ready/Busy (R/B) chip D0-7 Software and Services Group 14 14
  • Coping with flash• Error correction (ECC)• Bad block management• Programming pages sequentially• Garbage collection• Wear levelling• Paired pages? Software and Services Group 15 15
  • Flash Translation Layers12345678 Software and Services Group 16 16
  • Flash Translation Layers1 12 23 34 45 chain 56 67 78 8 Write sectors 1-4 Software and Services Group 17 17
  • Flash Translation Layers1 1 12 2 23 3 34 4 45 chain 5 chain 56 6 67 7 78 8 8 Write sectors 2, 4, 6 Software and Services Group 18 18
  • Flash Translation Layers1 1 12 2 23 3 34 4 45 chain 5 chain 56 6 67 7 78 8 8“Fold” chain into its final block Software and Services Group 19 19
  • Flash Translation Layers 1 1 2 2 3 3 4 4 5 chain 5 6 6 7 7 8 8Erase previous blocks in chain Software and Services Group 20 20
  • Flash Translation Layers 1 2 3 4 5 6 7 8Erase previous blocks in chain Software and Services Group 21 21
  • TRIM1 1 12 2 23 3 34 4 45 chain 5 chain 56 6 67 7 78 8 8 Software and Services Group 22 22
  • TRIM1 1 12 2 23 3 34 4 45 chain 5 chain 56 6 67 7 78 8 8 TRIM sectors 1, 3 Software and Services Group 23 23
  • TRIM1 1 12 2 23 3 34 4 45 chain 5 chain 56 6 67 7 78 8 8“Fold” chain into its final block Software and Services Group 24 24
  • TRIM 1 1 2 2 3 3 4 4 5 chain 5 6 6 7 7 8 8Erase previous blocks in chain Software and Services Group 25 25
  • TRIM 1 2 3 4 5 6 7 8Erase previous blocks in chain Software and Services Group 26 26
  • An alternative Flash Translation Layer Sect #1 Sect #2 Software and Services Group 27 27
  • An alternative Flash Translation Layer Sect #1 Sect #2 Sect #1 Sect #2 Sect #3 Sect #4 Software and Services Group 28 28
  • An alternative Flash Translation Layer Sect #1 Sect #2 Sect #1 Sect #2 Sect #3 Sect #4 Sect #2 Sect #4 Sect #6 Software and Services Group 29 29
  • File system on top of file system• Efficiency – Hard to optimise for opaque lower file system – Missed garbage collection opportunity – Real file system knows more about data longevity – Real file system knows about transactions• Reliability – Closed source file system implementation – No access to underlying medium for fsck / recovery – Often just implemented badly Software and Services Group 30 30
  • MTD support in Linux• Synchronous read/write• Asynchronous erase• ECC for NAND• Bad Block management Software and Services Group 31 31
  • UBI http://www.linux-mtd.infradead.org/doc/ubidesign/ubidesign.pdf• Static volumes – Atomically overwritable – Wear levelled – CRC protected• Dynamic volumes – Writable flash – Simple logical <-> physical mapping – Deferred erase (unmap) – Scrubbing Software and Services Group 32 32
  • Ideal hardware wish list• Fast queued DMA transfers• Full error correction in hardware – With reporting of corrected errors – Scrubbing• Page copy Software and Services Group 33 33
  • Questions? Software and Services Group 34 34