CN113110799A - Controller and method for selecting victim blocks for wear leveling operations - Google Patents
Controller and method for selecting victim blocks for wear leveling operations Download PDFInfo
- Publication number
- CN113110799A CN113110799A CN202011035427.7A CN202011035427A CN113110799A CN 113110799 A CN113110799 A CN 113110799A CN 202011035427 A CN202011035427 A CN 202011035427A CN 113110799 A CN113110799 A CN 113110799A
- Authority
- CN
- China
- Prior art keywords
- block
- memory
- logical address
- candidate
- hot
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/004—Error avoidance
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0614—Improving the reliability of storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0614—Improving the reliability of storage systems
- G06F3/0616—Improving the reliability of storage systems in relation to life time, e.g. increasing Mean Time Between Failures [MTBF]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0751—Error or fault detection not based on redundancy
- G06F11/0754—Error or fault detection not based on redundancy by exceeding limits
- G06F11/076—Error or fault detection not based on redundancy by exceeding limits by exceeding a count or rate limit, e.g. word- or bit count limit
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/0223—User address space allocation, e.g. contiguous or non contiguous base addressing
- G06F12/023—Free address space management
- G06F12/0238—Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
- G06F12/0246—Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0877—Cache access modes
- G06F12/0882—Page mode
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/064—Management of blocks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0646—Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
- G06F3/0652—Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0655—Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
- G06F3/0658—Controller construction arrangements
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0679—Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0683—Plurality of storage devices
- G06F3/0688—Non-volatile semiconductor memory arrays
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11C—STATIC STORES
- G11C16/00—Erasable programmable read-only memories
- G11C16/02—Erasable programmable read-only memories electrically programmable
- G11C16/06—Auxiliary circuits, e.g. for writing into memory
- G11C16/10—Programming or data input circuits
- G11C16/14—Circuits for erasing electrically, e.g. erase voltage switching circuits
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11C—STATIC STORES
- G11C16/00—Erasable programmable read-only memories
- G11C16/02—Erasable programmable read-only memories electrically programmable
- G11C16/06—Auxiliary circuits, e.g. for writing into memory
- G11C16/10—Programming or data input circuits
- G11C16/14—Circuits for erasing electrically, e.g. erase voltage switching circuits
- G11C16/16—Circuits for erasing electrically, e.g. erase voltage switching circuits for erasing blocks, e.g. arrays, words, groups
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11C—STATIC STORES
- G11C16/00—Erasable programmable read-only memories
- G11C16/02—Erasable programmable read-only memories electrically programmable
- G11C16/06—Auxiliary circuits, e.g. for writing into memory
- G11C16/34—Determination of programming status, e.g. threshold voltage, overprogramming or underprogramming, retention
- G11C16/349—Arrangements for evaluating degradation, retention or wearout, e.g. by counting erase cycles
- G11C16/3495—Circuits or methods to detect or delay wearout of nonvolatile EPROM or EEPROM memory devices, e.g. by counting numbers of erase or reprogram cycles, by using multiple memory areas serially or cyclically
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2201/00—Indexing scheme relating to error detection, to error correction, and to monitoring
- G06F2201/88—Monitoring involving counting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/10—Providing a specific technical effect
- G06F2212/1032—Reliability improvement, data loss prevention, degraded operation etc
- G06F2212/1036—Life time enhancement
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/72—Details relating to flash memory management
- G06F2212/7201—Logical to physical mapping or translation of blocks or pages
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/72—Details relating to flash memory management
- G06F2212/7211—Wear leveling
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Quality & Reliability (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
The present disclosure relates to a method for operating a controller for controlling a memory device including a memory block, the method comprising: determining a candidate block based on an erase count of a memory block; determining a victim block among the candidate blocks based on data update counts of logical addresses associated with the plurality of pages of each of the candidate blocks; and moves the data of the victim block into the destination block.
Description
Cross Reference to Related Applications
This application claims priority to korean patent application No. 10-2020-0002093, filed on 9/1/2020, which is incorporated herein by reference in its entirety
Technical Field
Various embodiments of the present invention relate to a controller for controlling a memory device.
Background
The paradigm of computer environments has shifted towards pervasive computing, which enables computing systems to be used anytime and anywhere. Therefore, the use of portable electronic devices such as mobile phones, digital cameras, and laptop computers is rapidly increasing. These portable electronic devices typically use a memory system having one or more memory devices for storing data. The memory system may be used as a primary memory device or a secondary memory device for the portable electronic device.
Due to the absence of moving parts, memory systems offer advantages such as good stability and durability, fast information access speed, low power consumption, and the like. Examples of memory systems having these advantages include Universal Serial Bus (USB) memory devices, memory cards with various interfaces, and Solid State Drives (SSDs).
Disclosure of Invention
Embodiments of the present invention relate to a controller capable of efficiently performing a wear leveling operation and a method for operating the controller.
According to an embodiment of the present invention, a method for operating a controller for controlling a memory device including a memory block, the method includes: determining a candidate block based on an erase count of a memory block; determining a victim block in the candidate blocks based on data update counts of logical addresses associated with the plurality of pages of each of the candidate blocks; and moving the data of the victim block into the destination block.
According to another embodiment of the present invention, a controller for controlling a memory device including a plurality of memory blocks, the controller includes: a memory adapted to store an update count of data stored in the memory device for each logical address and to store an erase count for each memory block; and a Flash Translation Layer (FTL) adapted to determine one or more candidate blocks based on an erase count of the memory block, determine a victim block among the candidate blocks based on a data update count of logical addresses associated with a plurality of pages of each of the candidate blocks, and move data of the victim block into the destination block.
According to still another embodiment of the present invention, a memory system includes: a memory device comprising a plurality of memory blocks; and a controller, coupled to the plurality of memory blocks, adapted to: determining a candidate block of the plurality of memory blocks based on the erase count of each memory block; selecting a victim block of the candidate blocks based on the hot page count of each candidate block; and moves the data of the victim block into the destination block.
Drawings
FIG. 1 is a block diagram that schematically illustrates a data processing system that includes a controller, in accordance with an embodiment of the present invention.
Fig. 2 is a flowchart illustrating an operation of a controller according to an embodiment of the present invention.
Fig. 3 to 5 illustrate examples of operations of the controller according to the embodiment of the present invention.
Detailed Description
Various embodiments of the present invention are described in more detail below with reference to the accompanying drawings. This invention may, however, be embodied in different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art. Throughout this disclosure, like reference numerals refer to like parts in the various figures and embodiments. Moreover, references to "an embodiment," "another embodiment," and the like throughout this specification do not necessarily refer to only one embodiment, and different references to any such phrases do not necessarily refer to the same embodiment.
FIG. 1 is a block diagram illustrating a data processing system 100 according to an embodiment of the present invention.
Referring to FIG. 1, data processing system 100 may include a host 102 operably coupled to a memory system 110.
The host 102 may include any of a variety of portable electronic devices such as a mobile phone, an MP3 player, and a laptop computer, or any of a variety of non-portable electronic devices such as a desktop computer, a game console, a Television (TV), and a projector.
The memory system 110 is operable to store data of the host 102 in response to a request by the host 102. Non-limiting examples of memory system 110 include Solid State Drives (SSDs), multimedia cards (MMCs), Secure Digital (SD) cards, Universal Serial Bus (USB) devices, universal flash memory (UFS) devices, Compact Flash (CF) cards, Smart Media Cards (SMCs), Personal Computer Memory Card International Association (PCMCIA) cards, and memory sticks. The MMC may include an embedded MMC (emmc), a reduced size MMC (RS-MMC), and/or a micro MMC. The SD card may include a mini SD card and/or a micro SD card.
The controller 130 and the memory device 150 may be integrated into a single semiconductor device. For example, the controller 130 and the memory device 150 may be integrated into one semiconductor device to constitute a Solid State Drive (SSD). When the memory system 110 is used as an SSD, the operation speed of the host 102 connected to the memory system 110 can be increased. In addition, the controller 130 and the memory device 150 may be integrated into one semiconductor device to constitute a memory card, such as a Personal Computer Memory Card International Association (PCMCIA) card, a Compact Flash (CF) card, a Smart Media (SM) card, a memory stick, a multimedia card (MMC) including reduced-size MMC (RS-MMC) and a micro MMC, a Secure Digital (SD) card including a mini SD card, a micro SD card, and an SDHC card, or a Universal Flash (UFS) device.
Non-limiting application examples of the memory system 110 include a computer, an ultra mobile pc (umpc), a workstation, a netbook, a Personal Digital Assistant (PDA), a portable computer, a web tablet, a tablet computer, a wireless phone, a mobile phone, a smart phone, an electronic book, a Portable Multimedia Player (PMP), a portable game machine, a navigation system, a black box, a digital camera, a Digital Multimedia Broadcasting (DMB) player, a three-dimensional television, a smart television, a digital audio recorder, a digital audio player, a digital image recorder, a digital image player, a digital video recorder, a digital video player, a storage device constituting a data center, a device capable of transmitting/receiving information in a wireless environment, one of various electronic devices constituting a home network, one of various electronic devices constituting a computer network, one of various electronic devices constituting a telematics system, a computer, a, A Radio Frequency Identification (RFID) device or one of the various components that make up the computing system.
The program operation of the memory device 150 may be performed on a page unit basis, and the erase operation may be performed on a block unit basis. In other words, the units of the program operation and the erase operation of the memory device 150 may be different from each other. The memory device 150 does not support the rewrite function. Accordingly, the controller 130 may control the memory device 150 to program data to be updated in another page, to update data stored in one page of the memory device 150, i.e., existing data, and to invalidate the page in which the existing data is programmed. When the number of invalidated pages in the memory device 150 becomes too high, the controller 130 may perform a garbage collection operation to obtain storage space. The physical location of the memory device 150 where data is stored may change each time the data is updated in the host 102. The controller 130 may maintain mapping information between logical addresses used in the host 102 and physical addresses used in the memory devices 150 so that the host 102 may access data.
When the program operation and the erase operation are concentrated on the memory block, the life span of the memory device 150 may be greatly shortened. In order to prevent the life span of the memory device 150 from being suddenly shortened, a wear leveling operation may be performed so that the erase operation is performed equally on all the memory blocks of the memory device 150. The wear leveling operation may include an operation of moving data of a victim block selected among the memory blocks into a destination block. The wear leveling operation may be performed by the controller 130 described below. When the controller 130 performs the wear leveling operation, the erase operation may be performed less for memory blocks that already have a relatively high erase count and thus a short remaining life, and more for memory blocks that have a relatively low erase count and thus a longer remaining life, thereby adjusting the wear of the memory blocks to a uniform level so that the remaining lives of the memory blocks are substantially the same.
The controller 130 may control the memory device 150 in response to a request from the host 102. For example, the controller 130 may provide data read from the memory device 150 to the host 102 and store data provided by the host 102 into the memory device 150. For this operation, the controller 130 may control a read operation, a program operation, and an erase operation of the memory device 150.
The host I/F132 may be configured to process commands and data for the host 102 and may communicate with the host 102 through one or more of a variety of interface protocols, such as: universal Serial Bus (USB), multi-media card (MMC), peripheral component interconnect express (PCI-e or PCIe), Small Computer System Interface (SCSI), serial attached SCSI (sas), Serial Advanced Technology Attachment (SATA), Parallel Advanced Technology Attachment (PATA), Enhanced Small Disk Interface (ESDI), and/or Integrated Drive Electronics (IDE).
The host I/F132 may be driven by firmware called a Host Interface Layer (HIL) to exchange data with the host.
Memory I/F142 may serve as a memory/storage interface for interfacing controller 130 and memory device 150 such that controller 130 controls memory device 150 in response to requests from host 102. When memory device 150 is a flash memory or specifically a NAND flash memory, memory I/F142 may generate control signals for memory device 150 and process data to be provided to memory device 150 under the control of processor 134. The memory I/F142 may serve as an interface (e.g., a NAND flash interface) for processing commands and data between the controller 130 and the memory device 150. In particular, memory I/F142 may support data transfers between controller 130 and memory device 150.
The memory I/F142 may be driven by firmware called a Flash Interface Layer (FIL) to exchange data with the memory device 150.
The controller 130 may perform command operations corresponding to commands received from the host 102. The controller 130 may perform a foreground operation as a command operation corresponding to a command received from the host 102. For example, the controller 130 may perform a program operation corresponding to a write command, a read operation corresponding to a read command, an erase operation corresponding to an erase command, and a parameter set operation corresponding to a set parameter command or a set feature command.
Also, the controller 130 may perform background operations on the memory device 150 by the processor 134. For example, the background operations may include Garbage Collection (GC) operations, Wear Leveling (WL) operations, map clean operations, and/or bad block management operations.
When data stored in a particular memory block is updated, existing data may be invalidated. A memory block having multiple pages storing invalid data may be preferentially erased. Memory blocks with larger erase counts may prevent further erase operations by storing less frequently updated data.
Using only the erase count of a memory block, it may be difficult to determine whether data stored in the memory block is frequently updated. When FTL136 determines a memory block with a smaller erase count as a victim block and moves existing data of the victim block into a memory block with a larger erase count, the memory block may not be sufficiently protected from erase operations.
According to embodiments of the present invention, FTL136 can determine a victim block based not only on an erase count of a memory block, but also on an update count of data stored in the memory block. An embodiment of the present invention is described below with reference to fig. 2 to 5.
The memory 144 may be implemented by a volatile memory. For example, the memory 144 may be implemented by a Static Random Access Memory (SRAM) or a Dynamic Random Access Memory (DRAM). The memory 144 may be provided internal or external to the controller 130. Fig. 1 illustrates the memory 144 disposed within the controller 130. In another embodiment, the memory 144 may be implemented by an external volatile memory having a memory interface that transfers data between the memory 144 and the controller 130.
As described above, the memory 144 may store data required to perform a data write/read operation between the host 102 and the memory device 150 and data when the data write/read operation is performed. To store such data, memory 144 may include program memory, data memory, write buffers/caches, read buffers/caches, data buffers/caches, map buffers/caches, and so forth.
The memory 144 may store a logical address management (LBA MGMT) table, an Address (ADDR) mapping table, and a block management (MGMT) table. The logical address management table may store an update count of data stored in the storage block per logical address, and store an attribute of the data for each of the logical addresses determined based on the update count. The address mapping table may store a mapping relationship between logical addresses and physical addresses. The block management table may store an erase count for each memory block of the memory device 150 and store a hot page count indicating how much frequently updated data is stored in each memory block. The logical address management table, the address mapping table, and the block management table are described in detail with reference to fig. 3 to 5.
Fig. 2 is a flowchart illustrating an operation of the controller 130 according to an embodiment of the present invention.
Referring to fig. 2, in step S202, FTL136 may determine a candidate block of the victim block based on the erase count of the memory block in memory device 150.
For example, FTL136 may determine one or more memory blocks as candidate blocks for the victim block based on the erase counts and identify the candidate blocks in descending order of the erase counts.
In step S204, FTL136 may determine a victim block in the candidate block based on the update count of data stored in the candidate block.
For example, FTL136 can determine an update count of data for each logical address and determine whether each logical address is associated with hot data or cold data based on the respective update count. Hot data may refer to data that is updated relatively frequently, while cold data may refer to data that is updated relatively infrequently. Hereinafter, a logical address associated with hot data is referred to as a hot logical address, and a logical address associated with cold data is referred to as a cold logical address.
In some embodiments, FTL136 may determine a victim block based on the number of pages associated with hot logical addresses or the number of pages associated with cold logical addresses for each memory block. In the following description, a page associated with a hot logical address may be referred to as a hot page, and a page associated with a cold logical address may be referred to as a cold page. For example, FTL136 may determine a memory block storing the minimum amount of hot data, i.e., a block having the lowest hot page count, among candidate blocks as a victim block.
In step S206, FTL136 may move the data of the victim block into the destination block.
For example, FTL136 can control memory device 150 to program data of a victim block into the block having the highest erase count.
According to embodiments of the present invention, FTL136 can effectively suppress an increase in erase count of a memory block having a higher erase count by storing infrequently updated data in the memory block. In other words, wear leveling performance of FTL136 can be improved such that the remaining life of memory blocks with larger erase counts and memory blocks with lower erase counts can be leveled faster. In this way, the performance and lifetime of the memory system 110 may be further improved.
Fig. 3 illustrates the operation of the controller 130 according to an embodiment of the present invention. In particular, fig. 3 is a diagram for describing a method in which the FTL136 distinguishes each logical address of the memory device 150 as a hot logical address or a cold logical address based on a logical address management table.
Referring to fig. 3, the memory 144 may include or store a logical address management table storing a data UPDATE COUNT and a FLAG for each logical address LBA. The flag may indicate whether each logical address is a hot logical address or a cold logical address. In the example of fig. 3, a flag of "0" indicates that the logical address is a cold logical address, and a flag of "1" indicates that the logical address is a hot logical address. However, this bit convention may be reversed.
The data update count and flag in the logical address management table may change according to a command received from the host 102. The first to fourth TABLEs TABLE1 to TABLE4 of fig. 3 may represent that the data update count and flag of the logical address management TABLE are changed over time.
FTL136 may count each update of data for each logical address based on a write command and associated logical address received from host 102 and increment a corresponding update count. When data corresponding to a logical address is updated in the host 102, the host 102 may provide a command to the memory system 110 to write the updated data at the logical address. In the example of fig. 3, when a write command associated with a logical address is received from host 102, FTL136 can increment the data update count for the logical address by "1" (see TABLE 2).
In embodiments of the present invention, FTL136 can periodically decrement the data update count for all logical addresses by a set amount. In the example of fig. 3, FTL136 may reduce the data update count for all logical addresses by "1" (see TABLE 3) whenever the number of times a command is received by host 102, i.e., the command reception count, becomes a multiple of "5" (e.g., 10). The command reception count may include a write command reception count and a read command reception count. When FTL136 periodically decrements the data update counts for all logical addresses, the effect of past data update counts on determining a hot logical address or a cold logical address for each logical address may be reduced.
In embodiments of the present invention, FTL136 may determine a logical address as a cold logical address or a hot logical address based on a data update count of the logical address. In the example of fig. 3, FTL136 may change the logical address to a hot logical address and display a flag of "1" when the data update count of a cold logical address increases to approximately "10" or more (see TABLE 2). When the data update count for a hot logical address is reduced to about "8" or less, FTL136 may change the logical address to a cold logical address and display a flag of "0" (see TABLE 4).
The first TABLE1 may represent a logical address management TABLE for a first time. The data update counts of the first to fourth logical addresses at the first time may be "2", "9", "3", and "9", respectively. The flags of the first to fourth logical addresses may be "0", and "0", respectively, which means that the first to fourth logical addresses are all cold logical addresses.
The second TABLE2 may represent a logical address management TABLE at a second time after the first time. Fig. 3 shows a state where one write command for a second logical address is received between a first time and a second time, and further two read commands are received. At the second time, the data update count of the second logical address may be "10". Because the data update count for the second logical address, which was a cold logical address, is greater than or equal to "10," FTL136 can change the second logical address to a hot logical address. The second TABLE2 shows a state in which the flag associated with the second logical address is changed to "1".
The third TABLE3 may represent a logical address management TABLE at a third time after the second time. Fig. 3 illustrates a state in which two write commands for a fourth logical address are received between the second time and the third time. FTL136 may increment the data update count of the fourth logical address by "2". Since the number of commands received from the host 102 at the third time is 5, the FTL136 can decrease the data update count of the first to fourth logical addresses by "1". At the third time, the data update counts of the first to fourth logical addresses may be changed to "1", "9", "2", and "10", respectively. Because the data update count for the fourth logical address, which was a cold logical address, becomes greater than or equal to "10," FTL136 may change the flag associated with the fourth logical address to "1.
The fourth TABLE4 represents a logical address management TABLE at a fourth time after the third time. Fig. 3 shows a state in which five read commands are received between the third time and the fourth time. Since the number of commands received from the host 102 at the fourth time is 5, the FTL136 can decrease the data update count of the first to fourth logical addresses by "1". At the fourth time, the data update counts of the first to fourth logical addresses may be changed to "0", "8", "1", and "9", respectively. FTL136 may change the flag associated with the second logical address to "0" because the data update count for the second logical address that was the hot logical address becomes less than or equal to "8".
Fig. 4 illustrates the operation of the controller 130 according to an embodiment of the present invention. In particular, fig. 4 illustrates a method of how FTL136 performs a hot page count operation for each memory block based on a logical address management table and an address mapping table.
Referring to fig. 4, the memory 144 stores a logical address management table and an address mapping table.
The left side of fig. 4 shows a part of the logical address management table. Specifically, the logical address management table shown in fig. 4 indicates a FLAG for each logical address LBA; the data update count is omitted. As shown in fig. 3, the flag may indicate a hot logical address by "1" and a cold logical address by "0".
The right table of fig. 4 may show an address mapping table. Specifically, the address mapping table shown in fig. 4 may represent logical addresses respectively associated with first to fifth PAGEs PAGE1 to PAGE5 of the first memory BLOCK 1.
The memory blocks may include pages, each of which may be associated with a logical address. In the example of fig. 4, a first PAGE1 of the first memory BLOCK1 may store data corresponding to the first logical address LBA 1. FTL136 can determine how much cold data is stored in a memory block based on the number of hot logical addresses or cold logical addresses associated with a page in the memory block. In the following description, a page associated with a hot logical address may be referred to as a hot page, and a page associated with a cold logical address may be referred to as a cold page.
FTL136 may reference the logical address management table and address mapping table to count how many hot pages a memory block includes. Referring to the address mapping table of fig. 4, first to fifth PAGEs PAGE1 to PAGE5 of the first memory BLOCK1 may be associated with first, second, seventh, eighth and ninth logical addresses, respectively. Referring to the logical address management table of fig. 4, flags of the first, second, seventh, eighth, and ninth logical addresses may be "0", "1", "0", and "1", respectively. Thus, the first, second, and fourth pages of the first memory block may be cold pages associated with cold logical addresses, and the third and fifth pages may be hot pages associated with hot logical addresses. FTL136 may determine a hot page count of first memory BLOCK1 as "2".
Fig. 5 illustrates the operation of the controller 130 according to an embodiment of the present invention. In particular, fig. 5 is a diagram for describing how FTL136 determines candidate blocks and determines a victim block among the candidate blocks by referring to a block management table.
Referring to fig. 5, the memory 144 includes or stores a block management table. Fig. 5 exemplarily shows a block management table including an erase count and a hot page count for each memory block. For example, the first memory block may have an erase count of 15, and may now include 50 current hot pages.
As described with reference to fig. 2, FTL136 can determine one or more memory blocks as candidate blocks in descending order of erase counts by referring to a block management table. In the example of fig. 5, FTL136 may determine that the second memory block and the third memory block, which are the blocks having the lowest erase counts, are candidate blocks. The dashed lines shown in fig. 5 may represent candidate blocks.
FTL136 may select a memory block storing the most cold data among candidate blocks as a victim block by referring to a block management table. In the example of fig. 5, FTL136 may determine a memory block having the lowest hot page count among candidate blocks as a memory block storing the most cold data. In the example of FIG. 5, the second memory block has the lowest hot page count; accordingly, the FTL136 can determine the second memory block of the second and third memory blocks as a victim block.
FTL136 can move data of victim block into destination block. FTL136 may determine the memory block having the highest erase count as the destination block by referring to the block management table.
The concept and spirit of the present invention are not limited to the examples described with reference to fig. 3 to 5. For example, the logical address management table may indicate a cold logical address with a flag "1" and a hot logical address with a flag "0". The block management table may store a cold page count for each memory block instead of storing a hot page count for each memory block.
According to embodiments of the present invention, FTL136 can control memory device 150 to store data of a memory block having a lower erase count and storing a large amount of cold data in a memory block having a larger erase count. FTL136 can exchange data of memory blocks having higher erase counts with data of memory blocks having lower erase counts while reducing the amount of data stored in memory blocks having higher erase counts. FTL136 may equalize erase counts of memory blocks more quickly by preventing erase operations from being performed on memory blocks having larger erase counts.
Embodiments of the present invention provide a controller that can improve performance and lifespan of a memory system by efficiently performing wear leveling operations, and a method of operating the controller.
While the invention has been illustrated and described with respect to specific embodiments, it will be apparent to those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention as defined in the following claims. Accordingly, the present invention is intended to embrace all such alterations and modifications that fall within the scope of the appended claims.
Claims (20)
1. A method for operating a controller for controlling a memory device including a memory block, the method comprising:
determining a candidate block based on an erase count of the memory block;
determining a victim block among the candidate blocks based on data update counts of logical addresses associated with a plurality of pages in each of the candidate blocks;
and moving the data of the sacrifice block to a destination block.
2. The method of claim 1, wherein determining the candidate block based on the erase count of the memory block comprises:
determining a memory block as the candidate block in a descending order of the erase count among the memory blocks.
3. The method of claim 2, wherein determining a memory block as the candidate block in descending order of the erase count among the memory blocks comprises:
determining the memory block with the lowest erase count as the candidate block.
4. The method of claim 2, wherein determining a victim block among the candidate blocks based on data update counts of logical addresses associated with a plurality of pages in each of the candidate blocks comprises:
determining whether each of the logical addresses is a hot logical address or a cold logical address based on a data update count for each logical address; and
determining a victim block among the candidate blocks based on a number of hot or cold logical addresses among the logical addresses associated with the plurality of pages.
5. The method of claim 4, wherein determining the victim block among the candidate blocks based on the number of the hot or cold logical addresses of the logical addresses associated with the plurality of pages comprises:
determining the candidate block with the highest number of cold logical addresses as the victim block.
6. The method of claim 4, wherein determining the victim block among the candidate blocks based on the number of the hot or cold logical addresses of the logical addresses associated with the plurality of pages comprises:
determining a candidate block with a lowest number of hot logical addresses as the victim block.
7. The method of claim 2, further comprising:
determining a block having a highest erase count among the memory blocks as the destination block.
8. The method of claim 4, further comprising:
when a write command associated with a logical address is received from a host, a data update count for the logical address is incremented.
9. The method of claim 8, further comprising:
decreasing a data update count for all logical addresses associated with data stored in the memory device each time the number of commands received from the host reaches a set number.
10. The method of claim 8, wherein determining whether each of the logical addresses is a hot logical address or a cold logical address based on the data update count for each logical address comprises:
changing a cold logical address to a hot logical address when a data update count of the cold logical address is greater than or equal to a first threshold; and
when the data update count for a hot logical address is less than or equal to a second threshold, the hot logical address is changed to a cold logical address.
11. A controller that controls a memory device including a plurality of memory blocks, the controller comprising:
a memory storing a data update count of data stored in the memory device for each logical address and storing an erase count for each memory block; and
a Flash Translation Layer (FTL) determines candidate blocks based on erase counts of the memory blocks, determines a victim block among the candidate blocks based on data update counts of logical addresses associated with a plurality of pages in each of the candidate blocks, and moves data of the victim block into a destination block.
12. The controller of claim 11, wherein the FTL determines memory blocks as the candidate blocks in descending order of decreasing erase counts among the memory blocks.
13. The controller of claim 12, wherein the FTL determines a memory block having a lowest erase count as the candidate block.
14. The controller of claim 12, wherein the FTL
Determining whether each of the logical addresses is a hot logical address or a cold logical address based on the data update count for each logical address, an
Determining the victim block among the candidate blocks based on a number of hot or cold logical addresses among logical addresses associated with a plurality of pages.
15. The controller of claim 14, wherein the FTL determines a candidate block having a highest number of cold logical addresses as the victim block.
16. The controller of claim 14, wherein the FTL determines a candidate block having a lowest number of hot logical addresses as the victim block.
17. The controller of claim 14, wherein the FTL increases a data update count for a logical address when a write command associated with the logical address is received from a host.
18. The controller of claim 17, wherein the FTL decrements a data update count for all logical addresses associated with data stored in the memory device each time a number of commands received from the host reaches a set number.
19. The controller of claim 17, wherein
When a data update count of a cold logical address is greater than or equal to a first threshold, the FTL changing the cold logical address to a hot logical address; and is
When a data update count for a hot logical address is less than or equal to a second threshold, the FTL changes the hot logical address to a cold logical address.
20. A memory system, comprising:
a memory device comprising a plurality of memory blocks; and
a controller coupled to the plurality of memory blocks:
determining a candidate block among the plurality of memory blocks based on the erase count of each memory block;
selecting a victim block among the candidate blocks based on a hot page count of each candidate block; and
and moving the data of the sacrifice block to a destination block.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR10-2020-0002903 | 2020-01-09 | ||
KR1020200002903A KR20210089853A (en) | 2020-01-09 | 2020-01-09 | Controller and operation method thereof |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113110799A true CN113110799A (en) | 2021-07-13 |
Family
ID=76709023
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011035427.7A Withdrawn CN113110799A (en) | 2020-01-09 | 2020-09-27 | Controller and method for selecting victim blocks for wear leveling operations |
Country Status (3)
Country | Link |
---|---|
US (1) | US11449418B2 (en) |
KR (1) | KR20210089853A (en) |
CN (1) | CN113110799A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP4120089A1 (en) * | 2021-07-15 | 2023-01-18 | Samsung Electronics Co., Ltd. | Systems and methods for load balancing in a heterogeneous memory system |
US11922034B2 (en) | 2021-09-02 | 2024-03-05 | Samsung Electronics Co., Ltd. | Dual mode storage device |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11698732B2 (en) * | 2021-02-19 | 2023-07-11 | Micron Technology, Inc. | Storage provisioning in a data storage device |
US11960753B2 (en) * | 2021-08-25 | 2024-04-16 | Western Digital Technologies, Inc. | Solution for super device imbalance in ZNS SSD |
US11966618B2 (en) | 2021-08-25 | 2024-04-23 | Western Digital Technologies, Inc. | Purposeful super device imbalance for ZNS SSD efficiency |
US11790998B2 (en) | 2021-08-25 | 2023-10-17 | Micron Technology, Inc. | Eliminating write disturb for system metadata in a memory sub-system |
CN116107491A (en) * | 2021-11-10 | 2023-05-12 | 三星电子株式会社 | Memory controller, memory device, and method of operating memory device |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120317337A1 (en) | 2011-06-09 | 2012-12-13 | Microsoft Corporation | Managing data placement on flash-based storage by use |
KR102639670B1 (en) | 2016-06-30 | 2024-02-26 | 에스케이하이닉스 주식회사 | Memory system and operation method for the same |
KR20180064198A (en) * | 2016-12-05 | 2018-06-14 | 에스케이하이닉스 주식회사 | Data storage device and operating method thereof |
KR20180065075A (en) | 2016-12-06 | 2018-06-18 | 에스케이하이닉스 주식회사 | Memory system and method of wear-leveling for the same |
US10445230B2 (en) * | 2017-12-08 | 2019-10-15 | Macronix International Co., Ltd. | Managing block arrangement of super blocks |
-
2020
- 2020-01-09 KR KR1020200002903A patent/KR20210089853A/en unknown
- 2020-08-25 US US17/002,243 patent/US11449418B2/en active Active
- 2020-09-27 CN CN202011035427.7A patent/CN113110799A/en not_active Withdrawn
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP4120089A1 (en) * | 2021-07-15 | 2023-01-18 | Samsung Electronics Co., Ltd. | Systems and methods for load balancing in a heterogeneous memory system |
US11922034B2 (en) | 2021-09-02 | 2024-03-05 | Samsung Electronics Co., Ltd. | Dual mode storage device |
Also Published As
Publication number | Publication date |
---|---|
US20210216446A1 (en) | 2021-07-15 |
KR20210089853A (en) | 2021-07-19 |
US11449418B2 (en) | 2022-09-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110781096B (en) | Apparatus and method for performing garbage collection by predicting demand time | |
US11449418B2 (en) | Controller and method for selecting victim block for wear leveling operation | |
KR20200022118A (en) | Data storage device and operating method thereof | |
US11526296B2 (en) | Controller providing host with map information of physical address for memory region, and operation method thereof | |
US10860231B2 (en) | Memory system for adjusting map segment based on pattern and operating method thereof | |
US20200320012A1 (en) | Memory system and method for operating the same | |
US11392309B2 (en) | Memory system for performing migration operation and operating method thereof | |
CN111581121B (en) | Method and apparatus for managing mapping data in a memory system | |
US11334272B2 (en) | Memory system and operating method thereof | |
US11422930B2 (en) | Controller, memory system and data processing system | |
KR20200059936A (en) | Memory system and operation method thereof | |
CN115080457A (en) | Controller and operation method thereof | |
US11775209B2 (en) | Controller and operation method thereof | |
US11409444B2 (en) | Memory system and operation method thereof | |
US20220012180A1 (en) | Memory system for meta data management and operating method of memory system | |
US11392310B2 (en) | Memory system and controller | |
CN114328294A (en) | Controller, operating method thereof, and memory system including the controller | |
KR20220072357A (en) | Controller, and memory system and data processing system including the same | |
CN114691534A (en) | Controller and memory system including the same | |
CN111831577A (en) | Apparatus and method for determining characteristics of memory blocks in a memory system | |
CN114518840A (en) | Controller and operation method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20210713 |