SlideShare una empresa de Scribd logo
1 de 34
Flash Memory
      David Woodhouse
                  david@woodhou.se




                    Kernel Recipes
                  September 2012


Software 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.0




Source                          Bit
 Line                          Line



            Word Line
           Control Gate

           Floating Gate


   N            P             N




                           Software and Services Group                    3
                                                                          3
NOR flash
                                             Diagram © Wikipedia user 'Cyferz'
                                                               CC BY-SA 3.0




                                                                Bit Line




N   N, GND   N      N, GND       N         N, GND           N
                      P




                             Software and Services Group                    4
                                                                            4
NAND flash
                                         Diagram © Wikipedia user 'Cyferz'
                                                           CC BY-SA 3.0


                                                          Bit Line




N   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/O
16896 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                  +5V



0V                                                        I/O


0V                                                        I/O


0V                                                        I/O




0V                                                        I/O


              Disturbed cells

                            Software and Services Group         11
                                                                11
Single Level Cell

Voltage


               Distribution of 0-level cells

             Vt – threshold voltage


               Distribution of 1-level cells




                     Software and Services Group   12
                                                   12
Multi Level Cell

Voltage

                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 WE


Address 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 Layers


1
2
3
4
5
6
7
8




                   Software and Services Group   16
                                                 16
Flash Translation Layers


1             1
2             2
3             3
4             4
5     chain   5
6             6
7             7
8             8



         Write sectors 1-4

                    Software and Services Group   17
                                                  17
Flash Translation Layers


1             1                  1
2             2                  2
3             3                  3
4             4                  4
5     chain   5    chain         5
6             6                  6
7             7                  7
8             8                  8



      Write sectors 2, 4, 6

                    Software and Services Group   18
                                                  18
Flash Translation Layers


1             1                  1
2             2                  2
3             3                  3
4             4                  4
5     chain   5    chain         5
6             6                  6
7             7                  7
8             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                  8



Erase previous blocks in chain

                  Software and Services Group   20
                                                20
Flash Translation Layers


                               1
                               2
                               3
                               4
                               5
                               6
                               7
                               8



Erase previous blocks in chain

                  Software and Services Group   21
                                                21
TRIM


1           1                   1
2           2                   2
3           3                   3
4           4                   4
5   chain   5   chain           5
6           6                   6
7           7                   7
8           8                   8




                   Software and Services Group   22
                                                 22
TRIM


1           1                   1
2           2                   2
3           3                   3
4           4                   4
5   chain   5   chain           5
6           6                   6
7           7                   7
8           8                   8



     TRIM sectors 1, 3

                   Software and Services Group   23
                                                 23
TRIM


1             1                   1
2             2                   2
3             3                   3
4             4                   4
5    chain    5    chain          5
6             6                   6
7             7                   7
8             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                   8



Erase previous blocks in chain

                   Software and Services Group   25
                                                 25
TRIM


                                1
                                2
                                3
                                4
                                5
                                6
                                7
                                8



Erase 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

Más contenido relacionado

La actualidad más candente

Emerging Non-Volatile Memory 2020 report by Yole Développement
Emerging Non-Volatile Memory 2020 report by Yole DéveloppementEmerging Non-Volatile Memory 2020 report by Yole Développement
Emerging Non-Volatile Memory 2020 report by Yole DéveloppementYole Developpement
 
ssd vs hdd infographic
ssd vs hdd infographicssd vs hdd infographic
ssd vs hdd infographicAnnie Jones
 
Chiplets in Data Centers
Chiplets in Data CentersChiplets in Data Centers
Chiplets in Data CentersODSA Workgroup
 
Enabling POWER 8 advanced features on Linux
Enabling POWER 8 advanced features on LinuxEnabling POWER 8 advanced features on Linux
Enabling POWER 8 advanced features on LinuxSebastien Chabrolles
 
eMMC Embedded Multimedia Card overview
eMMC Embedded Multimedia Card overvieweMMC Embedded Multimedia Card overview
eMMC Embedded Multimedia Card overviewVijayGESYS
 
Pc PinOuts EasyPCOnline
Pc PinOuts EasyPCOnlinePc PinOuts EasyPCOnline
Pc PinOuts EasyPCOnlineNeil Farley
 
