CN105867834A - Data arrangement method of storage device - Google Patents

Data arrangement method of storage device Download PDF

Info

Publication number
CN105867834A
CN105867834A CN201510032136.5A CN201510032136A CN105867834A CN 105867834 A CN105867834 A CN 105867834A CN 201510032136 A CN201510032136 A CN 201510032136A CN 105867834 A CN105867834 A CN 105867834A
Authority
CN
China
Prior art keywords
block
slc
data
slc block
storage device
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.)
Pending
Application number
CN201510032136.5A
Other languages
Chinese (zh)
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.)
SHENZHEN SILICONGO SEMICONDUCTOR CO Ltd
Original Assignee
SHENZHEN SILICONGO SEMICONDUCTOR 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 SHENZHEN SILICONGO SEMICONDUCTOR CO Ltd filed Critical SHENZHEN SILICONGO SEMICONDUCTOR CO Ltd
Priority to CN201510032136.5A priority Critical patent/CN105867834A/en
Publication of CN105867834A publication Critical patent/CN105867834A/en
Pending legal-status Critical Current

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The invention discloses a data arrangement method of a storage device. The method comprises the following steps: judging whether the storage device is in an idle state or not; if the storage device is in the idle state, judging whether the proportion of a SLC (Single Level Cell) empty block reaches a recovery threshold value or not; when the proportion of the SLC empty block reaches the recovery threshold value, analyzing the SLC block to find a target SLC block which needs to be arranged; and carrying out data recovery on the target SLC block.

Description

