WO2020133728A1 - 一种存储数据的动态回收处理方法及存储装置 - Google Patents
一种存储数据的动态回收处理方法及存储装置 Download PDFInfo
- Publication number
- WO2020133728A1 WO2020133728A1 PCT/CN2019/078403 CN2019078403W WO2020133728A1 WO 2020133728 A1 WO2020133728 A1 WO 2020133728A1 CN 2019078403 W CN2019078403 W CN 2019078403W WO 2020133728 A1 WO2020133728 A1 WO 2020133728A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- capacity
- blocks
- slc
- data
- threshold
- Prior art date
Links
Classifications
-
- 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
-
- 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/0893—Caches characterised by their organisation or structure
Definitions
- the invention relates to the technical field of memory, and in particular to a dynamic recovery processing method and storage device for storing data.
- TLC FLASH storage products generally use SLC mode to cache data in some TLC blocks.
- the effective data cached in the SLC block will be transferred to the TLC block.
- the number of SLC blocks It will be greatly reduced, only a small number of SLC blocks are reserved for buffering data, generally 128 blocks. Due to the small number of SLC blocks, the number of data recovery increases and the product performance decreases.
- the purpose of the present invention is to address the problem of product performance degradation due to the large number of data recovery times in the above-mentioned prior art, and propose a dynamic recovery processing method and storage device for storing data, which can effectively improve product performance.
- a dynamic recovery processing method for stored data including:
- mapping table determine whether the corresponding storage unit exists in the logical address
- SLC blocks and TLC blocks are used to store data dynamically
- the internal reclaimed data of the SLC block and/or the reclaimed data of the TLC block are dynamically used.
- the effective logical capacity is the total capacity of storage units corresponding to all logical addresses in the mapping table
- SLC blocks and TLC blocks are used to store data dynamically, including:
- the dynamic use of SLC blocks and TLC blocks to store data also includes:
- the dynamic use of SLC blocks and TLC blocks to store data also includes:
- Detecting whether the effective logical capacity is greater than the second capacity threshold and less than or equal to the third capacity threshold if so, partly uses SLC blocks to store data, and the other part uses TLC blocks to store data, and the number of SLC blocks is less than the TLC The number of blocks.
- dynamically using the internal reclaimed data of the SLC block and/or the reclaimed data of the TLC block includes:
- the stored data in the SLC block is transferred to the TLC block.
- the effective logical capacity is greater than the second capacity threshold and less than or equal to the third capacity threshold, and the number of SLC empty blocks is less than the second number threshold, the stored data in the SLC block Transferred to the corresponding TLC block, the remaining SLC block internally recovers data.
- the first capacity threshold is 1/3 of the system capacity
- the second capacity threshold is 1/2 of the system capacity
- the third capacity threshold is 2/3 of the system capacity
- the first quantity threshold is 90% of the total number of SLC blocks when the effective logical capacity is less than or equal to the first capacity threshold
- the second quantity threshold is 90% of the number of SLC blocks when the effective logical capacity is greater than the first capacity threshold and less than or equal to the second capacity threshold;
- the third quantity threshold is 128.
- a storage device includes a main control unit and a storage module.
- the storage module is used to store multiple instructions.
- the main control unit is used to read the instructions and execute:
- mapping table determine whether the corresponding storage unit exists in the logical address
- SLC blocks and TLC blocks are used to store data dynamically
- the internal reclaimed data of the SLC block and/or the reclaimed data of the TLC block are dynamically used.
- the method and device for dynamically recovering stored data provided by the present invention adopt different recovery modes to dynamically recover data according to the size of the effective logical capacity, which can effectively reduce the number of recovery times and improve product performance and stability.
- FIG. 1 is a flowchart of an embodiment of a method for dynamically recovering stored data according to the present invention.
- FIG. 2 is a flowchart of another embodiment of a method for dynamically recovering stored data according to the present invention.
- FIG. 3 is a schematic structural diagram of an embodiment of a storage device provided by the present invention.
- this embodiment provides a dynamic recovery processing method for stored data, including:
- Step S101 Receive a data write command and obtain the logical address in the data write command
- Step S102 Determine whether there is a corresponding storage unit in the logical address according to a pre-established mapping table
- Step S103 if there is no corresponding storage unit in the logical address, add 1 to the effective logical capacity and update the mapping table;
- Step S104 calculating the effective logical capacity according to the mapping table
- Step S105 dynamically use the SLC block and the TLC block to store data according to the size of the effective logical capacity
- step S106 according to the size of the effective logical capacity and the number of SLC empty blocks, the internally recovered data of the SLC block and/or the recovered data of the TLC block are dynamically used.
- step S101 is executed to detect whether a user's data write command is received, and if so, obtain the logical address in the data write command.
- step S102 is executed to determine whether a corresponding storage unit exists at the logical address according to a pre-established mapping table, where the mapping table is used to store the mapping relationship between the logical address and the storage unit.
- step S103 is executed to determine whether the corresponding storage unit exists in the logical address, that is, whether the logical address has a mapping record. If the corresponding storage unit does not exist in the logical address, the effective logical capacity is increased by 1, and the mapping is updated Table, if the corresponding storage unit exists in the logical address, the effective logical capacity is not added.
- step S104 is executed to calculate an effective logical capacity according to a mapping table, where the effective logical capacity is a total capacity of storage units corresponding to all logical addresses in the mapping table.
- step S105 is executed to dynamically use the SLC block and the TLC block to store data according to the size of the effective logical capacity, which specifically includes:
- the first capacity threshold is 1/3 of the system capacity
- the system capacity is the total capacity of the system reported by the storage device.
- the effective logical capacity is less than 1/3 of the system capacity, all SLC blocks are used. Store data, and performance is optimal at this time.
- the dynamic use of SLC blocks and TLC blocks to store data also includes:
- the second capacity threshold is 1/2 of the system capacity.
- SLC block storage is mainly used at this time.
- there are a small number of TLC blocks to store data that is, the number of SLC blocks is greater than the number of TLC blocks.
- the dynamic use of SLC blocks and TLC blocks to store data also includes:
- Detecting whether the effective logical capacity is greater than the second capacity threshold and less than or equal to the third capacity threshold if so, partly uses SLC blocks to store data, and the other part uses TLC blocks to store data, and the number of SLC blocks is less than the TLC The number of blocks.
- the third capacity threshold is 2/3 of the system capacity. If the effective logical capacity is less than 1/2 system capacity and less than or equal to 2/3 system capacity, the TLC block is mainly used to store data. A small number of SLC blocks store data, that is, there are more TLC blocks than SLC blocks.
- step S106 is performed, referring to FIG. 2, based on the size of the effective logical capacity and the number of SLC empty blocks, the internal recycling data of the SLC block and/or the recycling data of the TLC block are dynamically used, specifically including:
- the stored data in the SLC block is transferred to the TLC block.
- the third quantity threshold is the minimum number of SLC blocks in the conventional design, generally 128 blocks.
- the effective logical capacity is greater than 2/3 of the system capacity, the number of SLC empty blocks is detected. If the SLC empty blocks The number is less than the first number threshold, then data recovery, at this time, because the data is mainly stored in the TLC block, a small part is stored in the SLC block, the number of TLC blocks is more than the number of SLC blocks, so all the SLC blocks The data is transferred to the TLC block, and only part of the SLC block is reserved as a hot data buffer.
- the effective logical capacity is greater than the second capacity threshold and less than or equal to the third capacity threshold, and the number of SLC empty blocks is less than the second number threshold, the stored data in the SLC block Transferred to the corresponding TLC block, the remaining SLC block internally recovers data.
- the effective logical capacity is greater than 1/2 system capacity and less than or equal to 2/3 system capacity
- the second quantity threshold is the current SLC block 90% of the total number. If the number of SLC empty blocks is less than the second number threshold, that is, less than 90% of the total amount, data recovery is required.
- the data is mainly stored in the SLC block, and a small part is stored in the TLC block.
- the number of SLC blocks is more than the number of TLC blocks. Part of the stored data of the SLC blocks is transferred to the corresponding TLC blocks. The remaining part of the SLC block data is recovered inside the SLC block, invalid data is recovered and the SLC blocks are released.
- the effective logical capacity is greater than the first capacity threshold and less than or equal to the second capacity threshold, and the number of empty SLC blocks is less than the first number threshold, all the internal SLA block reclaim data is used .
- the effective logical capacity is greater than the first capacity threshold and less than or equal to the second capacity threshold, it is detected whether the number of SLC empty blocks is less than the first quantity threshold, and the first quantity threshold is 90% of the total number of current SLC blocks. If the number of SLC empty blocks is less than the first number threshold, that is, less than 90% of the total, data recovery is performed. Since there are no TLC blocks at this time, all SLC blocks are used to store data. The performance is optimal at this time, so the data is recovered inside the SLC block and does not need to be transferred to the TLC block.
- SLC Single-Level Cell
- TLC Multiple-Level Cell
- the SLC block and the TLC block can be switched to each other.
- the method for dynamically recovering stored data uses different recovery modes to dynamically recover data according to the size of the effective logical capacity, which can effectively reduce the number of recovery times and improve product performance and stability.
- this embodiment provides a storage device, including a main control unit 201 and a storage module 202.
- the storage module 202 is used to store multiple instructions, and the main control unit 201 is used to read the instructions and execute:
- mapping table determine whether the corresponding storage unit exists in the logical address
- SLC blocks and TLC blocks are used to store data dynamically
- the internally recovered data of the SLC block and/or the recovered data of the TLC block are dynamically used.
- the effective logical capacity is the total capacity of storage units corresponding to all logical addresses in the mapping table.
- main control unit 201 is also used to execute:
- main control unit 201 is also used to execute:
- main control unit 201 is also used to execute:
- Detecting whether the effective logical capacity is greater than the second capacity threshold and less than or equal to the third capacity threshold if so, partly uses SLC blocks to store data, and the other part uses TLC blocks to store data, and the number of SLC blocks is less than the TLC The number of blocks.
- main control unit 201 is also used to execute:
- the stored data in the SLC block is transferred to the TLC block.
- main control unit 201 is also used to execute:
- the stored data in the SLC block is transferred to the corresponding In the TLC block, the remaining SLC block recovers data internally.
- main control unit 201 is also used to execute:
- the first capacity threshold is 1/3 of the system capacity
- the second capacity threshold is 1/2 of the system capacity
- the third capacity threshold is 2/3 of the system capacity
- the first quantity threshold is 90% of the total number of SLC blocks when the effective logical capacity is less than or equal to the first capacity threshold;
- the second quantity threshold is 90% of the number of SLC blocks when the effective logical capacity is greater than the first capacity threshold and less than or equal to the second capacity threshold;
- the third quantity threshold is 128.
- the storage device provided in this embodiment can dynamically recover data according to the size of the effective logical capacity, using different recovery modes, which can effectively reduce the number of recovery times and has high product performance and stability.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Memory System (AREA)
Abstract
一种存储数据的动态回收处理方法及存储装置,方法包括:接收数据写入命令,并获取所述数据写入命令中的逻辑地址(步骤S101);根据预先建立的映射表,判断所述逻辑地址是否存在对应的存储单元(步骤S102);如果所述逻辑地址不存在对应的存储单元,则将有效逻辑容量加1,并更新所述映射表(步骤S103);根据所述映射表计算有效逻辑容量(步骤S104);根据有效逻辑容量的大小,动态使用SLC块以及TLC块存储数据(步骤S105);根据所述有效逻辑容量的大小以及SLC空块的数量,动态使用SLC块内部回收数据和/或TLC块回收数据(步骤S106);根据有效逻辑容量的大小,采用不同的回收模式动态回收数据,能够有效减少回收次数,提高产品性能以及稳定性。
Description
本发明涉及存储器技术领域,尤其涉及一种存储数据的动态回收处理方法及存储装置。
现有的TLC FLASH存储产品,一般会将部分TLC块使用SLC模式来缓存数据,当数据写到一定程度后,会将SLC块中缓存的有效数据转移到TLC块中,此时SLC块的数量会大量减少,只保留少量SLC块用于缓存数据,一般为128块,由于SLC块较少,导致数据的回收次数增加,产品性能下降。
在此处键入技术问题描述段落。
本发明的目的在于针对上述现有技术中的由于数据回收次数多导致的产品性能下降的问题,提出一种存储数据的动态回收处理方法及存储装置,能够有效提高产品性能。
一种存储数据的动态回收处理方法,包括:
接收数据写入命令,并获取所述数据写入命令中的逻辑地址;
根据预先建立的映射表,判断所述逻辑地址是否存在对应的存储单元;
如果所述逻辑地址不存在对应的存储单元,则将有效逻辑容量加1,并更新所述映射表;
根据所述映射表计算有效逻辑容量;
根据有效逻辑容量的大小,动态使用SLC块以及TLC块存储数据;
根据所述有效逻辑容量的大小以及SLC空块的数量,动态使用SLC块内部回收数据和/或TLC块回收数据。
进一步地,所述有效逻辑容量为所述映射表中所有逻辑地址对应的存储单元的总容量;
根据有效逻辑容量的大小,动态使用SLC块以及TLC块存储数据,包括:
检测所述有效逻辑容量是否小于或等于第一容量阈值,如果是,则全部采用SLC块存储数据。
进一步地,根据有效逻辑容量的大小,动态使用SLC块以及TLC块存储数据,还包括:
检测所述有效逻辑容量是否大于第一容量阈值且小于或等于第二容量阈值,如果是,则部分采用SLC块存储数据,另一部分采用TLC块存储数据,且SLC块的数量多于所述TLC块的数量。
进一步地,根据有效逻辑容量的大小,动态使用SLC块以及TLC块存储数据,还包括:
检测所述有效逻辑容量是否大于第二容量阈值且小于或等于第三容量阈值,如果是,则部分采用SLC块存储数据,另一部分采用TLC块存储数据,且SLC块的数量少于所述TLC块的数量。
进一步地,根据所述有效逻辑容量的大小以及SLC空块的数量,动态使用SLC块内部回收数据和/或TLC块回收数据,包括:
如果所述有效逻辑容量大于所述第三容量阈值,且所述SLC空块的数量少于第三数量阈值,则将所述SLC块中的存储数据转移至所述TLC块中。
进一步地,如果所述有效逻辑容量大于所述第二容量阈值且小于或等于第三容量阈值,且所述SLC空块的数量少于第二数量阈值,则将所述SLC块中的存储数据转移至对应的TLC块中,剩余的SLC块内部回收数据。
进一步地,如果所述有效逻辑容量大于所述第一容量阈值且小于或等于所述第二容量阈值,且所述SLC空块的数量少于第一数量阈值,则全部使用SLC块内部回收数据。
进一步地,所述第一容量阈值为系统容量的1/3,所述第二容量阈值为系统容量的1/2,所述第三容量阈值为系统容量的2/3。
进一步地,第一数量阈值为有效逻辑容量小于或等于第一容量阈值时SLC块总数量的90%;
所述第二数量阈值为有效逻辑容量大于第一容量阈值且小于或等于第二容量阈值时SLC块数量的90%;
第三数量阈值为128。
一种存储装置,包括主控单元和存储模块,所述存储模块用于存储多条指令,所述主控单元用于读取所述指令并执行:
接收数据写入命令,并获取所述数据写入命令中的逻辑地址;
根据预先建立的映射表,判断所述逻辑地址是否存在对应的存储单元;
如果所述逻辑地址不存在对应的存储单元,则将有效逻辑容量加1,并更新所述映射表;
根据所述映射表计算有效逻辑容量;
根据有效逻辑容量的大小,动态使用SLC块以及TLC块存储数据;
根据所述有效逻辑容量的大小以及SLC空块的数量,动态使用SLC块内部回收数据和/或TLC块回收数据。
本发明提供的存储数据的动态回收处理方法及存储装置,根据有效逻辑容量的大小,采用不同的回收模式动态回收数据,能够有效减少回收次数,提高产品性能以及稳定性。
在此处键入有益效果描述段落。
图1 为本发明提供的存储数据的动态回收处理方法一种实施例的流程图。
图2为本发明提供的存储数据的动态回收处理方法另一种实施例的流程图。
图3为本发明提供的存储装置一种实施例的结构示意图。
在此处键入本发明的最佳实施方式描述段落。
为使本发明的目的、技术方案及效果更加清楚、明确,以下参照附图并举实施例对本发明进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本发明,并不用于限定本发明。
实施例一
参考图1,本实施例提供一种存储数据的动态回收处理方法,包括:
步骤S101,接收数据写入命令,并获取所述数据写入命令中的逻辑地址;
步骤S102,根据预先建立的映射表,判断所述逻辑地址是否存在对应的存储单元;
步骤S103,如果所述逻辑地址不存在对应的存储单元,则将有效逻辑容量加1,并更新所述映射表;
步骤S104,根据所述映射表计算有效逻辑容量;
步骤S105,根据有效逻辑容量的大小,动态使用SLC块以及TLC块存储数据;
步骤S106,根据所述有效逻辑容量的大小以及SLC空块的数量,动态使用SLC块内部回收数据和/或TLC块回收数据。
具体地,执行步骤S101,检测是否接收到用户的数据写入命令,如果是,则获取数据写入命令中的逻辑地址。
进一步地,执行步骤S102,根据预先建立的映射表,判断该逻辑地址是否存在对应的存储单元,所述映射表用于存储逻辑地址和存储单元的映射关系。
进一步地,执行步骤S103,判断逻辑地址是否存在对应的存储单元,即逻辑地址是否有映射记录,如果所述逻辑地址不存在对应的存储单元,则将有效逻辑容量加1,并更新所述映射表,如果逻辑地址存在对应的存储单元,则有效逻辑容量不加。
进一步地,执行步骤S104,根据映射表计算有效逻辑容量,所述有效逻辑容量为所述映射表中所有逻辑地址对应的存储单元的总容量。
进一步地,执行步骤S105,根据有效逻辑容量的大小,动态使用SLC块以及TLC块存储数据,具体包括:
检测所述有效逻辑容量是否小于或等于第一容量阈值,如果是,则全部采用SLC块存储数据。
作为一种优选的实施方式,第一容量阈值为系统容量的1/3,系统容量为存储装置上报系统的总容量,当有效逻辑容量小于系统容量的1/3时,此时全部采用SLC块存储数据,此时的性能最优。
更进一步地,根据有效逻辑容量的大小,动态使用SLC块以及TLC块存储数据,还包括:
检测所述有效逻辑容量是否大于第一容量阈值且小于或等于第二容量阈值,如果是,则部分采用SLC块存储数据,另一部分采用TLC块存储数据,且SLC块的数量多于所述TLC块的数量。
作为一种优选的实施方式,第二容量阈值为系统容量的1/2,当有效逻辑容量大于系统容量的1/3且小于或等于系统容量的1/2时,此时主要采用SLC块存储数据,同时有少部分TLC块存储数据,即SLC块的数量多于TLC块的数量。
更进一步地,根据有效逻辑容量的大小,动态使用SLC块以及TLC块存储数据,还包括:
检测所述有效逻辑容量是否大于第二容量阈值且小于或等于第三容量阈值,如果是,则部分采用SLC块存储数据,另一部分采用TLC块存储数据,且SLC块的数量少于所述TLC块的数量。
作为一种优选的实施方式,第三容量阈值为系统容量的2/3,如果有效逻辑容量小于1/2系统容量且小于或等于2/3系统容量,则主要采用TLC块存储数据,同时有少部分SLC块存储数据,即TLC块的数量多于SLC块的数量。
进一步地,执行步骤S106,参考图2,根据所述有效逻辑容量的大小以及SLC空块的数量,动态使用SLC块内部回收数据和/或TLC块回收数据,具体包括:
如果所述有效逻辑容量大于所述第三容量阈值,且所述SLC空块的数量少于第三数量阈值,则将所述SLC块中的存储数据转移至所述TLC块中。
作为一种优选的实施方式,第三数量阈值为常规设计中SLC块的最少数量,一般为128块,当有效逻辑容量大于2/3系统容量时,检测SLC空块的数量,如果SLC空块的数量少于第一数量阈值,则进行数据回收,此时由于数据主要存储在TLC块中,少部分存储在SLC块中,TLC块的数量多于SLC块数量,因此将全部SLC块中的数据转移至TLC块中,只保留部分SLC块作为热数据缓冲。
进一步地,如果所述有效逻辑容量大于所述第二容量阈值且小于或等于第三容量阈值,且所述SLC空块的数量少于第二数量阈值,则将所述SLC块中的存储数据转移至对应的TLC块中,剩余的SLC块内部回收数据。
作为一种优选的实施方式,如果有效逻辑容量大于1/2系统容量且小于或等于2/3系统容量,检测SLC空块的数量是否少于第二数量阈值,第二数量阈值为当前SLC块总数量的90%,如果SLC空块数量少于第二数量阈值,即少于总量的90%,则需要进行数据回收,此时数据主要存储在SLC块中,少部分存储在TLC块中,SLC块的数量多于TLC块数量,将部分SLC块的存储数据转移至对应的TLC块中,剩余部分SLC块数据在SLC块内部进行回收,回收无效数据并释放SLC块。
进一步地,如果所述有效逻辑容量大于所述第一容量阈值且小于或等于所述第二容量阈值,且所述SLC空块的数量少于第一数量阈值,则全部使用SLA块内部回收数据。
作为一种优选的实施方式,如果有效逻辑容量大于所述第一容量阈值且小于或等于所述第二容量阈值,则检测SLC空块的数量是否少于第一数量阈值,第一数量阈值为当前SLC块总数量的90%,如果SLC空块的数量少于第一数量阈值,即少于总量的90% ,则进行数据回收,由于此时没有TLC块,全部采用SLC块存储数据,此时性能最优,因此数据在SLC块内部回收,不需要转移至TLC块中。
SLC(Single-Level Cell ,单层单元),用于临时保存数据,容量小、速度快。
TLC(Triple-Level Cell ,三层单元,),用于长期保存数据,容量大、数量多。
SLC块和TLC块可以相互切换。
本实施例提供的存储数据的动态回收处理方法,根据有效逻辑容量的大小,采用不同的回收模式动态回收数据,能够有效减少回收次数,提高产品性能以及稳定性。
实施例二
参考图3,本实施例提供一种存储装置,包括主控单元201和存储模块202,存储模块202用于存储多条指令,主控单元201用于读取所述指令并执行:
接收数据写入命令,并获取所述数据写入命令中的逻辑地址;
根据预先建立的映射表,判断所述逻辑地址是否存在对应的存储单元;
如果所述逻辑地址不存在对应的存储单元,则将有效逻辑容量加1,并更新所述映射表;
根据所述映射表计算有效逻辑容量;
根据有效逻辑容量的大小,动态使用SLC块以及TLC块存储数据;
根据所述有效逻辑容量的大小以及SLC空块的数量,动态使用SLC块内部回收数据和/或TLC块回收数据。
作为一种优选的实施方式,所述有效逻辑容量为所述映射表中所有逻辑地址对应的存储单元的总容量。
进一步地,主控单元201还用于执行:
检测所述有效逻辑容量是否小于或等于第一容量阈值,如果是,则全部采用SLC块存储数据。
进一步地,主控单元201还用于执行:
检测所述有效逻辑容量是否大于第一容量阈值且小于或等于第二容量阈值,如果是,则部分采用SLC块存储数据,另一部分采用TLC块存储数据,且SLC块的数量多于所述TLC块的数量。
进一步地,主控单元201还用于执行:
检测所述有效逻辑容量是否大于第二容量阈值且小于或等于第三容量阈值,如果是,则部分采用SLC块存储数据,另一部分采用TLC块存储数据,且SLC块的数量少于所述TLC块的数量。
进一步地,主控单元201还用于执行:
如果所述有效逻辑容量大于所述第三容量阈值,且所述SLC空块的数量少于第三数量阈值,则将所述SLC块中的存储数据转移至所述TLC块中。
进一步地,主控单元201还用于执行:
如果所述有效逻辑容量大于所述第二容量阈值且小于或等于第三容量阈值,且所述SLC空块的数量少于第二数量阈值,则将所述SLC块中的存储数据转移至对应的TLC块中,剩余的SLC块内部回收数据。
进一步地,主控单元201还用于执行:
如果所述有效逻辑容量大于所述第一容量阈值且小于或等于所述第二容量阈值,且所述SLC空块的数量少于第一数量阈值,则全部使用SLC块内部回收数据。
作为一种优选的实施方式,所述第一容量阈值为系统容量的1/3,所述第二容量阈值为系统容量的1/2,所述第三容量阈值为系统容量的2/3。
作为一种优选的实施方式,所述第一数量阈值为有效逻辑容量小于或等于第一容量阈值时SLC块总数量的90%;
所述第二数量阈值为有效逻辑容量大于第一容量阈值且小于或等于第二容量阈值时SLC块数量的90%;
第三数量阈值为128。
本实施例提供的存储装置,能够根据有效逻辑容量的大小,采用不同的回收模式动态回收数据,能够有效减少回收次数,产品性能以及稳定性较高。
应当理解的是,对本领域普通技术人员来说,可以根据上述说明加以改进或变换,而所有这些改进和变换都应属于本发明所附权利要求的保护范围。
在此处键入工业实用性描述段落。
在此处键入序列表自由内容描述段落。
Claims (10)
- 一种存储数据的动态回收处理方法,其特征在于,包括:接收数据写入命令,并获取所述数据写入命令中的逻辑地址;根据预先建立的映射表,判断所述逻辑地址是否存在对应的存储单元;如果所述逻辑地址不存在对应的存储单元,则将有效逻辑容量加1,并更新所述映射表;根据所述映射表计算有效逻辑容量;根据有效逻辑容量的大小,动态使用SLC块以及TLC块存储数据;根据所述有效逻辑容量的大小以及SLC空块的数量,动态使用SLC块内部回收数据和/或TLC块回收数据。
- 根据权利要求1所述的存储数据的动态回收处理方法,其特征在于,所述有效逻辑容量为所述映射表中所有逻辑地址对应的存储单元的总容量;根据有效逻辑容量的大小,动态使用SLC块以及TLC块存储数据,包括:检测所述有效逻辑容量是否小于或等于第一容量阈值,如果是,则全部采用SLC块存储数据。
- 根据权利要求2所述的存储数据的动态回收处理方法,其特征在于,根据有效逻辑容量的大小,动态使用SLC块以及TLC块存储数据,还包括:检测所述有效逻辑容量是否大于第一容量阈值且小于或等于第二容量阈值,如果是,则部分采用SLC块存储数据,另一部分采用TLC块存储数据,且SLC块的数量多于所述TLC块的数量。
- 根据权利要求3所述的存储数据的动态回收处理方法,其特征在于,根据有效逻辑容量的大小,动态使用SLC块以及TLC块存储数据,还包括:检测所述有效逻辑容量是否大于第二容量阈值且小于或等于第三容量阈值,如果是,则部分采用SLC块存储数据,另一部分采用TLC块存储数据,且SLC块的数量少于所述TLC块的数量。
- 根据权利要求4所述的存储数据的动态回收处理方法,其特征在于,根据所述有效逻辑容量的大小以及SLC空块的数量,动态使用SLC块内部回收数据和/或TLC块回收数据,包括:如果所述有效逻辑容量大于所述第三容量阈值,且所述SLC空块的数量少于第三数量阈值,则将所述SLC块中的存储数据转移至所述TLC块中。
- 根据权利要求5所述的存储数据的动态回收处理方法,其特征在于,如果所述有效逻辑容量大于所述第二容量阈值且小于或等于第三容量阈值,且所述SLC空块的数量少于第二数量阈值,则将所述SLC块中的存储数据转移至对应的TLC块中,剩余的SLC块内部回收数据。
- 根据权利要求6所述的存储数据的动态回收处理方法,其特征在于,如果所述有效逻辑容量大于所述第一容量阈值且小于或等于所述第二容量阈值,且所述SLC空块的数量少于第一数量阈值,则全部使用SLC块内部回收数据。
- 根据权利要求7所述的存储数据的动态回收处理方法,其特征在于,所述第一容量阈值为系统容量的1/3,所述第二容量阈值为系统容量的1/2,所述第三容量阈值为系统容量的2/3。
- 根据权利要求8所述的存储数据的动态回收处理方法,其特征在于,所述第一数量阈值为有效逻辑容量小于或等于第一容量阈值时SLC块总数量的90%;所述第二数量阈值为有效逻辑容量大于第一容量阈值且小于或等于第二容量阈值时SLC块数量的90%;第三数量阈值为128。
- 一种存储装置,其特征在于,包括主控单元和存储模块,所述存储模块用于存储多条指令,所述主控单元用于读取所述指令并执行:接收数据写入命令,并获取所述数据写入命令中的逻辑地址;根据预先建立的映射表,判断所述逻辑地址是否存在对应的存储单元;如果所述逻辑地址不存在对应的存储单元,则将有效逻辑容量加1,并更新所述映射表;根据所述映射表计算有效逻辑容量;根据有效逻辑容量的大小,动态使用SLC块以及TLC块存储数据;根据所述有效逻辑容量的大小以及SLC空块的数量,动态使用SLC块内部回收数据和/或TLC块回收数据。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811626099.0 | 2018-12-28 | ||
CN201811626099.0A CN109815166B (zh) | 2018-12-28 | 2018-12-28 | 一种存储数据的动态回收处理方法及存储装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020133728A1 true WO2020133728A1 (zh) | 2020-07-02 |
Family
ID=66602695
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/078403 WO2020133728A1 (zh) | 2018-12-28 | 2019-03-16 | 一种存储数据的动态回收处理方法及存储装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109815166B (zh) |
WO (1) | WO2020133728A1 (zh) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110782941B (zh) * | 2019-09-12 | 2021-05-04 | 深圳市德明利技术股份有限公司 | 一种存储设备测试和自动分bin的方法、装置以及设备 |
CN112882663B (zh) * | 2021-03-25 | 2022-10-14 | 湖南国科微电子股份有限公司 | 一种随机写的方法、电子设备及存储介质 |
CN117677938A (zh) * | 2021-09-07 | 2024-03-08 | 华为技术有限公司 | 一种管理数据的方法和装置 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130304964A1 (en) * | 2012-05-11 | 2013-11-14 | Phison Electronics Corp. | Data processing method, and memory controller and memory storage device using the same |
CN106325764A (zh) * | 2015-07-08 | 2017-01-11 | 群联电子股份有限公司 | 存储器管理方法、存储器控制电路单元与存储器存储装置 |
CN107357534A (zh) * | 2017-07-18 | 2017-11-17 | 深圳市德名利电子有限公司 | 一种闪存块模式的动态切换方法及系统 |
CN107967121A (zh) * | 2017-10-25 | 2018-04-27 | 华为技术有限公司 | 数据写入方法和存储设备 |
CN108255419A (zh) * | 2017-12-19 | 2018-07-06 | 深圳忆联信息系统有限公司 | 一种用于tlc类型ssd的磨损均衡方法及ssd |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5066241B2 (ja) * | 2010-09-24 | 2012-11-07 | 株式会社東芝 | メモリシステム |
TWI479313B (zh) * | 2012-07-11 | 2015-04-01 | Phison Electronics Corp | 資料寫入方法、記憶體控制器與記憶體儲存裝置 |
CN103942151A (zh) * | 2014-04-10 | 2014-07-23 | 深圳市硅格半导体有限公司 | 闪存的数据存储方法及装置 |
CN107291381B (zh) * | 2017-05-18 | 2020-04-28 | 记忆科技(深圳)有限公司 | 一种固态硬盘动态加速区的实现方法及固态硬盘 |
CN107506137A (zh) * | 2017-08-11 | 2017-12-22 | 记忆科技(深圳)有限公司 | 一种提升固态硬盘写性能的方法 |
-
2018
- 2018-12-28 CN CN201811626099.0A patent/CN109815166B/zh active Active
-
2019
- 2019-03-16 WO PCT/CN2019/078403 patent/WO2020133728A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130304964A1 (en) * | 2012-05-11 | 2013-11-14 | Phison Electronics Corp. | Data processing method, and memory controller and memory storage device using the same |
CN106325764A (zh) * | 2015-07-08 | 2017-01-11 | 群联电子股份有限公司 | 存储器管理方法、存储器控制电路单元与存储器存储装置 |
CN107357534A (zh) * | 2017-07-18 | 2017-11-17 | 深圳市德名利电子有限公司 | 一种闪存块模式的动态切换方法及系统 |
CN107967121A (zh) * | 2017-10-25 | 2018-04-27 | 华为技术有限公司 | 数据写入方法和存储设备 |
CN108255419A (zh) * | 2017-12-19 | 2018-07-06 | 深圳忆联信息系统有限公司 | 一种用于tlc类型ssd的磨损均衡方法及ssd |
Also Published As
Publication number | Publication date |
---|---|
CN109815166A (zh) | 2019-05-28 |
CN109815166B (zh) | 2020-10-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9003247B2 (en) | Remapping data with pointer | |
WO2018059361A1 (zh) | 一种存储系统掉电保护方法、存储控制器及电子设备 | |
WO2020133728A1 (zh) | 一种存储数据的动态回收处理方法及存储装置 | |
CN109952565B (zh) | 内存访问技术 | |
US9086991B2 (en) | Solid state drive cache recovery in a clustered storage system | |
CN105095116A (zh) | 缓存替换的方法、缓存控制器和处理器 | |
US8051333B2 (en) | Memory failure recovery method, information processing apparatus, and program | |
US8438325B2 (en) | Method and apparatus for improving small write performance in a non-volatile memory | |
CN109582217A (zh) | 数据储存装置与将数据写入存储器装置的方法 | |
CN113760185B (zh) | 内存块回收方法和装置 | |
CN102831072B (zh) | 闪存设备及其管理方法、数据读写方法及读写装置 | |
TW201202926A (en) | Memory management device and memory management method | |
TWI498899B (zh) | 資料寫入方法、記憶體控制電路單元與記憶體儲存裝置 | |
US11467970B1 (en) | Metadata management in non-volatile memory devices using in-memory journal | |
WO2015196378A1 (zh) | 读写闪存中数据的方法、装置及用户设备 | |
US11886728B2 (en) | Undo capability for memory devices | |
CN104679684A (zh) | 半导体器件及其操作方法 | |
US20130254511A1 (en) | Improving Storage Lifetime Using Data Swapping | |
TW202318209A (zh) | 條件更新,延遲查找 | |
JP2004220068A (ja) | メモリカード及びメモリへのデータ書き込み方法 | |
US20170075590A1 (en) | Method for providing nonvolatile storage write bandwidth using a caching namespace | |
US11782762B2 (en) | Stack management | |
CN108780424A (zh) | 提供用于动态随机存取存储器dram高速缓存标记的空间高效存储 | |
CN117882042A (zh) | 存储器装置的撤销能力 | |
CN104268035A (zh) | 一种存储数据的恢复方法 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19903515 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19903515 Country of ref document: EP Kind code of ref document: A1 |