Universal Flash Storage
Universal Flash StorageUniversal Flash Storage
Universal Flash StorageBhaumik Bhatt
 
2019 Local I/O ESD protection for 28Gbps to 112Gbps SerDes interfaces in adva...
2019 Local I/O ESD protection for 28Gbps to 112Gbps SerDes interfaces in adva...2019 Local I/O ESD protection for 28Gbps to 112Gbps SerDes interfaces in adva...
2019 Local I/O ESD protection for 28Gbps to 112Gbps SerDes interfaces in adva...Sofics
 
Semiconductor memories
Semiconductor memoriesSemiconductor memories
Semiconductor memoriesSambitShreeman
 
Solid State Drives - Seminar for Computer Engineering Semester 6 - VIT,Univer...
Solid State Drives - Seminar for Computer Engineering Semester 6 - VIT,Univer...Solid State Drives - Seminar for Computer Engineering Semester 6 - VIT,Univer...
Solid State Drives - Seminar for Computer Engineering Semester 6 - VIT,Univer...ravipbhat
 
DRAM Cell - Working and Read and Write Operations
DRAM Cell - Working and Read and Write OperationsDRAM Cell - Working and Read and Write Operations
DRAM Cell - Working and Read and Write OperationsNaman Bhalla
 

La actualidad más candente (20)

Emerging Non-Volatile Memory 2020 report by Yole Développement
Emerging Non-Volatile Memory 2020 report by Yole DéveloppementEmerging Non-Volatile Memory 2020 report by Yole Développement
Emerging Non-Volatile Memory 2020 report by Yole Développement
 
Lpc1768
Lpc1768Lpc1768
Lpc1768
 
DDR3
DDR3DDR3
DDR3
 
ssd vs hdd infographic
ssd vs hdd infographicssd vs hdd infographic
ssd vs hdd infographic
 
Chiplets in Data Centers
Chiplets in Data CentersChiplets in Data Centers
Chiplets in Data Centers
 
Enabling POWER 8 advanced features on Linux
Enabling POWER 8 advanced features on LinuxEnabling POWER 8 advanced features on Linux
Enabling POWER 8 advanced features on Linux
 
eMMC Embedded Multimedia Card overview
eMMC Embedded Multimedia Card overvieweMMC Embedded Multimedia Card overview
eMMC Embedded Multimedia Card overview
 
Pc PinOuts EasyPCOnline
Pc PinOuts EasyPCOnlinePc PinOuts EasyPCOnline
Pc PinOuts EasyPCOnline
 
Universal Flash Storage
Universal Flash StorageUniversal Flash Storage
Universal Flash Storage
 
Pcie basic
Pcie basicPcie basic
Pcie basic
 
AVR ATmega32
AVR ATmega32AVR ATmega32
AVR ATmega32
 
Dr.s.shiyamala fpga ppt
Dr.s.shiyamala  fpga pptDr.s.shiyamala  fpga ppt
Dr.s.shiyamala fpga ppt
 
2019 Local I/O ESD protection for 28Gbps to 112Gbps SerDes interfaces in adva...
2019 Local I/O ESD protection for 28Gbps to 112Gbps SerDes interfaces in adva...2019 Local I/O ESD protection for 28Gbps to 112Gbps SerDes interfaces in adva...
2019 Local I/O ESD protection for 28Gbps to 112Gbps SerDes interfaces in adva...
 
Flash memory
Flash memoryFlash memory
Flash memory
 
Pci express technology 3.0
Pci express technology 3.0Pci express technology 3.0
Pci express technology 3.0
 
Semiconductor memories
Semiconductor memoriesSemiconductor memories
Semiconductor memories
 
Usb
UsbUsb
Usb
 
Solid State Drives - Seminar for Computer Engineering Semester 6 - VIT,Univer...
Solid State Drives - Seminar for Computer Engineering Semester 6 - VIT,Univer...Solid State Drives - Seminar for Computer Engineering Semester 6 - VIT,Univer...
Solid State Drives - Seminar for Computer Engineering Semester 6 - VIT,Univer...
 
Flash Memory
Flash MemoryFlash Memory
Flash Memory
 
DRAM Cell - Working and Read and Write Operations
DRAM Cell - Working and Read and Write OperationsDRAM Cell - Working and Read and Write Operations
DRAM Cell - Working and Read and Write Operations
 