Storage device data compilation method
Technical field
The present invention relates to data storage technology, particularly relate to a kind of data compilation method in storage device.
Background technology
Flash memory (Flash) is a kind of nonvolatile semiconductor memory chip, has the advantage that volume is little, low in energy consumption, be susceptible to physical damage, is the preferable storage medium of mobile digital product.Flash memory is according to inside structure and realize technology AND, NAND, NOR and DiNOR etc. can be divided into several, and NAND-type flash memory is non-volatile, so being well suited for portable data storage device.Compared with NOR-type flash memory, NAND-type flash memory packing density is bigger, and price is more cheap.
Nand flash memory generally comprises single layer cell (single-level cell, SLC) flash memory, multilevel-cell (multi-level cell, MLC) flash memory, and three-layer unit (triple-level cell, TLC) flash memory.One mnemon of single layer cell flash memory can store a data bit, and therefore the numerical value stored by the mnemon of single layer cell flash memory has two kinds, respectively 0 and 1.One mnemon of multi-layered unit flash memory can store two data bit, and therefore the data stored by the mnemon of multi-layered unit flash memory have four kinds, respectively data combination 00,01,10 and 11.One mnemon of three-layer unit flash memory can store three data bit, and therefore the data stored by the mnemon of three-layer unit flash memory have eight kinds, respectively data combination 000,001,010,011,100,101,110 and 111.The probability of the block generation bit reversal that the block working in SLC pattern works in MLC or TLC pattern relatively is less, and it is the most more stable reliably to be stored in data above, and meanwhile, erasable number of times is more, i.e. service life is more permanent.
Owing to SLC Flash write data speed is faster than MLC flash and TLC flash memory write data, when writing data in flash memory, for increasing writing speed, existing mode preferentially writes on SLC block, user data is write when SLC block is finished MLC block or TLC block again or SLC block is transferred in MLC block or TLC block, in SLC block, write user data the most again, but data write can wait SLC block data conversion storage when SLC block is finished, and causes writing speed slack-off.
Summary of the invention
In view of the foregoing, it is necessary to a kind of storage device data compilation method improving writing speed is provided.
A kind of storage device data compilation method, described method includes: judge to store whether device is in idle condition;When storing device and being in idle condition, it is judged that whether the accounting of SLC sky block reaches to reclaim threshold value;When the accounting of described SLC sky block reaches to reclaim threshold value, it is analyzed SLC block finding the target SLC block needing to arrange;And described target SLC block is carried out data record.
Preferably, by described target SLC block data record to SLC sky block.
Preferably, described method also includes: judge whether the quantity of the SLC sky block after data record reaches to stop reclaiming threshold value;SLC block is carried out statistical analysis and finds the fresh target SLC block needing to arrange;And by fresh target SLC block data record to MLC or TLC sky block.
Preferably, described judge to store device and whether be in the step of idle condition and include: determine whether data read-write operation;When there is no data read-write operation, by idling cycle counting from adding;Judge whether described idling cycle counting reaches predetermined threshold;And when described idling cycle counting reaches predetermined threshold, described storage device is in idle condition.
Preferably, when there being data read-write operation, described idling cycle counting is initialized.
A kind of storage device data compilation method, described method includes: judge to store whether device is in idle condition;And when described storage device is in idle condition, to carrying out data record with SLC block.
Preferably, described judge to store device and whether be in the step of idle condition and include: determine whether data read-write operation;When there is no data read-write operation, by idling cycle counting from adding;Judge whether described idling cycle counting reaches predetermined threshold;And when described idling cycle counting reaches predetermined threshold, described storage device is in idle condition.
Preferably, described include carrying out the step of data record with SLC block: SLC block is analyzed the target SLC block finding needs to arrange;And described target SLC block is carried out data record.
Preferably, before described target SLC block carries out the step of data record, described method also includes: judge whether the accounting of SLC sky block reaches to reclaim threshold value;When the accounting of described SLC sky block reaches to reclaim threshold value, it is analyzed SLC block finding the target SLC block needing to arrange.
Preferably, described method also includes: judge whether the quantity of the SLC sky block after data record reaches to stop reclaiming threshold value;SLC block is carried out statistical analysis and finds the fresh target SLC block needing to arrange;And by fresh target SLC block data record to MLC or TLC sky block.
Compared with prior art, the storage device data compilation method of present embodiment can carry out data compilation when storing device and being in idle condition to the SLC block used, remove from and go again to arrange storing device read-write when, make data write on to greatest extent on SLC block, reach to improve the effect of writing speed.
Accompanying drawing explanation
Fig. 1 is a storage device in an embodiment of the present invention and the module map of electronic installation that connected.
Fig. 2 is the flow chart of a storage device data compilation method in an embodiment of the present invention.
Fig. 3 is the flow chart of a storage device idle condition determination methods in an embodiment of the present invention.
Fig. 4 is the flow chart of a SLC block data compilation method in an embodiment of the present invention.
Fig. 5 is the schematic diagram of a storage device data-handling procedure in an embodiment of the present invention.
Main element symbol description
Electronic installation 1
Processor 11
Random access memory 13
Input/output interface 15
Storage device 2
Control chip 21
First input/output interface 211
Microprocessor 213
Second input/output interface 215
Flash chip 23
Following detailed description of the invention will further illustrate the present invention in conjunction with above-mentioned accompanying drawing.
Detailed description of the invention
As it is shown in figure 1, a storage device 2 can connect with an electronic installation 1.Described electronic installation 1 includes processor 11, random access memory 13 and input/output interface 15.Described storage device 2 includes control chip 21 and a flash chip 23.Described control chip 21 includes one first input/output interface 211, microprocessor 213 and one second input/output interface 215.Described first input/output interface 211 connects described input/output interface 15.Described second input/output interface connects described flash chip 23.Flash chip can be managed by control chip 21, and the data of user be written in flash chip or by the data read-out in flash chip, return to user.
In the present embodiment, described electronic installation 1 can be the systems such as computer, digital camera, mobile phone, multimedia player.Described storage device 2 can be USB flash disk or the solid state hard disc including nand flash memory.Described flash chip comprises multiple memory block (block), and each memory block comprises multiple page (page), and each page comprises multiple byte (byte).
Described electronic installation 1 is connected with described storage device 2 by described input/output interface 15.User sends and reads data, writes the instruction of data or scan data to described processor 11, and described instruction is sent to described storage device 2 by described input/output interface 15 by described processor 11.
Fig. 2 is a kind of flow chart being applied to store the storage device data compilation method in device 2 in an embodiment of the present invention, said method comprising the steps of:
Step 201: judge to store whether device is in idle condition, if judged result is "Yes", then performs step 202, if judged result is "No", then rejudges.
Step 202: SLC block is carried out data compilation.
In general MLC flash, the life-span of MLC block is erasing 10,000 times, and the life-span of flash memory SLC block is erasing 100,000 times, and SLC block is significantly greater than MLC block service life;And in general TLC flash memory, the life-span of TLC block is erasing 3,000 times, the service life of SLC block is also significantly greater than TLC block.It addition, SLC block writing speed is also fast than MLC block and TLC blocks of data writing speed.
When writing data to store in device, for increasing writing speed, can preferentially write on SLC block, but due to SLC block limited amount in the general flash memory of capacity limit.Storage device data compilation method in present embodiment can carry out data compilation when storing device and being in idle condition to the SLC block used, remove from and go again to arrange storing device read-write when, make data write on to greatest extent on SLC block, reach to improve the effect of writing speed.
Fig. 3 is a kind of flow chart storing device idle condition determination methods in embodiment of the present invention, said method comprising the steps of:
Step 301: initiation parameter.
Step 302: determine whether data read-write operation, if judged result is "Yes", then performs step 303, if judged result is "No", then returns to step 305.
Step 303: carry out data read-write operation.
Step 304: idle (Idle) cycle count is initialized after terminating by data read-write operation.The persistent period of the described idling cycle counting non-read-write operation of recorded data.
Step 305: idling cycle counting is from adding.
Step 306: judge whether idling cycle counting reaches predetermined threshold, if judged result is "Yes", then performs step 307, if judged result is "No", then returns to step 302.Described predetermined threshold can need to arrange according to user.When described idling cycle counting reaches predetermined threshold, it is believed that storage device is in idle condition, represent long-time and storage device is not operated.
Step 307: to carrying out data compilation with SLC block, i.e. compress taking with SLC block in the case of not changing valid data, thus increase SLC sky number of blocks.
Step 308: idling cycle counting initializes.
Fig. 4 is the flow chart of a kind of SLC block data compilation method in embodiment of the present invention, said method comprising the steps of:
Step 401: judge whether SLC sky block accounting reaches to reclaim threshold value, if judged result is "Yes", then performs step 402, if judged result is "No", then terminates.Described SLC sky block accounting is the ratio that SLC sky block accounts for SLC block, and described empty block accounting is also by calculating SLC sky number of blocks, by SLC block quantity, realize by modes such as SLC block accountings.Described recovery threshold value can need to arrange according to user, when reclaiming threshold value and being bigger, when the most described SLC sky block accounting is higher, carries out SLC block data compilation, and this storage being applicable to every time carry out larger data is easier to start SLC block data compilation.On the contrary when reclaiming threshold value and being less, when the most described SLC sky block accounting is relatively low, carry out SLC block data compilation, this storage being applicable to every time carry out relatively small data, it is difficult to start SLC block data compilation.
Step 402: SLC block is carried out statistical analysis and finds the target SLC block needing to arrange.When SLC block is carried out statistical analysis, the SLC block that can preferentially choose one or more valid data page accounting relatively low is target SLC block.
Step 403: target SLC block is carried out data record and forms new SLC block in SLC sky block.After target SLC block reclaims, former target SLC block can be erased to SLC sky block, and new SLC block quantity is little compared with former target SLC block.
Step 404: judge whether SLC sky block accounting reaches to stop reclaiming threshold value, if judged result is "Yes", then terminates, if judged result is "No", then perform step 405.The described setting stopping reclaiming threshold value can further determine whether that SLC block arrangement reaches desired effects.Described stopping reclaims threshold value more than reclaiming threshold value.
Step 405: SLC block is carried out statistical analysis and finds the fresh target SLC block needing to arrange.When SLC block is carried out statistical analysis, the SLC block that can preferentially choose one or more valid data page accounting relatively low is target SLC block.
Step 406: by fresh target SLC block data record to MLC or TLC sky block.Owing to MLC or TLC block is big compared with SLC block memory space, SLC sky block accounting can be increased further by MLC or TLC sky block storage, thus realize the no write de-lay of data.
Fig. 5 is the schematic diagram in embodiment of the present invention in a storage device data-handling procedure.
For common flash memory, when user writes data, can only be to specify write logical address, and logical address is determined to the corresponding relation of physical address by firmware management algorithm, on the concrete page of prescribed storage means, and the write operation of memory block can not can only be operated sequentially refunding operation, such as after to certain memory block page 3 write data, page before page 3 cannot be carried out write operation again, so can cause the valid data occurring being interrupted in some memory block.
In present embodiment, can produce the valid data of dispersed arrangement through storage with SLC block, during data record, can be swapped out to new SLC sky block, MLC sky block or TLC sky block with the valid data in SLC block, and arrange in order.Original being wiped free of with SLC block forms new SLC sky block, thus obtains more SLC sky block.In the present embodiment, same memory block can be configured so that SLC block uses, and is also configured as MLC block or TLC block uses.
Those of ordinary skill in the art it is also understood that, realize all or part of step in above-mentioned embodiment method to can be by program and complete to instruct relevant hardware, described program can be in being stored in a computer read/write memory medium, described storage medium, including ROM/RAM, disk, CD etc..
Above content is to combine concrete preferred implementation further description made for the present invention, it is impossible to assert the present invention be embodied as be confined to these explanations.For general technical staff of the technical field of the invention; make some equivalents without departing from the inventive concept of the premise to substitute or obvious modification; and performance or purposes are identical, the scope of patent protection that the present invention is determined all should be considered as belonging to by the claims submitted to.

