CN106951187B - Method for realizing static wear balance of solid-state storage - Google Patents

Method for realizing static wear balance of solid-state storage Download PDF

Info

Publication number
CN106951187B
CN106951187B CN201710131586.9A CN201710131586A CN106951187B CN 106951187 B CN106951187 B CN 106951187B CN 201710131586 A CN201710131586 A CN 201710131586A CN 106951187 B CN106951187 B CN 106951187B
Authority
CN
China
Prior art keywords
block
data
cold
cold data
solid
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.)
Expired - Fee Related
Application number
CN201710131586.9A
Other languages
Chinese (zh)
Other versions
CN106951187A (en
Inventor
陈星�
卞爱华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Memory Technology (shenzhen) Co Ltd
Original Assignee
Memory Technology (shenzhen) Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Memory Technology (shenzhen) Co Ltd filed Critical Memory Technology (shenzhen) Co Ltd
Priority to CN201710131586.9A priority Critical patent/CN106951187B/en
Publication of CN106951187A publication Critical patent/CN106951187A/en
Application granted granted Critical
Publication of CN106951187B publication Critical patent/CN106951187B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0616Improving the reliability of storage systems in relation to life time, e.g. increasing Mean Time Between Failures [MTBF]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0647Migration mechanisms
    • G06F3/0649Lifecycle management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method for realizing static wear leveling of solid-state storage, which is characterized in that data stored in the solid-state storage is divided into cold data and hot data, the EC value of the erasing times of each block of the solid-state storage is recorded, and the leveling operation is carried out according to the following modes: when the erasing times of the block storing the cold data are smaller than a preset releasable threshold, selecting the block of which the erasing times exceed the preset cold data moving-in threshold from the current idle or cold data writing-in point block, and moving the data of the block storing the cold data to the selected idle block or cold data writing-in point block. The cold data and the hot data are strictly distinguished, the work of static wear leveling is clearly regulated, invalid moving of the data is avoided as much as possible, writing amplification is reduced, and the wear leveling can effectively achieve the purpose of prolonging the solid-state storage device.

Description

Method for realizing static wear balance of solid-state storage
Technical Field
The invention relates to the technical field of storage, in particular to a method for realizing static wear balance of solid-state storage.
Background
At present, most flash Translation layers (ftls) (flash Translation layers) of solid state memories use page mapping with flexible mapping. Since the erase count (P \ E Cycle) of each block of the NAND is limited, in order to better prolong the life of the solid-state storage device, the erase count of each block of the NAND needs to be kept at the same level, so the solid-state storage device tries to use the block with small erase count to write data so as to increase the wear chance of the solid-state storage device, which is dynamic wear leveling. Fig. 1 is a graph of EC variation of COLD DATA and HOT DATA, because a part of DATA written by a user is COLD DATA of COLD DATA (not updated frequently) and another part is HOT DATA of HOT DATA (updated frequently), so that some blocks are occupied by COLD DATA all the time, the erase times EC are increased as other blocks are updated frequently by HOT DATA, while the blocks of COLD DATA are basically kept unchanged, the difference between the erase times of the blocks filled with COLD DATA and the erase times of other blocks is larger, and dynamic wear leveling does not work, so that a static wear leveling module is needed to process the blocks to achieve wear leveling.
Existing wear leveling algorithms are stochastic and deterministic. The random wear leveling algorithm is statistically such that the wear of the block is balanced after a large amount of data is written. Although the implementation method is simple and the execution efficiency is high, the equalization effect is influenced by randomness too obviously, and the effects of reducing write amplification and prolonging the service life are common. The deterministic wear leveling algorithm definitely provides a wear leveling strategy by recording the data storage time length, the erasing times and other global information, and the wear leveling effect is good. The deterministic algorithm has a thought, when some blocks reach a certain erasing frequency, the blocks are protected from being erased, and the erasing frequency of other blocks is waited to catch up, so that the aim of wear balance can be achieved, the garbage recovery efficiency is low, and the write amplification is increased. In another idea, when garbage collection is performed, the blocks to be collected are selected by weighting the number of valid pages in the blocks and the erasing times of the blocks, which has the disadvantages of poor effect due to simple strategy and long calculation time due to complex strategy, thereby affecting performance. There is also a thought to divide cold and hot data, and most of the existing methods trigger data exchange of cold and hot data blocks when the erase frequency deviation of the blocks reaches a certain degree, then protect the cold data blocks with large erase frequency from erasing, and then continuously adjust the division of the cold and hot data. The method has the defects of unclear cold and hot data division, relatively complex strategy, relatively large write amplification of exchanging cold and hot data blocks and the like.
Disclosure of Invention
In view of the above drawbacks, the present invention is directed to how to achieve wear leveling and to extend the service life of a solid-state storage device more effectively.
In order to achieve the above object, the present invention provides a method for implementing static wear leveling in solid state storage, which is characterized in that data stored in the solid state storage is divided into cold data and hot data, the value of the erase times EC of each block in the solid state storage is recorded, and the leveling operation is performed as follows: when the erasing times of the block storing the cold data are smaller than a preset releasable threshold, selecting the block of which the erasing times exceed the preset cold data moving-in threshold from the current idle or cold data writing-in point block, and moving the data of the block storing the cold data to the selected idle block or cold data writing-in point block.
The method for realizing the static wear leveling of the solid-state storage is characterized in that cold data and hot data are strictly defined, and all newly written data or updated data of a host are defined as hot data; when the data in the block does not have any host update data operation within a cooling time exceeding a preset value, the block is defined as cold data.
The method for realizing the static wear leveling of the solid-state storage is characterized in that the wear leveling checking operation is triggered periodically.
The invention can clearly prescribe the work of static wear leveling by strictly distinguishing cold data and hot data, avoid invalid data transfer as much as possible, reduce write amplification and enable the wear leveling to more effectively achieve the purpose of prolonging the service life of the solid-state storage equipment.
Drawings
FIG. 1 is a schematic diagram of static wear leveling;
FIG. 2 is a state diagram of cold data and hot data transitions with respect to each other;
fig. 3 is a schematic diagram of wear leveling state transitions.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
FIG. 2 is a state diagram of cold data and hot data transitions with respect to each other; all the newly written data or updated data of the host are defined as hot data; when the data does not have any host update data operation within the preset cooling time, the block is defined as cold data.
The thermal data specifically includes:
1) write solid state memory operation 2A for the first time, and no data exceeding a preset "cool down time";
2) the 'cooling time' is not reached, and the new data of the operation is updated;
3) the 'cooling time' is not reached, internal data transfer is carried out due to garbage recycling operation or balance operation, and data after transfer is carried out;
4) data that is after the cold data is updated for operation 2C and for which "cool down time" has not yet arrived.
The cold data specifically includes:
1) data after the thermal data reached a preset "cooling time" (referred to as cooling 2B);
2) the cold data is subjected to internal data transfer due to garbage collection operation or equalization operation, and the transferred data is cold data.
The characteristics brought by the data division operation according to the principle are as follows: data cannot be warmed up after being cold unless updated; data becomes hot data once updated until the data "cools down"; the hot data is still hot data after being moved, and the cold data is still cold data after being moved.
Fig. 1 is a static wear leveling schematic. FTL internal moving operation, such as garbage recycling, can be classified and recycled according to the types of cold data and hot data; under the strategy, cold data and hot data are gradually separated, the cold data can be gathered in some data blocks, and the hot data can be gathered in other data blocks, so that the write amplification is favorably reduced.
When cold data and hot data are separated gradually, some blocks storing the cold data cannot be garbage-recovered and erased, and the erasing times are not increased, so that the deviation between the EC value of the blocks and the EC maximum value of all the blocks can exceed a set threshold after the data are written for a period of time.
Searching a block in which the cold data is currently stored, selecting a block in which the erasing times are less than a preset releasable threshold, defining the block as a wear-leveling cold data source block, and searching the source block according to the following specific method: by using
Figure GDA0002277126250000031
Representing a cold data block linked list established by taking the EC value as an index; using M to represent the maximum node in the chain table; m represents the minimum node in the chain table; by ECMAXRepresents the EC maximum for all blocks; by using
Figure GDA0002277126250000041
The deviation threshold values of the maximum value and the minimum value of EC set by the static wear leveling module are represented, and when the block where the cold data is located meets the following conditions:
Figure GDA0002277126250000042
it is determined that the block is the cold data source block SRC requiring equalization.
Searching a block of which the erasing times exceed a preset cold data carrying-in threshold value in a current idle or cold data writing point block, defining the block as a wear leveling target data block WPB, and searching a leveling target data block according to the following specific method:
ECWPBrepresents the EC value of the block of write points to be evaluated,
Figure GDA0002277126250000043
represents an EC deviation threshold allowed for writing a point block;
Figure GDA0002277126250000044
indicating the EC deviation threshold allowed for the free block,VPC represents the number of effective pages in one block, and FPC represents the number of free pages of a write point block;
when VPCSRC≤FPCWPBAnd is
Figure GDA0002277126250000046
When the data block is established, judging the block as a balanced target data block meeting the requirement;
or when VPCSRC≤FPCWPBAnd is
Figure GDA0002277126250000047
When the determination is established, the determination is further made
Figure GDA0002277126250000048
When the data block is established, judging the block as a balanced target data block meeting the requirement;
or when VPCSRC>FPCWPB
Figure GDA0002277126250000049
And
Figure GDA00022771262500000410
when the data block is established, judging the block as a balanced target data block meeting the requirement;
or when VPCSRC>FPCWPB
Figure GDA00022771262500000411
And
Figure GDA00022771262500000412
when the data block is found to meet the requirement, the data block is determined to be a balanced target data block meeting the requirement, fig. 3 is a wear leveling state transition diagram, and the states of the static wear leveling module can be divided into three types according to whether a cold data source block and a target data block are found to meet the requirement:
an idle state: searching that no cold data source block can be found;
the working state is as follows: finding a cold data source block and finding a target data block, wherein the target data block meets the requirement, and performing data exchange operation or moving operation;
a waiting state: a cold data source block is found, but the target data block does not meet the requirements.
The state transition of the idle state is driven by periodically checking to search whether a cold data source block meeting the condition exists, and when no cold data source block 5A is searched, the idle state is continuously maintained; and if the cold data source block is found and the target data block is found, and the target data block meets the requirement 5C, switching to a working state, and if the cold data source block is found, but the target data block does not meet the requirement 5H.
The state transition of the working state is driven by the check after one cold data block is completed each time the data block is moved; when the subsequent cold data source block and the target data block are found and the target data block meets the requirement of 5D, the working state is continuously maintained; if the subsequent cold data source block is found, but the target data block does not meet the requirement 5E, the state is switched to a waiting state; and if no subsequent cold data source block meeting the condition is searched, the state is switched into an idle state.
The state transition of the wait state is driven by periodically checking whether there is a target block that satisfies the condition. When the target data block is found and meets the requirement of 5F, continuing to switch to the working state; if a subsequent cold data source block is found, but the target data block does not meet requirement 5E, then a wait state is maintained.
While the invention has been described with reference to a particular embodiment, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (1)