Similar a Flash memory

Learn OpenStack from trystack.cn ——Folsom in practice
Learn OpenStack from trystack.cn  ——Folsom in practiceLearn OpenStack from trystack.cn  ——Folsom in practice
Learn OpenStack from trystack.cn ——Folsom in practiceOpenCity Community
 
OpenStack and OpenFlow Demos
OpenStack and OpenFlow DemosOpenStack and OpenFlow Demos
OpenStack and OpenFlow DemosBrent Salisbury
 
Software Defined Data Centers - June 2012
Software Defined Data Centers - June 2012Software Defined Data Centers - June 2012
Software Defined Data Centers - June 2012Brent Salisbury
 
Xensummit2009 Io Virtualization Performance
Xensummit2009 Io Virtualization PerformanceXensummit2009 Io Virtualization Performance
Xensummit2009 Io Virtualization PerformanceThe Linux Foundation
 
Edge optical transceivers
Edge optical transceiversEdge optical transceivers
Edge optical transceiversEDGEtech
 
Public Presentation, ASML EUV forecast Jul 2010
Public Presentation, ASML EUV forecast Jul 2010Public Presentation, ASML EUV forecast Jul 2010
Public Presentation, ASML EUV forecast Jul 2010JVervoort
 
Traffic Management, DPI, Internet Offload Gateway
Traffic Management, DPI, Internet Offload GatewayTraffic Management, DPI, Internet Offload Gateway
Traffic Management, DPI, Internet Offload GatewayContinuous Computing
 
C3 Citrix Cloud Center
C3 Citrix Cloud CenterC3 Citrix Cloud Center
C3 Citrix Cloud CenterRui Lopes
 
Virtual Network Performance Challenge
Virtual Network Performance ChallengeVirtual Network Performance Challenge
Virtual Network Performance ChallengeStephen Hemminger
 
Acceleration for big data, hadoop and memcached it168文库
Acceleration for big data, hadoop and memcached it168文库Acceleration for big data, hadoop and memcached it168文库
Acceleration for big data, hadoop and memcached it168文库Accenture
 
Acceleration for big data, hadoop and memcached it168文库
Acceleration for big data, hadoop and memcached it168文库Acceleration for big data, hadoop and memcached it168文库
Acceleration for big data, hadoop and memcached it168文库Accenture
 
Cisco open network environment
Cisco open network environmentCisco open network environment
Cisco open network environmentdeepers
 
New Networking Technology Survey & Analysis
New Networking Technology Survey & AnalysisNew Networking Technology Survey & Analysis
New Networking Technology Survey & AnalysisIT Brand Pulse
 

Similar a Flash memory (20)

Learn OpenStack from trystack.cn ——Folsom in practice
Learn OpenStack from trystack.cn  ——Folsom in practiceLearn OpenStack from trystack.cn  ——Folsom in practice
Learn OpenStack from trystack.cn ——Folsom in practice
 
OpenStack and OpenFlow Demos
OpenStack and OpenFlow DemosOpenStack and OpenFlow Demos
OpenStack and OpenFlow Demos
 
Networking with Linux on System z
Networking with Linux on System zNetworking with Linux on System z
Networking with Linux on System z
 
Software Defined Data Centers - June 2012
Software Defined Data Centers - June 2012Software Defined Data Centers - June 2012
Software Defined Data Centers - June 2012
 
Xensummit2009 Io Virtualization Performance
Xensummit2009 Io Virtualization PerformanceXensummit2009 Io Virtualization Performance
Xensummit2009 Io Virtualization Performance
 
Windows Server 2012 Hyper-V Networking Evolved
Windows Server 2012 Hyper-V Networking Evolved Windows Server 2012 Hyper-V Networking Evolved
Windows Server 2012 Hyper-V Networking Evolved
 
Edge optical transceivers
Edge optical transceiversEdge optical transceivers
Edge optical transceivers
 
Asml Euv Use Forecast
Asml Euv Use ForecastAsml Euv Use Forecast
Asml Euv Use Forecast
 
Public Presentation, ASML EUV forecast Jul 2010
Public Presentation, ASML EUV forecast Jul 2010Public Presentation, ASML EUV forecast Jul 2010
Public Presentation, ASML EUV forecast Jul 2010
 