Claims (10)

1. a storage device data compilation method, it is characterised in that: described method includes:
Judge to store whether device is in idle condition;
When storing device and being in idle condition, it is judged that whether the accounting of SLC sky block reaches to reclaim threshold value;
When the accounting of described SLC sky block reaches to reclaim threshold value, it is analyzed SLC block finding the target SLC block needing to arrange;And
Described target SLC block is carried out data record.
2. the method for claim 1, it is characterised in that: by described target SLC block data record to SLC sky block.
3. method as claimed in claim 2, it is characterised in that: described method also includes:
Judge whether the quantity of the SLC sky block after data record reaches to stop reclaiming threshold value;
SLC block is carried out statistical analysis and finds the fresh target SLC block needing to arrange;And
By in fresh target SLC block data record to MLC or TLC sky block.
4. the method for claim 1, it is characterised in that: described judge to store device and whether be in the step of idle condition and include:
Determine whether data read-write operation;
When there is no data read-write operation, by idling cycle counting from adding;
Judge whether described idling cycle counting reaches predetermined threshold;And
When described idling cycle counting reaches predetermined threshold, described storage device is in idle condition.
5. method as claimed in claim 4, it is characterised in that: when there being data read-write operation, described idling cycle counting is initialized.
6. a storage device data compilation method, it is characterised in that: described method includes:
Judge to store whether device is in idle condition;And
When described storage device is in idle condition, to carrying out data record with SLC block.
7. method as claimed in claim 6, it is characterised in that: described judge whether storage device is in the step of idle condition and includes:
Determine whether data read-write operation;
When there is no data read-write operation, by idling cycle counting from adding;
Judge whether described idling cycle counting reaches predetermined threshold;And
When described idling cycle counting reaches predetermined threshold, described storage device is in idle condition.
8. method as claimed in claim 6, it is characterised in that: described include carrying out the step of data record with SLC block:
It is analyzed SLC block finding the target SLC block needing to arrange;And
Described target SLC block is carried out data record.
9. method as claimed in claim 8, it is characterised in that: before described target SLC block carries out the step of data record, described method also includes: judge whether the accounting of SLC sky block reaches to reclaim threshold value;When the accounting of described SLC sky block reaches to reclaim threshold value, it is analyzed SLC block finding the target SLC block needing to arrange.
10. method as claimed in claim 9, it is characterised in that: described method also includes:
Judge whether the quantity of the SLC sky block after data record reaches to stop reclaiming threshold value;
SLC block is carried out statistical analysis and finds the fresh target SLC block needing to arrange;And
By in fresh target SLC block data record to MLC or TLC sky block.
CN201510032136.5A 2015-01-22 2015-01-22 Data arrangement method of storage device Pending CN105867834A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510032136.5A CN105867834A (en) 2015-01-22 2015-01-22 Data arrangement method of storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510032136.5A CN105867834A (en) 2015-01-22 2015-01-22 Data arrangement method of storage device