1. A method for realizing static wear leveling of solid-state storage is characterized in that data stored in the solid-state storage is divided into cold data and hot data, the EC value of the erasing times of each block of the solid-state storage is recorded, and the leveling operation is carried out according to the following modes: when the erasing times of the block in which the cold data is stored are smaller than a preset releasable threshold, selecting a block of which the erasing times exceed a preset cold data carrying-in threshold from the current idle or cold data writing-in point block, and carrying the data of the block in which the cold data is stored into the selected idle block or cold data writing-in point block; strictly defining cold data and hot data, and defining all newly written data or updated data of the host as hot data; when the data in the block does not have any operation of updating the data by the host within the preset cooling time, defining the block as cold data; periodically triggering a wear leveling check operation; searching the blocks of which the erasing times of the blocks storing the cold data are smaller than a preset releasable threshold, defining the blocks as wear-leveling cold data source blocks, and searching the source blocks according to the following specific method: by using
Figure FDA0002277126240000011
Representing cold data block linked list built with EC value as index(ii) a Using M to represent the maximum node in the chain table; m represents the minimum node in the chain table; by ECMAXRepresents the EC maximum for all blocks; by using
Figure FDA0002277126240000012
The deviation threshold values of the maximum value and the minimum value of EC set by the static wear leveling module are represented, and when the block where the cold data is located meets the following conditions:
Figure FDA0002277126240000013
determining that the block is an SRC; the method comprises the following steps of searching a block, the erasing times of which are greater than a preset cold data carrying-in threshold value, in a current idle or cold data writing point block, to define the block as a wear leveling target data block WPB, and searching a leveling target data block according to the following specific method:
ECWPBrepresents the EC value of the block of write points to be evaluated,represents an EC deviation threshold allowed for writing a point block;
Figure FDA0002277126240000015
indicating the EC deviation threshold allowed for the free block,
Figure FDA0002277126240000016
VPC represents the number of effective pages in one block, and FPC represents the number of free pages of a write point block;
when VPCSRC≤FPCWPBAnd is
Figure FDA0002277126240000017
When the data block is established, judging the block as a balanced target data block meeting the requirement;
or when VPCSRC≤FPCWPBAnd is
Figure FDA0002277126240000018
When the determination is established, the determination is further made
Figure FDA0002277126240000019
When the data block is established, judging the block as a balanced target data block meeting the requirement;
or when VPCSRC>FPCWPB
Figure FDA0002277126240000021
And
Figure FDA0002277126240000022
when the data block is established, judging the block as a balanced target data block meeting the requirement;
or when VPCSRC>FPCWPB
Figure FDA0002277126240000023
And
Figure FDA0002277126240000024
and when the data block is established, judging the block as a balanced target data block meeting the requirement.
CN201710131586.9A 2017-03-07 2017-03-07 Method for realizing static wear balance of solid-state storage Expired - Fee Related CN106951187B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710131586.9A CN106951187B (en) 2017-03-07 2017-03-07 Method for realizing static wear balance of solid-state storage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710131586.9A CN106951187B (en) 2017-03-07 2017-03-07 Method for realizing static wear balance of solid-state storage