OpenStack Quantum
OpenStack QuantumOpenStack Quantum
OpenStack Quantum
 
XS Boston 2008 XenLoop
XS Boston 2008 XenLoopXS Boston 2008 XenLoop
XS Boston 2008 XenLoop
 
Traffic Management, DPI, Internet Offload Gateway
Traffic Management, DPI, Internet Offload GatewayTraffic Management, DPI, Internet Offload Gateway
Traffic Management, DPI, Internet Offload Gateway
 
C3 Citrix Cloud Center
C3 Citrix Cloud CenterC3 Citrix Cloud Center
C3 Citrix Cloud Center
 
Virtual Network Performance Challenge
Virtual Network Performance ChallengeVirtual Network Performance Challenge
Virtual Network Performance Challenge
 
Acceleration for big data, hadoop and memcached it168文库
Acceleration for big data, hadoop and memcached it168文库Acceleration for big data, hadoop and memcached it168文库
Acceleration for big data, hadoop and memcached it168文库
 
Acceleration for big data, hadoop and memcached it168文库
Acceleration for big data, hadoop and memcached it168文库Acceleration for big data, hadoop and memcached it168文库
Acceleration for big data, hadoop and memcached it168文库
 
1
11
1
 
Big Data Smarter Networks
Big Data Smarter NetworksBig Data Smarter Networks
Big Data Smarter Networks
 
Cisco open network environment
Cisco open network environmentCisco open network environment
Cisco open network environment
 
New Networking Technology Survey & Analysis
New Networking Technology Survey & AnalysisNew Networking Technology Survey & Analysis
New Networking Technology Survey & Analysis
 

Más de Anne Nicolas

Kernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream firstKernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream firstAnne Nicolas
 
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMIKernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMIAnne Nicolas
 
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelKernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelAnne Nicolas
 
Kernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are moneyKernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are moneyAnne Nicolas
 
Kernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and futureKernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and futureAnne Nicolas
 
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...Anne Nicolas
 
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary dataKernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary dataAnne Nicolas
 
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...Anne Nicolas
 
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and BareboxEmbedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and BareboxAnne Nicolas
 
Embedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less specialEmbedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less specialAnne Nicolas
 
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre SiliconEmbedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre SiliconAnne Nicolas
 
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) pictureEmbedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) pictureAnne Nicolas
 
Embedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops wayEmbedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops wayAnne Nicolas
 
Embedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmakerEmbedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmakerAnne Nicolas
 
Embedded Recipes 2019 - LLVM / Clang integration
Embedded Recipes 2019 - LLVM / Clang integrationEmbedded Recipes 2019 - LLVM / Clang integration
Embedded Recipes 2019 - LLVM / Clang integrationAnne Nicolas
 
Embedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debuggingEmbedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debuggingAnne Nicolas
 
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimediaEmbedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimediaAnne Nicolas
 
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all startedKernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all startedAnne Nicolas
 
Kernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDPKernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDPAnne Nicolas
 
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)Anne Nicolas
 

Más de Anne Nicolas (20)

Kernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream firstKernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream first
 
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMIKernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
 
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelKernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
 
Kernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are moneyKernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are money
 
Kernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and futureKernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and future
 
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
 
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary dataKernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
 
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
 
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and BareboxEmbedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
 
Embedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less specialEmbedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less special
 
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre SiliconEmbedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
 
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) pictureEmbedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
 
Embedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops wayEmbedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops way
 
Embedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmakerEmbedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmaker
 
Embedded Recipes 2019 - LLVM / Clang integration
Embedded Recipes 2019 - LLVM / Clang integrationEmbedded Recipes 2019 - LLVM / Clang integration
Embedded Recipes 2019 - LLVM / Clang integration
 
Embedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debuggingEmbedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debugging
 
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimediaEmbedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
 
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all startedKernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
 
Kernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDPKernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDP
 
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
 

Último

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 