Publications (1)

Publication Number Publication Date
CN105867834A true CN105867834A (en) 2016-08-17

Family

ID=56623503

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510032136.5A Pending CN105867834A (en) 2015-01-22 2015-01-22 Data arrangement method of storage device

Country Status (1)

Country Link
CN (1) CN105867834A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106354659A (en) * 2016-08-29 2017-01-25 许继集团有限公司 Method on FLASH resource recovery of embedded device
CN106598878A (en) * 2016-12-27 2017-04-26 湖南国科微电子股份有限公司 Method for separating cold data and hot data of solid state disk
CN106802772A (en) * 2016-12-30 2017-06-06 北京联想核芯科技有限公司 The method of data record, device and solid state hard disc
CN107291381A (en) * 2017-05-18 2017-10-24 记忆科技(深圳)有限公司 The implementation method and solid state hard disc of a kind of dynamic accelerating region of solid state hard disc
CN111324292A (en) * 2018-12-14 2020-06-23 衡宇科技股份有限公司 Memory recovery method of nonvolatile memory
CN111324281A (en) * 2018-12-14 2020-06-23 北京兆易创新科技股份有限公司 Memory and control method and device thereof
WO2020186455A1 (en) * 2019-03-19 2020-09-24 华为技术有限公司 Data storage method and storage chip
CN111966302A (en) * 2020-08-26 2020-11-20 南京扬贺扬微电子科技有限公司 SPI Nand data writing method based on logical and physical mapping table

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101526923A (en) * 2009-04-02 2009-09-09 成都市华为赛门铁克科技有限公司 Data processing method, device thereof and flash-memory storage system
US20120023348A1 (en) * 2010-07-26 2012-01-26 Apple Inc. Methods and systems for dynamically controlling operations in a non-volatile memory to limit power consumption
CN103914392A (en) * 2014-04-03 2014-07-09 深圳市硅格半导体有限公司 Blank block recycling method and device for flash memory

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101526923A (en) * 2009-04-02 2009-09-09 成都市华为赛门铁克科技有限公司 Data processing method, device thereof and flash-memory storage system
US20120023348A1 (en) * 2010-07-26 2012-01-26 Apple Inc. Methods and systems for dynamically controlling operations in a non-volatile memory to limit power consumption
CN103914392A (en) * 2014-04-03 2014-07-09 深圳市硅格半导体有限公司 Blank block recycling method and device for flash memory

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106354659A (en) * 2016-08-29 2017-01-25 许继集团有限公司 Method on FLASH resource recovery of embedded device
CN106354659B (en) * 2016-08-29 2019-07-19 许继集团有限公司 A kind of method of the FLASH resource reclaim of embedded device
CN106598878A (en) * 2016-12-27 2017-04-26 湖南国科微电子股份有限公司 Method for separating cold data and hot data of solid state disk
CN106598878B (en) * 2016-12-27 2020-05-26 湖南国科微电子股份有限公司 Solid state disk cold and hot data separation method
CN106802772A (en) * 2016-12-30 2017-06-06 北京联想核芯科技有限公司 The method of data record, device and solid state hard disc
CN106802772B (en) * 2016-12-30 2020-02-14 深圳忆联信息系统有限公司 Data recovery method and device and solid state disk
CN107291381B (en) * 2017-05-18 2020-04-28 记忆科技(深圳)有限公司 Method for realizing dynamic acceleration area of solid state disk and solid state disk
CN107291381A (en) * 2017-05-18 2017-10-24 记忆科技(深圳)有限公司 The implementation method and solid state hard disc of a kind of dynamic accelerating region of solid state hard disc
CN111324292A (en) * 2018-12-14 2020-06-23 衡宇科技股份有限公司 Memory recovery method of nonvolatile memory
CN111324281A (en) * 2018-12-14 2020-06-23 北京兆易创新科技股份有限公司 Memory and control method and device thereof
CN111324281B (en) * 2018-12-14 2024-02-06 兆易创新科技集团股份有限公司 Memory and control method and device thereof
WO2020186455A1 (en) * 2019-03-19 2020-09-24 华为技术有限公司 Data storage method and storage chip
CN113574497A (en) * 2019-03-19 2021-10-29 华为技术有限公司 Data storage method and storage chip
CN111966302A (en) * 2020-08-26 2020-11-20 南京扬贺扬微电子科技有限公司 SPI Nand data writing method based on logical and physical mapping table