Publications (2)

Publication Number Publication Date
CN106951187A CN106951187A (en) 2017-07-14
CN106951187B true CN106951187B (en) 2020-01-24

Family

ID=59467557

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710131586.9A Expired - Fee Related CN106951187B (en) 2017-03-07 2017-03-07 Method for realizing static wear balance of solid-state storage

Country Status (1)

Country Link
CN (1) CN106951187B (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107368262A (en) * 2017-07-21 2017-11-21 重庆大学 A kind of data layout method different based on flash memory system path difference
CN108089822A (en) * 2017-12-20 2018-05-29 北京京存技术有限公司 Management method, system, equipment and the storage medium of storage chip
CN111104055B (en) * 2018-10-29 2023-10-27 伊姆西Ip控股有限责任公司 Method, apparatus and computer program product for managing a storage system
CN111324284B (en) * 2018-12-14 2024-02-23 兆易创新科技集团股份有限公司 Memory device
CN111324288B (en) * 2018-12-14 2024-02-23 兆易创新科技集团股份有限公司 Memory device
CN109656483B (en) * 2018-12-19 2022-02-15 中国人民解放军国防科技大学 Static wear balancing method and device for solid-state disk
CN109669641B (en) * 2018-12-24 2022-03-29 深圳忆联信息系统有限公司 Data storage method and device for reducing SSD bit error rate
CN109753443B (en) * 2019-01-12 2021-05-18 湖南国科微电子股份有限公司 Data processing method and device and electronic equipment
CN111090595B (en) * 2019-11-19 2022-12-20 中国航空工业集团公司西安航空计算技术研究所 NAND FLASH garbage recovery balanced optimization method
CN111158592B (en) * 2019-12-26 2023-07-18 广东浪潮大数据研究有限公司 Solid state disk and garbage collection method, device and computer readable storage medium thereof
CN111143238B (en) * 2019-12-27 2022-03-15 无锡融卡科技有限公司 Data erasing method and system based on eFlash memory chip
CN111159058B (en) * 2019-12-27 2022-03-04 深圳大普微电子科技有限公司 Wear leveling method and device and nonvolatile storage equipment
CN111414138B (en) * 2020-03-19 2024-02-13 镕铭微电子(济南)有限公司 Wear balancing method and device for solid state disk
CN114064516B (en) * 2021-11-16 2022-08-30 深圳市时创意电子有限公司 Data processing method and device, computer equipment and storage medium
CN115586874B (en) * 2022-11-24 2023-03-10 苏州浪潮智能科技有限公司 Data block recovery method and device, electronic equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102081576B (en) * 2011-03-01 2012-07-11 华中科技大学 Flash memory wear balance method
CN102880556B (en) * 2012-09-12 2015-05-20 浙江大学 Wear leveling method and system of Nand Flash
KR102513491B1 (en) * 2015-07-15 2023-03-27 에스케이하이닉스 주식회사 Memory system and operating method of memory system

Also Published As

Publication number Publication date
CN106951187A (en) 2017-07-14

Similar Documents

Publication Publication Date Title
CN106951187B (en) Method for realizing static wear balance of solid-state storage
US10838859B2 (en) Recency based victim block selection for garbage collection in a solid state device (SSD)
TWI632457B (en) Method of wear leveling for data storage device
CN104239225B (en) A kind of method and device for managing isomery mixing internal memory
CN105094686B (en) Data cache method, caching and computer system
CN107391398B (en) Management method and system for flash memory cache region
CN103440207A (en) Caching method and caching device
CN108228449B (en) Terminal device control method and device, terminal device and computer readable storage medium
CN108021514B (en) Cache replacement method and equipment
CN108572799B (en) Data page migration method of heterogeneous memory system of bidirectional hash chain table
CN110688326A (en) Flash memory wear leveling algorithm based on multiple thresholds
CN102253901B (en) Read/write distinguished data storage replacing method based on phase change memory
CN105389135A (en) Solid-state disk internal cache management method
WO2016101145A1 (en) Controller, method for identifying data block stability and storage system
US9792228B2 (en) Enhancing lifetime of non-volatile cache by injecting random replacement policy
CN111580754B (en) Write-friendly flash memory solid-state disk cache management method
CN108459972B (en) Efficient cache management design method for multi-channel solid state disk
CN109478164A (en) For storing the system and method for being used for the requested information of cache entries transmission
CN102169464B (en) Caching method and device used for non-volatile memory, and intelligent card
CN106201918A (en) A kind of method and system quickly discharged based on big data quantity and extensive caching
KR101284465B1 (en) Page mapping scheme that supports secure file deletion for nand-based block device, and thereof recording medium
CN116185624A (en) Garbage collection method and device for hard disk, computer equipment and storage medium
Chen et al. Energy-aware buffer management scheme for NAND and flash-based consumer electronics
KR20150094205A (en) Method for swap management of flash-based storage
US9767043B2 (en) Enhancing lifetime of non-volatile cache by reducing intra-block write variation

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
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200124

CF01 Termination of patent right due to non-payment of annual fee