Último (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

Flash memory

  • 1. Flash Memory David Woodhouse david@woodhou.se Kernel Recipes September 2012 Software and Services Group
  • 2. 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
  • 3. The flash cell Diagram © Wikipedia user 'Cyferz' CC BY-SA 3.0 Source Bit Line Line Word Line Control Gate Floating Gate N P N Software and Services Group 3 3
  • 4. NOR flash Diagram © Wikipedia user 'Cyferz' CC BY-SA 3.0 Bit Line N N, GND N N, GND N N, GND N P Software and Services Group 4 4
  • 5. NAND flash Diagram © Wikipedia user 'Cyferz' CC BY-SA 3.0 Bit Line N N N N N N N N N N N P Software and Services Group 5 5
  • 6. NAND flash: one string I/O Software and Services Group 6 6
  • 7. NAND flash: one eraseblock Page I/O I/O 16896 bits per page I/O (2048 bytes + 64 bytes) I/O 64 pages per eraseblock Software and Services Group 7 7
  • 8. Data loss on flash • Charge loss over time • Charge builds up in insulator • Write disturb • Read disturb Software and Services Group 8 8
  • 9. 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
  • 10. 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
  • 11. Read disturb Other Read Other Page Page Page +5V 0V +5V 0V I/O 0V I/O 0V I/O 0V I/O Disturbed cells Software and Services Group 11 11
  • 12. Single Level Cell Voltage Distribution of 0-level cells Vt – threshold voltage Distribution of 1-level cells Software and Services Group 12 12
  • 13. Multi Level Cell Voltage 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
  • 14. NAND electrical interface CE RE WE Address Latch Enable (ALE) Command Latch Enable (CLE) NAND Ready/Busy (R/B) chip D0-7 Software and Services Group 14 14
  • 15. Coping with flash • Error correction (ECC) • Bad block management • Programming pages sequentially • Garbage collection • Wear levelling • Paired pages? Software and Services Group 15 15
  • 16. Flash Translation Layers 1 2 3 4 5 6 7 8 Software and Services Group 16 16
  • 17. Flash Translation Layers 1 1 2 2 3 3 4 4 5 chain 5 6 6 7 7 8 8 Write sectors 1-4 Software and Services Group 17 17
  • 18. Flash Translation Layers 1 1 1 2 2 2 3 3 3 4 4 4 5 chain 5 chain 5 6 6 6 7 7 7 8 8 8 Write sectors 2, 4, 6 Software and Services Group 18 18
  • 19. Flash Translation Layers 1 1 1 2 2 2 3 3 3 4 4 4 5 chain 5 chain 5 6 6 6 7 7 7 8 8 8 “Fold” chain into its final block Software and Services Group 19 19
  • 20. Flash Translation Layers 1 1 2 2 3 3 4 4 5 chain 5 6 6 7 7 8 8 Erase previous blocks in chain Software and Services Group 20 20
  • 21. Flash Translation Layers 1 2 3 4 5 6 7 8 Erase previous blocks in chain Software and Services Group 21 21
  • 22. TRIM 1 1 1 2 2 2 3 3 3 4 4 4 5 chain 5 chain 5 6 6 6 7 7 7 8 8 8 Software and Services Group 22 22
  • 23. TRIM 1 1 1 2 2 2 3 3 3 4 4 4 5 chain 5 chain 5 6 6 6 7 7 7 8 8 8 TRIM sectors 1, 3 Software and Services Group 23 23
  • 24. TRIM 1 1 1 2 2 2 3 3 3 4 4 4 5 chain 5 chain 5 6 6 6 7 7 7 8 8 8 “Fold” chain into its final block Software and Services Group 24 24
  • 25. TRIM 1 1 2 2 3 3 4 4 5 chain 5 6 6 7 7 8 8 Erase previous blocks in chain Software and Services Group 25 25
  • 26. TRIM 1 2 3 4 5 6 7 8 Erase previous blocks in chain Software and Services Group 26 26
  • 27. An alternative Flash Translation Layer Sect #1 Sect #2 Software and Services Group 27 27
  • 28. An alternative Flash Translation Layer Sect #1 Sect #2 Sect #1 Sect #2 Sect #3 Sect #4 Software and Services Group 28 28
  • 29. 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
  • 30. 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
  • 31. MTD support in Linux • Synchronous read/write • Asynchronous erase • ECC for NAND • Bad Block management Software and Services Group 31 31
  • 32. 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
  • 33. 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
  • 34. Questions? Software and Services Group 34 34