Similar Documents

Publication Publication Date Title
CN105867834A (en) Data arrangement method of storage device
CN107368429B (en) Data storage device, memory controller, data management method thereof and data block management method
US9645896B2 (en) Data storage device and flash memory control method
US8762629B2 (en) Data conditioning to improve flash memory reliability
US20160062885A1 (en) Garbage collection method for nonvolatile memory device
KR102295208B1 (en) Storage device dynamically allocating program area and program method thererof
US20100122016A1 (en) Dynamic slc/mlc blocks allocations for non-volatile memory
CN111475425B (en) Method for managing flash memory module and related flash memory controller and electronic device
CN104346292B (en) method for managing a memory device, memory device and controller
CN101681300A (en) Memory system
US9535611B2 (en) Cache memory for hybrid disk drives
TW201310454A (en) Flash memory controller
CN111158579B (en) Solid state disk and data access method thereof
CN106484307B (en) Storage management method, memorizer control circuit unit and memory storage apparatus
TW201905711A (en) Data storage device and method for operating non-volatile memory
CN115114180A (en) Method and related controller for performing wear leveling operation in flash memory and storage system
CN112230849A (en) Memory control method, memory storage device and memory controller
CN105868046B (en) The method of management, write-in and loading firmware code in storage device
US20230195324A1 (en) Storage device
US20230266884A1 (en) Operating method for storage controller and storage system including same
CN110442299B (en) Data writing method, memory control circuit unit and memory storage device
CN111583976B (en) Data writing method, memory control circuit unit and memory storage device
KR102333746B1 (en) Method for operating storage device managing wear level depending on reuse period
KR102324686B1 (en) Data storage with improved read performance by avoiding line discharge
TW201704999A (en) Memory management method, memory control circuit unit and memory storage device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20160817

RJ01 Rejection of invention patent application after publication