WO2017000658A1 - 存储系统、存储管理装置、存储器、混合存储装置及存储管理方法 - Google Patents
存储系统、存储管理装置、存储器、混合存储装置及存储管理方法 Download PDFInfo
- Publication number
- WO2017000658A1 WO2017000658A1 PCT/CN2016/081000 CN2016081000W WO2017000658A1 WO 2017000658 A1 WO2017000658 A1 WO 2017000658A1 CN 2016081000 W CN2016081000 W CN 2016081000W WO 2017000658 A1 WO2017000658 A1 WO 2017000658A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data
- logical block
- block
- written
- page
- Prior art date
Links
Images
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/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/06—Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
-
- 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/06—Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
- G06F12/0646—Configuration or reconfiguration
-
- 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
- G11—INFORMATION STORAGE
- G11C—STATIC STORES
- G11C8/00—Arrangements for selecting an address in a digital store
- G11C8/06—Address interface arrangements, e.g. address buffers
-
- 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/1016—Performance improvement
- G06F2212/1024—Latency reduction
-
- 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/22—Employing cache memory using specific memory technology
- G06F2212/222—Non-volatile memory
-
- 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/7205—Cleaning, compaction, garbage collection, erase control
Definitions
- the present invention relates to the field of storage technologies, and in particular, to a storage system, a storage management device, a memory, a hybrid storage device, and a storage management method.
- SSD Solid state disk
- HDD hard disk
- the new data can be written, and the SSD read and write unit is the page, but the erased unit is the physical block, so in the right
- the updated data needs to be written to another idle location, and the original data is set to be invalid.
- the physical block with more invalid data is selected for erasing.
- the physical block erased by the SSD may include a large number of valid pages, which requires re-copying the data of the valid pages to another idle location, and then erasing the data in the physical block to be erased.
- the data of these valid pages is re-copied to another idle location, which additionally increases the writing of data, which causes the write amplification of the SSD.
- SSD write amplification will reduce the performance of the SSD and shorten the life of the SSD.
- Embodiments of the present invention provide an SSD memory management apparatus and method for reducing write amplification problems generated by an SSD memory during data erasing.
- a first aspect of the embodiments of the present invention provides a storage system, including a memory and a manager;
- the memory includes a plurality of physical blocks
- the manager is configured to receive a data write request, determine a data category of the data page to be written, specify a different logical block for the data page to be written with different data categories, and send a data write instruction to the memory, where the specified Each logical block corresponds to a data page to be written of the same data category, and the data write instruction carries a data page to be written corresponding to the specified at least one logical block;
- the memory is configured to receive the data write instruction, and write, according to the data write instruction, a page to be written corresponding to the at least one logic block into a physical block corresponding to the at least one logic block, where A page to be written corresponding to one logical block is written into at least one physical block, and each of the physical blocks is written with a page to be written corresponding to the same logical block.
- a correspondence between a physical block and a logical block is further pre-configured in the memory, where each physical block corresponds to one logical block, and each logical block corresponds to at least one a physical block;
- the manager is further configured to further carry information of the at least one logical block in the data write instruction
- the memory After receiving the data write instruction, the memory is specifically configured to: query a correspondence between the physical block and the logic block according to information of the at least one logical block in the data write instruction, and determine the at least one And a physical block corresponding to the logical block, the page to be written corresponding to the at least one logical block is written into the physical block corresponding to the at least one logical block.
- the storage system further includes at least one cache, where a capacity of each cache is less than or equal to a capacity of each logical block;
- the manager After receiving the data write request, the manager is specifically configured to: write data pages to be written with different data categories into different caches, where each cache writes a data page to be written of the same data category. Specifying at least one logical block for a data page of the same data category in each of the filled buffers, and transmitting a data write instruction to the memory, the data write instruction carrying information of the at least one logical block and the at least One logical block corresponding To be written to the data page;
- the memory is specifically configured to: allocate a physical block to the at least one logical block according to the data write instruction, and write a data page corresponding to the at least one logical block into the In the allocated physical block, wherein the physical block to which each of the at least one logical block is allocated is a free physical block in the memory, and the free physical block is marked as non-distributed after being allocated Idle, the total capacity of the physical blocks allocated to each of the at least one logical block is greater than or equal to the capacity of each of the at least one logical block.
- the memory is further configured to: according to information of the at least one logic block in the data write instruction, and the at least one logic block is The information of the allocated physical block records the correspondence between the physical block and the logical block.
- the manager is further configured to record the in the at least one logic block a logical address of each data page to be written corresponding to the at least one logical block, and a data category of the data page corresponding to the at least one logical block.
- the manager is further configured to determine, according to a data page corresponding to each logical block, a logical block to be erased, The memory sends an erase command, the erase command carrying information of the logic block to be erased;
- the memory is further configured to receive the erase instruction, and determine a physical block to be erased according to the information of the logical block to be erased in the erase instruction and the correspondence between the physical block and the logical block. And erasing the physical block to be erased.
- the data category is cold data and hot data determined according to a frequency at which data is accessed; the manager is further configured to When it is determined that the stored data page needs to be updated, the logical address of the stored data page recorded in the logical block corresponding to the stored data page is invalid;
- the manager is configured to determine, according to a data page corresponding to each logical block, a to-be-erased
- the logic block specifically includes: selecting a logical block whose data category is hot data, or a logical block having a large number of invalid logical addresses as the logical block to be erased.
- the data category is cold data and hot data determined according to a frequency at which data is accessed; the manager is configured to use each Determining, by the data page corresponding to the logic block, the logic block to be erased specifically includes: selecting a logical block whose data category is cold data as the logical block to be erased;
- the manager is further configured to carry an indication that the garbage collection is prohibited at the erasing instruction.
- the manager before sending the erasure command to the memory, The manager is further configured to determine, according to a preset migration policy, the data page to be migrated in the logical block to be erased, and send a data migration instruction to the memory, where the data migration instruction carries the data to be migrated Page information
- the memory is further configured to migrate the data pages to be migrated in the memory according to the data migration instruction.
- the manager is further configured to determine, according to a preset migration policy, the to-be-erased logical block to be migrated
- the data page specifically includes: determining, as the data page to be migrated, a data page in which the current data category of the logical block to be erased is hot data and the logical address is valid.
- a storage management apparatus for use in a storage system including a memory, the memory including a plurality of physical blocks, and the storage management apparatus includes:
- a classification module configured to receive a data write request, and determine a data category of the data page to be written
- a logic block management module configured to specify different logical blocks for the data pages to be written with different data categories according to the classification result of the classification module, where each logical block specified corresponds to the same data category to be written Data page
- a write instruction module configured to send a data write instruction to the memory according to the logic block specified by the logic block management module for the data page to be written, wherein the data
- the write instruction carries a page to be written corresponding to the at least one logic block
- the data write instruction is used to instruct the memory to write the page to be written corresponding to the at least one logic block into the The physical block corresponding to the at least one logical block, wherein the data page to be written corresponding to the same logical block is written into at least one physical block, and each physical block is written with a data page to be written corresponding to the same logical block.
- the data write instruction further carries the at least one logical block information
- the data write instruction is specifically configured to instruct the memory to query a correspondence between a physical block and a logical block preset in the memory according to information of the at least one logical block in the data write instruction, and determine the at least one And a physical block corresponding to the logical block, the page to be written corresponding to the at least one logical block is written into the physical block corresponding to the at least one logical block.
- the storage management apparatus further includes:
- a cache write module configured to write, according to the classification result of the classification module, a data page to be written with different data categories into different caches, and the data pages to be written of the same data category are written into the same cache,
- the capacity of each cache is less than or equal to the capacity of each logical block;
- the logic block management module is configured to specify a logic block for a data page of the same data category in each filled cache
- the write instruction module is specifically configured to send a data write instruction to the memory according to the logic block specified by the logic block management module for the data page to be written, where the data write instruction carries the at least one logic block Information and a data page corresponding to the at least one logic block, the data write instruction is specifically configured to instruct the memory to allocate a physical block for the at least one logical block, and write a data page corresponding to the at least one logical block Into the allocated physical block, wherein each of the at least one logical block is allocated a physical block that is a free physical block in the memory, and the free physical block is assigned to be marked as non- Idle, the total capacity of each of the at least one logical block being allocated is greater than or equal to the capacity of each of the at least one logical block the amount.
- the logic block management module is further configured to record the at least one logic in the at least one logic block a logical address of each data page to be written corresponding to the block, and a data category of the data page corresponding to the at least one logical block.
- the storage management apparatus further includes an erasure instruction module, configured to determine, according to the data page corresponding to each logic block, An erased logic block, sending an erase command to the memory, the erase command carrying information of the logic block to be erased, the erase command being used to indicate that the memory is in accordance with the erase command And the correspondence between the physical block and the logical block set in the memory, the physical block to be erased, and the physical block to be erased.
- an erasure instruction module configured to determine, according to the data page corresponding to each logic block, An erased logic block, sending an erase command to the memory, the erase command carrying information of the logic block to be erased, the erase command being used to indicate that the memory is in accordance with the erase command And the correspondence between the physical block and the logical block set in the memory, the physical block to be erased, and the physical block to be erased.
- the data category is cold data and hot data determined according to a frequency at which data is accessed; the logic block management module further uses When it is determined that the stored data page needs to be updated, the logical address of the stored data page recorded in the logical block corresponding to the stored data page is invalid;
- the determining, by the erasing instruction module, the logic block to be erased specifically includes: selecting a logical block whose data category is hot data, or a logical block having a large number of invalid logical addresses as the logical block to be erased.
- the erase command module is further configured to carry an indication that prohibiting garbage collection is performed in the erase command.
- the storage management apparatus further includes a migration instruction module, where the erasure instruction module is Before sending the erase command to the memory, The migration instruction module is configured to determine, according to a preset migration policy, a data page to be migrated in the logic block to be erased, and send a data migration instruction to the memory, where the data migration instruction carries the to-be-migrated Information of the data page, the data migration instruction is used to instruct the memory to migrate the data page to be migrated in the memory.
- the migration instruction module determines, according to a preset migration policy, a specific data page to be migrated in the logical block to be erased
- the method includes: determining, in the logical block to be erased, a data page whose current data category is hot data and the logical address is valid as the data page to be migrated.
- a memory comprising:
- a receiving module configured to receive a data write instruction, where the data write instruction carries a data page to be written corresponding to the at least one logic block, where the data write instruction is determined by the manager to determine a data category of the data page to be written, and Transmitting after a different logical block is specified for a data page to be written with different data categories, where each logical block specified corresponds to a data page to be written of the same data category;
- a write module configured to write, according to the data write instruction, a page to be written corresponding to the at least one logical block into a physical block corresponding to the at least one logical block, where the same logical block corresponds to be written
- the inbound data page is written into at least one physical block, and each physical block is written with a data page to be written corresponding to the same logical block.
- the memory includes a preset physical block and a logical block, where each physical block corresponds to one logical block, and each logical block corresponds to At least one physical block;
- the data write command received by the receiving module further carries the at least one logical block information
- the writing module is specifically configured to: query the physical component pre-configured by the configuration module according to the information of the at least one logical block in the data write instruction a physical block corresponding to the at least one logical block, and a data page to be written corresponding to the at least one logical block is written into a physical block corresponding to the at least one logical block.
- the data write instruction Writing, by the manager, the data pages to be written with different data categories into different caches, and then transmitting at least one logical block after the data pages of the same data category in each full cache is sent, wherein Each cache writes a data page to be written of the same data category;
- the writing module is specifically configured to: allocate a physical block to the at least one logical block according to the data write instruction, and correspond the at least one logical block Data pages are written to the allocated physical blocks, wherein each of the at least one logical block is allocated a physical block that is a free physical block in the memory, and the free physical block is allocated Marked as non-idle, the total capacity of each of the at least one logical block being allocated is greater than or equal to the capacity of each of the at least one logical block.
- the writing module is further configured to: according to the information of the at least one logic block in the data write instruction, and the at least The information of a physical block to which a logical block is allocated, and the correspondence between the physical block and the logical block is recorded.
- the receiving module is further configured to receive an erasing instruction sent by the manager, where the erasing instruction is the manager After determining the logical block to be erased, the erasing instruction carries information of the logical block to be erased;
- the memory further includes an erasing module, configured to determine a physical block to be erased according to information of the logical block to be erased in the erasing instruction and a correspondence between the physical block and the logical block, and The physical block to be erased is erased.
- an erasing module configured to determine a physical block to be erased according to information of the logical block to be erased in the erasing instruction and a correspondence between the physical block and the logical block, and The physical block to be erased is erased.
- the receiving module is further configured to receive a data migration instruction sent by the manager, where the data migration instruction is And the data migration instruction carries the information of the data page to be migrated, where the data migration instruction is sent after determining the data page to be migrated in the logical block to be erased;
- the memory further includes a migration module, configured to migrate the data pages to be migrated in the memory according to the data migration instruction.
- a fourth aspect a hybrid storage device, comprising: a hard disk, the manager in any one of the implementations of the second aspect, and the memory according to any one of the third aspects, wherein the memory is The cache of disk storage.
- a fifth aspect provides a storage management method for a storage system including a memory, the memory including a plurality of physical blocks, the method comprising:
- the memory writes, according to the data write instruction, a page to be written corresponding to the at least one logical block into a physical block corresponding to the at least one logical block, where a data page to be written corresponding to the same logical block Write to at least one physical block, each of which writes a data page to be written corresponding to the same logical block.
- the data write instruction further carries the at least one logic block information
- the data write instruction further instructs the memory to query a correspondence between a physical block and a logical block preset in the memory according to the information of the at least one logical block in the data write instruction, and determine the at least one logical block. And corresponding physical blocks, the data pages to be written corresponding to the at least one logical block are written into the physical blocks corresponding to the at least one logical block.
- the method further includes:
- the data pages to be written with different data categories are written into different caches, and the data pages to be written of the same data category are written into the same cache, and the capacity of each cache is less than or equal to the capacity of each logical block. ;
- the data write instruction is specifically configured to instruct the memory to allocate a physical block for the at least one logical block, and write a data page corresponding to the at least one logical block to the allocated physical block, where the at least one The physical block to which each logical block in the logical block is allocated is a free physical block in the memory, and the free physical block is allocated as non-idle after being allocated, each logical block in the at least one logical block
- the total capacity of the allocated physical blocks is greater than or equal to the capacity of each of the at least one logical block.
- the method further includes recording, in the at least one logical block, a logical address of each page to be written corresponding to the at least one logical block, and recording a data category of the data page corresponding to the at least one logical block.
- the method further includes determining, according to a data page corresponding to each logical block, a logical block to be erased, to the memory Sending an erase command carrying information of the logic block to be erased, the erase command being used to indicate that the memory is according to the logic block to be erased in the erase instruction.
- the information and the correspondence between the physical block and the logical block set in the memory determine the physical block to be erased, and erase the physical block to be erased.
- the data category is cold data and hot data determined according to a frequency at which data is accessed; the method further includes: determining When the updated data page needs to be updated, the logical address of the stored data page recorded in the logical block corresponding to the stored data page is invalid;
- the determining the logical block to be erased specifically includes: selecting a logical block whose data category is hot data, or a logical block having a large number of invalid logical addresses as the logical block to be erased.
- the data category is cold data and heat determined according to a frequency at which data is accessed. number;
- the determining the logical block to be erased specifically includes: selecting a logical block whose data category is cold data as the logical block to be erased;
- the erasure command carries an indication that garbage collection is prohibited.
- a seventh possible implementation before the sending the erasing instruction to the memory, Determining a migration policy to determine a data page to be migrated in the logical block to be erased, and sending a data migration instruction to the memory, where the data migration instruction carries information about the data page to be migrated, the data The migration instruction is used to instruct the memory to migrate the data page to be migrated in the memory.
- the determining, by the preset migration policy, the data page to be migrated in the logic block to be erased specifically includes: The data page in the logical block to be erased whose current data category is hot data and whose logical address is valid is determined as the data page to be migrated.
- a storage management method for use in a memory
- the data write instruction carrying a data page to be written corresponding to at least one logic block, wherein the data write instruction is determined by the manager to determine a data category of the data page to be written, and is different in data type
- the data page to be written is sent after the different logical blocks are specified, wherein each of the specified logical blocks corresponds to the data page to be written of the same data category;
- a page to be written corresponding to the at least one logical block into a physical block corresponding to the at least one logical block, wherein at least a data page to be written corresponding to the same logical block is written at least In a physical block, each physical block is written with a data page to be written corresponding to the same logical block.
- the memory includes a preset physical block and a logical block, where each physical block corresponds to one logical block, and each logical block corresponds to At least one physical block;
- the data write instruction further carries the at least one logical block information
- the at least the data write instruction After receiving the data write instruction, the at least the data write instruction will be the at least Writing a data page to be written corresponding to a logical block into a physical block corresponding to the at least one logical block is specifically: querying the physical block and the logical block according to information of the at least one logical block in the data write instruction Corresponding relationship, determining a physical block corresponding to the at least one logical block, and writing a page to be written corresponding to the at least one logical block into a physical block corresponding to the at least one logical block.
- the data write instruction is that the manager writes a data page to be written with different data categories into different caches, for each full cache Data pages of the same data category are specified after at least one logical block is written, wherein each cache writes a data page to be written of the same data category;
- the data page to be written corresponding to the at least one logical block is written into the physical block corresponding to the at least one logical block according to the data write instruction, specifically: according to the data Writing a command, allocating a physical block to the at least one logical block, and writing a data page corresponding to the at least one logical block to the allocated physical block, wherein each of the at least one logical block is The allocated physical block is a free physical block in the memory, and the free physical block is marked as non-idle after being allocated, and the total capacity of each of the at least one logical block allocated to the physical block is greater than Or equal to the capacity of each of the at least one logical block.
- the information of the at least one logical block in the data write instruction and the physical state to which the at least one logical block is allocated The information of the block records the correspondence between the physical block and the logical block.
- the method further includes:
- the method further includes:
- the data pages to be migrated in the memory are migrated according to the data migration instruction.
- a storage manager including: a processor, a memory, a bus, and a communication interface;
- the memory is for storing computer execution instructions
- the processor is coupled to the memory via the bus, and when the computing device is running, the processor executes the computer-executed instructions stored by the memory to enable
- the storage manager is as follows:
- the memory writes, according to the data write instruction, a page to be written corresponding to the at least one logical block into a physical block corresponding to the at least one logical block, where a data page to be written corresponding to the same logical block Write to at least one physical block, each of which writes a data page to be written corresponding to the same logical block.
- a storage manager including: a processor, a memory, a bus, and a communication interface;
- the memory is for storing computer execution instructions
- the processor is coupled to the memory via the bus, and when the computing device is running, the processor executes the computer-executed instructions stored by the memory to enable
- the storage manager performs the following methods:
- the data write instruction carrying a page to be written corresponding to at least one logic block, wherein the data write instruction is determined by the manager in the data page to be written a data category, and is sent after a different logical block is specified for a data page to be written different in the data category, where each logical block specified corresponds to a data page to be written of the same data category;
- a page to be written corresponding to the at least one logical block into a physical block corresponding to the at least one logical block, wherein at least a data page to be written corresponding to the same logical block is written at least In a physical block, each physical block is written with a data page to be written corresponding to the same logical block.
- a computer readable medium comprising computer executed instructions that, when executed by a processor of a computer, execute the following method:
- the memory writes, according to the data write instruction, a page to be written corresponding to the at least one logical block into a physical block corresponding to the at least one logical block, where a data page to be written corresponding to the same logical block Write to at least one physical block, each of which writes a data page to be written corresponding to the same logical block.
- a computer readable medium comprising computer executed instructions that, when executed by a processor of a computer, execute the following method:
- the data write instruction carrying a data page to be written corresponding to at least one logic block, wherein the data write instruction is determined by the manager to determine a data category of the data page to be written, and is different in data type
- the data page to be written is sent after the different logical blocks are specified, wherein each of the specified logical blocks corresponds to the data page to be written of the same data category;
- a storage system including a memory and a manager
- the memory includes a plurality of physical blocks
- the manager is configured to receive a data write request, determine a data category of the data page to be written, and send a data write instruction to the memory, the data write instruction carrying the data page to be written and the to-be-written Data category of the data page;
- the memory is configured to receive the data write instruction, and write, according to the data write instruction, a page to be written corresponding to the at least one data category into a physical block corresponding to the at least one data category, where the same
- the data page to be written corresponding to the data category is written into at least one physical block, and each physical block is written with a data page to be written corresponding to the same data category.
- the invention classifies the data pages to be written, so that the data pages of the same data category are stored on each physical block on the SSD, and since the update steps of the data pages of the same data category are basically the same, each physical block is
- the number of valid data pages is also normally distributed with the data category of the data pages on the physical block. For example, the physical data blocks with hot access data have more invalid data pages, and the access frequency is cold.
- the physical block in which the data is located has fewer invalid data pages.
- the distribution of the validity of such data pages is different from the random write in the prior art.
- the SSD is selected according to the number of invalid data pages during garbage collection.
- the number of valid data pages on the physical block to be erased is inevitably smaller than the number of valid data pages on the physical block to be erased selected by the prior art. Therefore, the method provided by the embodiment of the present invention reduces erasure. Write amplification when the physical block.
- FIG. 1 is an architectural diagram of a system used in the prior art for an SSD as a cache of an HDD.
- FIG. 2 is a schematic diagram showing changes in data addresses when data is updated by an SSD in the prior art.
- FIG. 3 is a structural diagram of a first storage system 30 according to an embodiment of the present invention.
- FIG. 4 is a schematic diagram showing the correspondence between data categories, logical blocks, and physical blocks in the embodiment shown in FIG.
- FIG. 5 is a schematic diagram of a process in which a data page to be written in a data write request is written into an SSD in the embodiment shown in FIG.
- Figure 6 is a diagram showing the change of logical addresses in a logical block when updating stored data in the embodiment shown in Figure 3.
- Figure 7 is a diagram showing the migration of data in a physical block to be erased prior to erasing a physical block in the embodiment of Figure 3.
- FIG. 8 is a structural diagram of a second storage system according to an embodiment of the present invention.
- FIG. 9 is a block diagram of a first storage management apparatus according to an embodiment of the present invention.
- FIG. 10 is a block diagram of a second storage management apparatus according to an embodiment of the present invention.
- FIG. 11 is a structural diagram of an SSD provided in an embodiment of the present invention.
- FIG. 12 is a structural diagram of a hybrid storage device according to an embodiment of the present invention.
- Figure 13 is a flow chart of a method for a manager to write data to an SSD in an embodiment of the present invention.
- FIG. 14 is a flowchart of a first specific implementation method for a manager to write data into an SSD according to an embodiment of the present invention.
- FIG. 15 is a flowchart of a second specific implementation method for a manager to write data into an SSD according to an embodiment of the present invention.
- FIG. 16 is a flowchart of a method for a manager to control an SSD for data erasing according to an embodiment of the present invention.
- FIG. 17 is a schematic structural diagram of a computer in an embodiment of the present invention.
- the memory in the embodiment of the present invention includes a plurality of physical blocks, the original data is erased to write new data, and the data is written in units of pages, and the data is erased in units of physical blocks.
- the SSD is taken as an example in the following embodiments.
- FIG. 1 is an architectural diagram of a system used in the prior art for an SSD as a cache of an HDD.
- the frequently accessed data is generally stored in the SSD 101, and the SSD 101 and the HDD 102 are collectively managed by the manager 103.
- the manager 103 records which HDD 102 data is cached in the SSD 101 through the mapping table.
- the manager 103 looks up the mapping table and determines whether the requested data is stored on the SSD 101. If the data is stored on the SSD 101, the data is read from the SSD 101; if the data is not on the SSD 101, the data is read from the HDD 102. If the data in the SSD 101 is full, the data is erased and the less frequently used data is replaced.
- the manager 103 may be a controller of the hybrid hard disk, when the SSD and the HDD are independent devices respectively.
- the manager 101 can be loaded into the operating system of the computer or loaded as a separate module in the computer.
- the SSD 101 in FIG. 1 is used as a cache of the HDD. In other application scenarios, the SSD 101 can also be used as a storage device independently.
- the present invention can be applied to the architecture shown in FIG. 1 or used in other application scenarios of the SSD 101.
- the SSD is generally a NAND flash memory and may include multiple physical blocks (eg, 1024), each of which includes multiple physical pages (eg, 64).
- the physical page is the basic unit for reading and writing data
- the physical block is the basic unit for data erasure by SSD.
- the SSD includes a Flash translation layer (FTL), and the FTL can be used to record a correspondence between a logical address (LBA) of a data and a physical block address (PBA) in the SSD.
- LBA logical address
- PBA physical block address
- the FTL may also write the updated “new data” to the idle physical page of the SSD and update the correspondence between the LBA of the data and the PBA in the SSD, and Physical pages containing "old data" are marked as invalid pages.
- the FTL if the data update request is to update the data in page0, the FTL writes the updated page0 data to the physical page whose physical address is n+2, and where the Page0 is located. The physical page ID with physical address n is invalid.
- the FTL selects a physical block with a larger number of invalid pages to erase to free up space to store new data.
- the physical block erased by the SSD may include a large number of valid data pages, it is necessary to migrate the data pages of the valid pages to another free location, and then wipe the data in the physical block that needs to be erased.
- this process is garbage collection. Since the garbage collection process needs to migrate the valid page data to another idle location, additional writes are introduced to the migration of valid pages, increasing the number of data writes within the SSD. That caused the write amplification.
- the technical solution provided by the embodiments of the present invention aims to reduce the problem of write amplification generated when erasing physical blocks.
- the technical solution provided by the embodiment of the present invention is that the data that needs to be written into the SSD is divided into multiple data categories (for example, hot data, common heat data, and cold data) according to the access situation by the manager, and then the SSD is modified by modifying the SSD.
- data of the same data category is stored in the same physical block. Since the update pace of the data pages of the same data category is basically the same, the number of valid data pages on each physical block is also normally distributed with the data category of the data page on the physical block, for example, the access frequency.
- the first storage system 30 includes a manager 301 and an SSD 302.
- the SSD 302 includes a plurality of physical blocks 303.
- the manager 301 receives a data write request, determines a data category of the data page to be written, specifies a different logical block for the data page to be written with different data categories, and sends a data write instruction to the SSD 302, wherein each The logical blocks correspond to data pages to be written of the same data category, and the data write instructions carry data pages to be written corresponding to at least one logical block.
- the SSD 302 is configured to receive the data write instruction, and write, according to the data write instruction, a page to be written corresponding to the at least one logical block into a physical block 303 corresponding to the at least one logical block, where The data pages to be written corresponding to one logical block are written into at least one physical block 303, and each physical block 303 is written with a data page to be written corresponding to the same logical block.
- the data write request received by the manager 301 is used to write data to the SSD 302, and the data written to the SSD 302 may be the data written to the storage system 30 for the first time, or may be The data that is updated on the data stored on the SSD 302 may also be data that is loaded into the SSD 302 from the hard disk (not shown).
- the manager 301 Since the SSD 302 writes data in units of pages, after receiving the data write request, the manager 301 further divides the data to be written included in the data write request into a plurality of data. The page then determines the data category of each data page to be written separately.
- the manager 301 divides the data page into a plurality of data categories.
- the data category is a data access category, and the manager divides the data page into multiple data access categories according to the access characteristics of the data.
- the access feature may be a number of accesses of the data page, or a reuse distance of the data page, or an access frequency of the data page, or a comprehensive feature of the number of accesses and reuse distances of the data page, the number of accesses For the number of times the data page to be written is accessed, the reuse distance is the number of data pages separated between the two accesses of the data page, that is, if a data page is accessed, if the operating system accesses After 7 data pages, the data page is accessed again, and the reused distance of the data page is 7; the access feature may also be the number of times the data page is read or written, etc., and may be accessed according to actual conditions. Feature setting.
- the data access category includes a combination of any two of cold data, hot data or normal heat data or a combination of all categories.
- the access feature is the number of accesses
- the number of times of access (N) greater than or equal to 15 times may be defined as hot data
- the number of accesses is less than 15 times and greater than or equal to 5 times
- the number of visits is less than 5 times, it is cold data.
- the above-mentioned division and definition of the data categories are merely illustrative. In practical applications, the limitation is not limited thereto.
- the data may be classified according to different sources of data, such as data from different applications are classified according to different applications.
- the manager 301 may define a data category for the data in advance, for example, may be written to the first storage system 301 for the first time by default.
- the data category of the data is hot data.
- the correspondence between the data category and the logical block and the corresponding relationship between the logical block and the physical block in the SSD are as shown in FIG. 4, that is, one data category may correspond to at least one logical block, and one logical block may only correspond to one.
- one logical block may correspond to at least one physical block 303 in the SSD 302, and one physical block 303 in the SSD 302 may only correspond to one logical block. In this way, it is ensured that the data pages of the same data category are recorded in each logical block, and only the data in one logical block is stored in each physical block, that is, the data pages storing the same data category.
- the correspondence between the data category and the logical block shown in FIG. 4 may be pre-established by the manager 301, that is, the manager 301 divides the logical space of the SSD 302 into a plurality of logical blocks in advance, and for each data category. Specify at least one logical block, for example, specify logical blocks A and B for hot data, specify logical blocks C and D for normal heat data, and specify logical blocks E and F for cold data.
- the manager 301 determines the data category of the data page to be written, the determined data category of the data page to be written can be specified for the data page to be written.
- Corresponding logic block is pre-established by the manager 301, that is, the manager 301 divides the logical space of the SSD 302 into a plurality of logical blocks in advance, and for each data category. Specify at least one logical block, for example, specify logical blocks A and B for hot data, specify logical blocks C and D for normal heat data, and specify logical blocks E and F for cold data.
- the correspondence between the data category and the logical block shown in FIG. 4 is not pre-established by the manager 301, but after the manager 301 determines the data category of each data page to be written, If the determined data category of the data page to be written has no corresponding logical block, randomly assign a logical block to the data page to be written, and then establish the determined data category of the data page to be written and specify Corresponding relationship of the logical blocks, if the determined data category has a corresponding logical block, the logical block corresponding to the determined data category is specified for the data page to be written.
- the manager 301 is further configured to record each to-be-written corresponding to each logical block in the specified logical block for the data page to be written.
- the logical address of the data page is further configured to record each to-be-written corresponding to each logical block in the specified logical block for the data page to be written.
- a correspondence between the physical block 303 and the logical block is pre-configured in the SSD 302, and each physical block 303 corresponds to one logical block, and each logical block corresponds to at least one physical block 303.
- the correspondence between the physical block 303 and the logical block is as shown in FIG.
- the corresponding relationship between the physical block and the logic block may be queried according to the information of the at least one logical block in the data write command, and the at least one is determined.
- the physical block 303 corresponding to the logical block writes the page to be written corresponding to the at least one logical block into the physical block 303 corresponding to the at least one logical block. In the above manner, data of the same data category can be stored on the same physical block 303.
- the data write request received by the manager 301 includes the data pages to be written page 0, page 1, page 2; the manager 301 determines the respective data categories for the access characteristics according to page 0, page 1, and page 2.
- page 0 is hot data
- page 1 is normal heat data
- page 2 is cold data
- the manager 302 assigns a logical block to each data page according to the category of each data page, wherein A logical block A is specified for the hot data page 0, a logical block C is designated for the normal heat data page 1, and a logical block E is designated for the cold data page 2; alternatively, the manager 302 can also specify a logical block for the data page to be written.
- the manager 301 After the manager 301 specifies the logical block for each data page, the manager 301 transmits the data.
- the data write instruction includes a data page to be written and logical block information of each page to be written (Page0, logical block A; page1, logical block C; page2, logical block E).
- the physical block corresponding to each logical block is determined according to the logical block information of each data page to be written and the corresponding relationship between the physical block and the logical block preset in the SSD 302, that is,
- the logical block A corresponds to the physical block A, B;
- the logical block C corresponds to the physical block C, D;
- the logical block E corresponds to the physical block E, F, and then the SSD 302 stores the data page pag0 to be written to the physical block A or B
- the data page page1 to be written is stored to the physical block C or D, and the data page page 2 to be written is stored to the physical block E or F.
- the manager 301 further specifies, for the data page to be written, each logical block corresponding to each logical block to be written. Entering a logical address of the data page, and determining that the logical address of the stored data page recorded in the logical block corresponding to the stored data page is invalid when it is determined that the stored data page needs to be updated .
- the logical addresses LA0, LA3 of the data pages Page0, page3, page4, and page5 recorded in the logical block A, LA4, LA5 are set to be invalid.
- the manager 301 can learn the data page stored inside the SSD. The category and status can be used to manage the data pages stored in the SSD 302.
- the erasing of the physical block 303 in the SSD 302 can be controlled by the manager 301.
- the manager 301 determines a logical block to be erased, and sends an erase command to the SSD 302.
- the instruction carries information of the logical block to be erased.
- the SSD 302 receives the erase command, and determines a physical block 303 to be erased according to the information of the logical block to be erased in the erase command and the corresponding relationship between the physical block 303 and the logical block. And erasing the physical block 303 to be erased.
- the manager 301 determines a logical block to be erased according to a data page corresponding to each logical block.
- the manager 301 selects a logical block whose data category is hot data, or a logical block with a large number of invalid logical addresses as the logical block to be erased.
- the manager 301 selects a logical block whose data category is cold data as the logical block to be erased.
- the manager 302 determines the data page to be migrated in the logical block to be erased according to a preset migration policy before sending the erasure instruction to the SSD 302. And sending a data migration instruction to the SSD 302, where the data migration instruction carries information about the data page to be migrated.
- the SSD 302 migrates the data pages to be migrated in the SSD 302 according to the data migration instruction.
- the manager 301 determines, as the data page to be migrated, a data page in which the current data category of the to-be-erased logical block is hot data and the logical address is valid.
- the manager 302 specifies a logical block for the data page to be written according to the data type of the data page to be written at the time when the data is written, but since the data type of the data page is changed according to the change of the access feature, the data is After the page is recorded to the logical block, the data category of the data page recorded in the logical block also changes due to the change of the subsequent access feature, for example, if the data category of a data page at the time of writing is hot The data, when assigned to the logical block corresponding to the hot data, is not accessed, becomes cold data, and the data category of a data page at the time of writing is cold data, when assigned to the cold number According to the corresponding logical block, it will become hot data.
- the data category of the data page recorded in the logical block to be erased may be just recorded.
- the data category at the time of the logical block to be erased has been different, so when the logical block to be erased is erased, the category of the data page in the logical block to be erased can be further determined, so that only the specific category is For example, data pages such as hot data or normal heat data are migrated. This can further reduce the number of data migrations, further reducing write amplification.
- the information of the data page to be migrated carried by the data migration instruction is a logical address of a data page to be migrated, and the SSD 302 migrates according to the data after receiving the data migration instruction.
- the logical address of the data page to be migrated in the instruction finds a data page to be migrated in the physical block to be erased, and then migrates the data page to be migrated.
- the manager 301 After determining the data page to be migrated in the logical block to be erased, the manager 301 records the logical address of the data page to be migrated to the logical block corresponding to the data category of the data page to be migrated.
- the data migration instruction sent by the manager 301 to the SSD 302 further carries information of a logical block corresponding to a data category of the data page to be migrated.
- the SSD 302 determines, according to the information about the logical block corresponding to the data category of the data page to be migrated carried in the migration instruction, the physical block corresponding to the logical block corresponding to the data category of the data page to be migrated, The data page to be migrated is migrated to the physical block corresponding to the logical block corresponding to the data category of the data page to be migrated.
- the logical block A is selected as the logical block to be erased because the number of invalid logical pages is relatively large, there are valid logical addresses LA14, LA15, LA16, and LA17 in the logical block A,
- the data categories corresponding to the valid logical addresses LA14 and LA15 are cold data, and the data categories corresponding to LA16 and LA17 are common heat data and hot data, respectively, and the data pages to be migrated are determined to be valid logical addresses LA16 and LA17.
- Corresponding data pages respectively migrate the valid logical address LA16 to the logical block C corresponding to the normal heat data, and migrate the valid logical address LA17 to another logical block B corresponding to the hot data.
- the manager 301 Sending a data migration instruction to the SSD 301, where the data migration instruction carries data to be migrated
- the logical addresses LA16 and LA17 of pages 16 and 17 are recorded, and the logical blocks C and logical blocks B of the logical blocks LA16 and LA17 are recorded.
- the SSD 302 After receiving the data migration instruction, the SSD 302 finds the data pages page 16 and page 17 to be migrated in the physical block B to be erased corresponding to the logical block A to be erased according to the logical addresses LA16 and LA17, and then waits The migrated data page page 16 is migrated to the physical block C corresponding to the logical block of the record logical address LA16, and the data page page 17 to be migrated is migrated to the physical block G corresponding to the logical block of the record logical address LA17. After the data migration is completed, the SSD 302 can erase the physical block A and the physical block B to be erased.
- the second storage system 50 includes a manager 801, an SSD 802, and at least one cache 804.
- the SSD 802 includes a plurality of physical blocks 803.
- the manager 80 After receiving the data write request, the manager 80 writes the data pages to be written with different data categories into different caches 804, and each cache 804 writes the data pages to be written of the same data category.
- a logical block is assigned to the data page of the same category in the full cache 804, and a data write command is sent to the SSD 802, where the data write command carries the cached 804 in the full cache.
- the data page is information of the specified logical block and the data page in the filled cache 804, wherein the capacity of each cache is less than or equal to the capacity of each of the logical blocks.
- the SSD 802 After receiving the data write command, the SSD 802 allocates a physical block 803 to a specified logical block of the data page in the full cache 804 according to the data write instruction, and caches the full cache 804.
- the data page in is written to the allocated physical block 803, wherein the allocated physical block 804 is a free physical block 803 in the SSD, and the free physical block 803 is subsequently marked as non-idle,
- the total capacity of the allocated physical block 803 is greater than or equal to the capacity of the logical block to which the data page in the full cache 804 is designated.
- the idle physical block 804 may be marked as non-idle after the physical block 803 is allocated, or may be marked as non-idle after the data page in the cache 804 is written to the physical block 803.
- the manner in which the data page categories are divided, the correspondence between the data categories and the logical blocks, and the manner in which the logical blocks are specified for the data pages to be written are the same as the first storage system 30, I will not repeat them here.
- a buffer is set for the data page of each data category, and when the data write request is received, the data page to be written of the same data category is first written into the same cache.
- the data write command is sent to the SSD, indicating that the SSD stores the data in the cache that is full in the same physical block, so that the same physical block 803 stores the data of the same data category, and may also increase The granularity of data writes, thereby increasing the efficiency of data writing.
- the data in the physical block 803 is erased, and before the erasure, the data in the physical block 804 to be erased is migrated in the same manner as in the first storage system 30. This will not be repeated here.
- FIG. 9 is a block diagram of a first storage management apparatus according to an embodiment of the present invention.
- the first storage management device 90 is applied to a storage system, the storage system includes an SSD, and the SSD includes a plurality of physical blocks.
- the first storage management device 90 includes a classification module 901, a logical block management module 902, a write indication module 903, an erasure indication module 904, and a migration indication module 905.
- the classification module 901 is configured to receive a data write request and determine a data category of the data page to be written.
- the classification of the data by the classification module 901 is the same as that of the manager 301 of the first storage system 30, and is not described here.
- the logic block management module 902 is configured to specify different logical blocks for data pages to be written with different data categories according to the classification result of the classification module 901, where each specified logical block corresponds to the same data category. Write to the data page.
- the logic block management module 902 specifies different logic blocks for the data pages to be written with different data categories, and the manager 301 of the first storage system 30 specifies different logics for the data pages to be written with different data categories.
- the blocks are in the same way and will not be described here.
- the write indication module 903 is configured to use the logic block management module 902 as described Writing a data write instruction to the SSD, where the data write instruction carries a data page to be written corresponding to at least one specified logic block, where the data write instruction is used to indicate
- the SSD writes, according to the data write instruction, a page to be written corresponding to the at least one specified logical block into a physical block corresponding to the at least one specified logical block, where the same logical block corresponds to be written
- the inbound data page is written into at least one physical block, and each physical block is written with a data page to be written corresponding to the same logical block.
- the data write instruction further instructs the SSD to query a correspondence between a physical block and a logical block set in the SSD according to the information of the at least one specified logical block in the data write instruction, and determine the at least one designation.
- the physical block corresponding to the logical block, the page to be written corresponding to the at least one specified logical block is written into the physical block corresponding to the at least one specified logical block.
- the logical block management module 902 is further configured to record, in the at least one specified logical block, the at least one specified logical block after the different logical blocks are specified for the data pages to be written. a logical address of each data page to be written, and a correspondence between data categories of the data pages corresponding to the at least one specified logical block and the at least one specified logical block.
- the erase indication module 904 is configured to determine a logic block to be erased, and send an erase instruction to the SSD 302, where the erase instruction carries information of the logic block to be erased, and the erase instruction is used to Instructing the SSD to determine a physical block to be erased according to the information of the logical block to be erased in the erasing instruction and the correspondence between the physical block and the logical block set in the SSD, and the erasing device The physical block to be erased.
- the logic block management module 902 sets the logical address of the stored data page recorded in the logical block corresponding to the stored data page when determining that the stored data page needs to be updated. Invalid;
- the erase indication module 904 determines a logical block to be erased according to a data page corresponding to each logical block.
- the erasure indication module 904 selects a logical block whose data category is hot data, or a logical block with a large number of invalid logical addresses as the logical block to be erased.
- the manager 301 selects a logical block whose data category is cold data as the logical block to be erased.
- the migration indication module 905 is configured to determine, according to a preset migration policy, a data page to be migrated in the logic block to be erased. And sending a data migration instruction to the SSD, where the data migration instruction carries information about the data page to be migrated, where the data migration instruction is used to instruct the SSD to record the data page to be migrated in the SSD. Perform the migration.
- the migration indication module 905 determines, as the data page to be migrated, a data page in which the current data category of the to-be-erased logical block is hot data and the logical address is valid.
- FIG. 10 is a block diagram of a second storage management apparatus 100 provided in another embodiment of the present invention.
- the second storage management device 100 is applied to a storage system, the storage system includes an SSD and at least one cache, and the SSD includes a plurality of physical blocks.
- the storage management device 100 includes a classification module 1001, a cache write module 1002, a logic block management module 1003, a write indication module 1004, an erase indication module 1005, and a migration indication module 1006.
- the classification module 1001 is configured to receive a data write request and determine a data category of the data page to be written.
- the cache write module 1002 is configured to write, according to the classification result of the classification module 1001, data pages to be written with different data categories into different caches, and the data pages to be written of the same data category are written.
- the capacity of each cache is less than or equal to the capacity of each logical block.
- the logic block management module 1003 is configured to specify one logical block for the data page of the same data category in each full cache according to the classification result of the classification module 1001.
- the write indication module 1004 is configured to send a data write to the SSD according to the logic block specified by the logical block management module 1003 for the data page to be written when the cache write module 1002 is full.
- An instruction, the data write instruction carrying information of the at least one specified logical block and a data page corresponding to the at least one specified logical block;
- the data write instruction is used to instruct the SSD to allocate a physical block for the at least one specified logical block, and write a data page corresponding to the at least one specified logical block
- the allocated physical block wherein the allocated physical block is a free physical block in the SSD, and the free physical block is subsequently marked as non-idle, and the total capacity of the allocated physical block is greater than or equal to The capacity of the at least one specified logical block.
- the free physical block may be marked as non-idle after the physical block is allocated, or may be marked as non-idle after the data page in the cache is written into the physical block.
- the functions of the erasure indication module 1005 and the migration indication module 1006 are the same as those performed by the erasure indication module 1004 and the migration indication module 1005 in the first storage device 10, and are not described herein again.
- FIG. 11 is a block diagram of an SSD according to an embodiment of the present invention.
- the SSD 11 can be applied to a storage system including a manager.
- the SSD 11 includes a receiving module 1102, a writing module 1103, an erasing module 1104, and a migration module 1105.
- the receiving module 1102 is configured to receive, by the manager, the data write instruction, where the data write instruction carries a page to be written corresponding to at least one specified logical block and the at least one specified logical block information, where The data write instruction is sent by the manager after determining the data category of the data page to be written and specifying different logical blocks for the data pages to be written with different data categories, wherein each specified logical block The data page to be written corresponding to the same data category.
- the writing module 1103 is configured to query, according to information of the at least one specified logical block in the data write instruction, a correspondence between a physical block and a logical block set in the SSD 11, and determine the at least one specified logic.
- a physical block corresponding to the block, the page to be written corresponding to the at least one specified logical block is written into a physical block corresponding to the at least one specified logical block, where each physical block corresponds to one logical block, and each physical block corresponds to one logical block.
- the receiving module 1102 is further configured to receive an erase command sent by the manager, where the erase command is sent after the manager determines a logic block to be erased, and the erase command carries the to-be-erased Information about the logical block.
- the erasing module 1104 is configured to determine, according to the information about the logical block to be erased in the erasure instruction and the correspondence between the physical block and the logical block, the physical to be erased. Blocking, and erasing the physical block to be erased.
- the receiving module 1102 is further configured to receive a data migration instruction sent by the manager, where the data migration instruction is that the manager determines, according to a preset migration policy, the data page to be migrated in the logical block to be erased, and then sends the data page.
- the data migration instruction carries information about the data page to be migrated;
- the migration module 1105 is configured to migrate the data pages to be migrated in the SSD according to the data migration instruction.
- the SSD 11 can also be used in a system including a cache and a manager to receive a data write instruction, the data write instruction is for the manager to write a page to be written with different data categories into different caches, and in the cache When the write is full, at least one logical block is sent after each data page of the same data category in each full cache is written, wherein each cache writes a data page to be written of the same data category.
- the writing module 1103 allocates a physical block to the at least one specified logical block according to the data write instruction, and the at least one specified logic A data page corresponding to the block is written to the allocated physical block, wherein the allocated physical block is a free physical block in the SSD 11, and the free physical block is subsequently marked as non-idle, the allocated physical
- the total capacity of the block is greater than or equal to the capacity of the at least one specified logical block.
- the writing module 1103 is further configured to record the physical block and the logical block according to the information of the at least one specified logical block in the data write instruction and the information of the physical block to which the at least one specified logical block is allocated. Correspondence between them.
- FIG. 12 is a structural diagram of a hybrid storage device 12 according to an embodiment of the present invention.
- the hybrid storage device 12 includes a manager 1201, an SSD 1202, and an HDD 1203, the SSD 1202 serving as a cache of the HDD, and the SSD 1202 includes a plurality of physical blocks 1204.
- the function performed by the manager 1201 is the same as the function performed by the manager 301 of the first storage system 30 or the manager 801 of the second storage system 80, and the functions performed by the SSD 1202 and the first The functions performed by the SSD 302 of a storage system 30 or the SSD 802 of the second storage system 80 are the same, and are not described herein again.
- An embodiment of the present invention further provides a storage management method, where the storage management method is applicable to a storage management system, where the storage management system includes a manager and an SSD, and the SSD includes a plurality of physical blocks.
- the storage management method includes three parts. The first part is a method for the manager to write data to the SSD, and the third part is the method for the manager to control the SSD for data erasing.
- FIG. 13 a flowchart of a method for the manager to write data to the SSD.
- step S1301 the manager receives a data write request and determines a data category of the data page to be written.
- Step S1302 The manager specifies different logical blocks for data pages to be written with different data categories, and each logical block corresponds to a data page to be written of the same data category.
- Step S1303 The manager sends a data write instruction to the SSD, where the data write instruction carries a page to be written corresponding to at least one logical block and the at least one specified logical block information.
- Step S1304 The SSSD receives the data write instruction, and writes a page to be written corresponding to the at least one logical block into a physical block corresponding to the at least one logical block according to the data write instruction.
- the data page to be written corresponding to the same logical block is written into at least one physical block, and each physical block is written with a data page to be written corresponding to the same logical block.
- the method may further include: the manager recording, in the at least one specified logical block, a logical address of each page to be written corresponding to the at least one specified logical block, and Recording a correspondence between data categories of the data pages of the at least one specified logical block and the at least one specified logical block.
- FIG. 14 a flowchart of a first specific implementation method for the manager to write data to the SSD.
- step S1401 the manager receives a data write request and determines a data category of the data page to be written.
- step S1402 the manager specifies different logical blocks for the data pages to be written with different data categories, and each logical block corresponds to the data page to be written of the same data category.
- Step S1403 The manager sends a data write instruction to the SSD, where the data write instruction carries a page to be written corresponding to at least one logical block and the at least one specified logical block information.
- Step S1404 the SSD queries the correspondence between the physical block and the logical block set in the SSD according to the information of the at least one specified logical block in the data write instruction, and determines the physical body corresponding to the at least one specified logical block. Piece.
- Step S1405 the SSD queries the correspondence between the physical block and the logical block set in the SSD according to the information of the at least one specified logical block in the data write instruction, and determines the physical corresponding to the at least one specified logical block. Piece.
- Step S1405 the SSD writes a page to be written corresponding to the at least one specified logical block into a physical block corresponding to the at least one specified logical block.
- the method may further include: the manager recording, in the at least one specified logical block, a logical address of each page to be written corresponding to the at least one specified logical block, and Recording a correspondence between data categories of the data pages of the at least one specified logical block and the at least one specified logical block.
- the storage management system to which the storage management method is applied further includes a plurality of caches.
- the manager writes data to the SSD by the second method.
- FIG. 15 a flow chart of a second specific implementation method for the manager to write data to the SSD.
- step S1501 the manager receives a data write request and determines a data category of the data page to be written.
- Step S1502 the manager writes data pages to be written with different data categories into different caches, and each cache writes a data page to be written of the same data category.
- step S1503 the manager specifies at least one logical block for the data page of the same data category in each full cache when the cache is full.
- Step S1504 the manager sends a data write instruction to the SSD, where the data write instruction carries a page to be written corresponding to at least one logical block and the at least one finger The logical block information.
- Step S1505 the SSD allocates a physical block to the at least one specified logical block according to the data write instruction.
- Step S1506 the SSD writes a data page corresponding to the at least one specified logical block into the allocated physical block.
- Step S1507 the SSD records between the physical block and the logic block according to the information of the at least one specified logical block in the data write instruction and the information of the physical block to which the at least one specified logical block is allocated. Correspondence relationship.
- the method may further include: the manager recording, in the at least one specified logical block, a logical address of each page to be written corresponding to the at least one specified logical block And recording a correspondence between data categories of the data pages of the at least one specified logical block and the at least one specified logical block.
- the storage management method further includes: when it is determined that the stored data page needs to be updated, the manager stores the stored data page recorded in the logical block corresponding to the stored data page The logical address is set to invalid.
- FIG. 16 a flowchart of a method for the manager to control data erasure by the SSD.
- step S1601 the manager determines a logical block to be erased.
- Step S1602 The manager determines, according to a preset migration policy, a data page to be migrated in the logical block to be erased.
- Step 1603 the manager sends a data migration instruction to the SSD, where the data migration instruction carries information about the data page to be migrated.
- Step 1604 the SSD receives the data migration instruction, and migrates the data page to be migrated in the SSD according to the information of the data page to be migrated in the data migration instruction.
- Step 1605 the manager sends an erase command to the SSD, where the erase command carries information of the logical block to be erased.
- Step 1606 the SSD receives the erase command according to the erase command.
- the information of the logical block to be erased and the corresponding relationship between the physical block and the logical block, the physical block to be erased, and the physical block to be erased are erased.
- the manager may determine the logical block with erasure in two ways, the first way is: determining the logical block to be erased according to the number of invalid logical addresses in the designated logical block, wherein the to-be-erased The number of invalid logical addresses included in the divided logical block is greater than a preset value; the second manner is: according to the data category of the data page corresponding to the specified logical block and the specified logical block Corresponding relationship, a logical block whose data category is cold data is selected as the logical block to be erased.
- FIG. 17 is a schematic structural diagram of a storage manager according to an embodiment of the present invention.
- the storage manager of the embodiment of the present invention may include:
- a processor 1701, a memory 1702, a system bus 1704, and a communication interface 1705 The CPU 1701, the memory 1702, and the communication interface 1705 are connected by the system bus 1704 and complete communication with each other.
- the processor 1701 may be a single core or multi-core central processing unit, or a specific integrated circuit, or one or more integrated circuits configured to implement embodiments of the present invention.
- the memory 1702 may be a high speed RAM memory or a non-volatile memory such as at least one disk memory.
- Memory 1702 is for computer execution instructions 1703. Specifically, the program code may be included in the computer execution instruction 1703.
- the processor 1701 runs the computer execution instructions 1703, which may perform the method flow described in any of Figures 13-16.
- the embodiment of the present invention further provides a computer readable medium, comprising computer executed instructions, when the processor of the computer executes the computer execution instruction, the computer performs the method of any one of Figures 13-16.
- the function performed by the SSD of the present invention improves the FTL of the SSD, and is executed by the FTL of the SSD, and can also be an independent functional module embedded in the SSD.
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)
- Microelectronics & Electronic Packaging (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Memory System (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
访问特征 | 类别 |
N>=15次 | 热数据 |
5次<N<=15次 | 普通热度数据 |
N<5次 | 冷数据 |
Claims (46)
- 一种存储系统,包括存储器和管理器;所述存储器包括多个物理块;所述管理器用于接收数据写请求,确定待写入数据页的数据类别,为数据类别不同的待写入数据页指定不同的逻辑块,并向所述存储器发送数据写指令,其中,所指定的每个逻辑块对应同一种数据类别的待写入数据页,所述数据写指令携带所指定的至少一个逻辑块对应的待写入数据页;所述存储器用于接收所述数据写指令,根据所述数据写指令,将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中,其中,同一个逻辑块对应的待写入数据页写入至少一个物理块中,每个物理块中写入同一个逻辑块对应的待写入数据页。
- 如权利要求1所述的存储系统,其特征在于,所述存储器中还预先配置物理块与逻辑块的对应关系,其中,所述每个物理块对应一个逻辑块,每个逻辑块对应至少一个物理块;则,所述管理器还用于在所述数据写指令中进一步携带所述至少一个逻辑块的信息;所述存储器在接收到所述数据写指令后,具体用于:根据所述数据写指令中的所述至少一个逻辑块的信息查询所述物理块与逻辑块的对应关系,确定所述至少一个逻辑块对应的物理块,将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中。
- 如权利要求1所述的存储系统,其特征在于,所述存储系统还包括至少一个缓存,每个缓存的容量小于或等于所述每个逻辑块的容量;所述管理器在接收数据写请求之后,具体用于:将数据类别不同的待写入数据页写入不同的缓存中,所述每个缓存中写入同一种数据 类别的待写入数据页,为每个写满的缓存中的同一种数据类别的数据页指定至少一个逻辑块,向所述存储器发送数据写指令,所述数据写指令携带所述至少一个逻辑块的信息和所述至少一个逻辑块对应的待写入数据页;所述存储器在接收到所述数据写指令后,具体用于:根据所述数据写指令,为所述至少一个逻辑块分配物理块,以及将所述至少一个逻辑块对应的数据页写入所述分配的物理块中,其中,所述至少一个逻辑块中的每个逻辑块被分配的物理块为所述存储器中的空闲物理块,且所述空闲物理块在被分配之后被标记为非空闲,所述至少一个逻辑块中的每个逻辑块被分配的物理块的总容量大于或等于所述至少一个逻辑块中的每个逻辑块的容量。
- 如权利要求3所述的存储系统,其特征在于,所述存储器还用于根据所述数据写指令中的所述至少一个逻辑块的信息以及所述至少一个逻辑块被分配的物理块的信息,记录物理块与逻辑块之间的对应关系。
- 如权利要求2或4所述的存储系统,其特征在于,所述管理器还用于在所述至少一个逻辑块中记录所述至少一个逻辑块对应的每个待写入数据页的逻辑地址。
- 如权利要求5所述的存储系统,其特征在于,所述管理器还用于根据每个逻辑块对应的数据页,确定待擦除的逻辑块,向所述存储器发送擦除指令,所述擦除指令携带所述待擦除的逻辑块的信息;所述存储器还用于接收所述擦除指令,根据所述擦除指令中的所述待擦除的逻辑块的信息和所述物理块与逻辑块的对应关系,确定待擦除的物理块,以及擦除所述待擦除的物理块。
- 如权利要求6所述的存储系统,其特征在于,所述数据类别为根据数据被访问的频率确定的冷数据和热数据;所述管理器还用于在确定需要对已存储的数据页进行更新时,将所述已存储的数据页对应的逻辑块中记录的所述已存储的数据页的逻辑地址置为无效;所述管理器用于根据每个逻辑块对应的数据页,确定待擦除的逻 辑块具体包括:选择数据类别为热数据的逻辑块。
- 如权利要求6所述的存储系统,其特征在于,所述管理器还用于在确定需要对已存储的数据页进行更新时,将所述已存储的数据页对应的逻辑块中记录的所述已存储的数据页的逻辑地址置为无效;所述管理器用于根据每个逻辑块对应的数据页,确定待擦除的逻辑块具体包括:选择无效逻辑地址数量多的逻辑块作为所述待擦除的逻辑块。
- 如权利要求6所述的存储系统,其特征在于,所述数据类别为根据数据被访问的频率确定的冷数据和热数据;所述管理器用于根据每个逻辑块对应的数据页,确定待擦除的逻辑块具体包括:选择数据类别为冷数据的逻辑块作为所述待擦除的逻辑块;所述管理器还用于在所述擦除指令携带禁止垃圾回收的指示。
- 如权利要求6至9中任意一项所述的存储系统,其特征在于,所述管理器在向所述存储器发送所述擦除指令之前,所述管理器还用于根据预设的迁移策略确定所述待擦除的逻辑块中待迁移的数据页,并向所述存储器发送数据迁移指令,所述数据迁移指令携带所述待迁移的数据页的信息;所述存储器还用于根据所述数据迁移指令将所述存储器中所述待迁移的数据页进行迁移。
- 如权利要求10所述的存储系统,其特征在于,所述管理器还用于根据预设的迁移策略确定所述待擦除的逻辑块中待迁移的数据页具体包括:将所述待擦除的逻辑块中当前数据类别为热数据且逻辑地址有效的数据页确定为所述待迁移的数据页。
- 一种存储管理装置,其特征在于,应用于包括存储器的存储系统,所述存储器包括多个物理块,所述存储管理装置包括:分类模块,用于接收数据写请求,确定待写入数据页的数据类别;逻辑块管理模块,用于根据所述分类模块的分类结果,为数据类别不同的待写入数据页指定不同的逻辑块,其中,所指定的每个逻辑块对应同一种数据类别的待写入数据页;写入指令模块,用于根据所述逻辑块管理模块为所述待写入数据页指定的逻辑块,向所述存储器发送数据写指令,其中,所述数据写指令携带至少一个逻辑块对应的待写入数据页,所述数据写指令用于指示所述存储器根据所述数据写指令将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中,其中,同一个逻辑块对应的待写入数据页写入至少一个物理块中,每个物理块中写入同一个逻辑块对应的待写入数据页。
- 如权利要求12所述的存储管理装置,其特征在于,所述数据写指令中进一步携带所述至少一个逻辑块信息;所述数据写指令具体用于指示所述存储器根据所述数据写指令中的所述至少一个逻辑块的信息查询所述存储器中预设的物理块与逻辑块的对应关系,确定所述至少一个逻辑块对应的物理块,将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中。
- 如权利要求12所述的存储管理装置,其特征在于,所述存储管理装置还包括:缓存写入模块,用于根据所述分类模块的分类结果,将数据类别不同的待写入数据页写入不同的缓存中,同一种数据类别的待写入数据页被写入同一缓存中,每个缓存的容量小于或等于所述每个逻辑块的容量;所述逻辑块管理模块用于为每个写满的缓存中的同一种数据类别的数据页指定一个逻辑块;所述写入指令模块具体用于根据所述逻辑块管理模块为所述待写入数据页指定的逻辑块,向所述存储器发送数据写指令,所述数据写指令携带所述至少一个逻辑块的信息和所述至少一个逻辑块对应的数据页,所述数据写指令具体用于指示所述存储器为所述至少一个逻辑块分配物理块,以及将所述至少一个逻辑块对应的数据页写入所述分配的物理块,其中,所述至少一个逻辑块中的每个逻辑块被分配的物理块为所述存储器中的空闲物理块,且所述空闲物理块被分配之 后被标记为非空闲,所述至少一个逻辑块中的每个逻辑块被分配的物理块的总容量大于或等于所述至少一个逻辑块中的每个逻辑块的容量。
- 如权利要求13或14所述的存储管理装置,其特征在于,所述逻辑块管理模块还用于在所述至少一个逻辑块中记录所述至少一个逻辑块对应的每个待写入数据页的逻辑地址,以及记录所述至少一个逻辑块对应的数据页的数据类别。
- 如权利要求15所述的存储管理装置,其特征在于,所述的存储管理装置还包括擦除指令模块,用于根据每个逻辑块对应的数据页,确定待擦除的逻辑块,向所述存储器发送擦除指令,所述擦除指令携带所述待擦除的逻辑块的信息,所述擦除指令用于指示所述存储器根据所述擦除指令中的所述待擦除的逻辑块的信息和所述存储器中设置的物理块与逻辑块的对应关系,确定待擦除的物理块,以及擦除所述待擦除的物理块。
- 如权利要求16所述的存储管理装置,其特征在于,所述数据类别为根据数据被访问的频率确定的冷数据和热数据;所述逻辑块管理模块还用于在确定需要对已存储的数据页进行更新时,将所述已存储的数据页对应的逻辑块中记录的所述已存储的数据页的逻辑地址置为无效;所述擦除指令模块用于确定待擦除的逻辑块具体包括:选择数据类别为热数据的逻辑块,或者无效逻辑地址数量多的逻辑块作为所述待擦除的逻辑块。
- 如权利要求16所述的存储管理装置,其特征在于,所述数据类别为根据数据被访问的频率确定的冷数据和热数据;所述擦除指令模块用于确定待擦除的逻辑块具体包括:选择数据类别为冷数据的逻辑块作为所述待擦除的逻辑块;所述擦除指令模块还用于在所述擦除指令携带禁止垃圾回收的指示。
- 如权利要求16或17或18所述的存储管理装置,其特征在 于,所述存储管理装置还包括迁移指令模块,在所述擦除指令模块在向所述存储器发送所述擦除指令之前,所述迁移指令模块用于根据预设的迁移策略确定所述待擦除的逻辑块中待迁移的数据页,并向所述存储器发送数据迁移指令,所述数据迁移指令携带所述待迁移的数据页的信息,所述数据迁移指令用于指示所述存储器将所述存储器中所述待迁移的数据页进行迁移。
- 如权利要求19所述的存储管理装置,其特征在于,所述迁移指令模块根据预设的迁移策略确定所述待擦除的逻辑块中待迁移的数据页具体包括:将所述待擦除的逻辑块中当前数据类别为热数据且逻辑地址有效的数据页确定为所述待迁移的数据页。
- 一种存储器,其特征在于,包括:接收模块,用于接收数据写指令,所述数据写指令携带至少一个逻辑块对应的待写入数据页,所述数据写指令是由管理器在确定待写入的数据页的数据类别,并为数据类别不同的待写入数据页指定不同的逻辑块之后发送的,其中,所指定的每个逻辑块对应同一种数据类别的待写入数据页;写入模块,用于根据所述数据写指令将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中,其中,同一个逻辑块对应的待写入数据页写入至少一个物理块中,每个物理块中写入同一个逻辑块对应的待写入数据页。
- 如权利要求21所述的存储器,其特征在于,所述存储器中包括预设的物理块与逻辑块的对应关系,其中,所述每个物理块对应一个逻辑块,每个逻辑块对应至少一个物理块;则,所述接收模块所接收的数据写指令中进一步携带所述至少一个逻辑块信息;在所述接收模块接收到所述数据写指令后,所述写入模块具体用于:根据所述数据写指令中的所述至少一个逻辑块的信息查询所述配置模块预先配置的所述物理块与逻辑块的对应关系,确定所述至少一个逻辑块对应的物理块,将所述至少一个逻辑块对应的待写入数据页 写入所述至少一个逻辑块对应的物理块中。
- 如权利要求21所述的存储器,其特征在于,所述数据写指令为所述管理器将数据类别不同的待写入数据页写入不同的缓存中,为每个写满的缓存中的同一种数据类别的数据页指定至少一个逻辑块之后发送的,其中,所述每个缓存写入同一种数据类别的待写入数据页;在所述接收模块接收到所述数据写指令后,所述写入模块具体用于:根据所述数据写指令,为所述至少一个逻辑块分配物理块,以及将所述至少一个逻辑块对应的数据页写入所述分配的物理块,其中,所述至少一个逻辑块中的每个逻辑块被分配的物理块为所述存储器中的空闲物理块,且所述空闲物理块被分配之后被标记为非空闲,所述至少一个逻辑块中的每个逻辑块被分配的物理块的总容量大于或等于所述至少一个逻辑块中的每个逻辑块的容量。
- 如权利要求23所述的存储器,其特征在于,所述写入模块还用于根据所述数据写指令中的所述至少一个逻辑块的信息以及所述至少一个逻辑块被分配的物理块的信息,记录物理块与逻辑块之间的对应关系。
- 如权利要求24所述的存储器,其特征在于,所述接收模块还用于接收所述管理器发送的擦除指令,所述擦除指令为所述管理器确定待擦除的逻辑块后发送的,所述擦除指令携带所述待擦除的逻辑块的信息;所述存储器还包括擦除模块,用于根据所述擦除指令中的所述待擦除的逻辑块的信息和所述物理块与逻辑块的对应关系,确定待擦除的物理块,以及擦除所述待擦除的物理块。
- 如权利要求25所述的存储器,其特征在于,所述接收模块还用于接收管理器发送的数据迁移指令,所述数据迁移指令为所述管理器根据预设的迁移策略确定所述待擦除的逻辑块中待迁移的数据页后发送的,所述数据迁移指令携带所述待迁移的数据页的信息;所述存储器还包括迁移模块,用于根据所述数据迁移指令将所述 存储器中所述待迁移的数据页进行迁移。
- 一种混合存储装置,其特征在于,包括硬盘、如权利要求12-20任一项所述的管理器,以及如权利要求21-26任一项所述的存储器,所述存储器作为所述磁盘存储器的缓存。
- 一种存储管理方法,应用于包括存储器的存储系统,所述存储器包括多个物理块,所述方法包括:接收数据写请求,确定待写入的数据页的数据类别;为数据类别不同的待写入数据页指定不同的逻辑块,其中,每个指定的逻辑块对应同一种数据类别的待写入数据页;向所述存储器发送数据写指令,其中,所述数据写指令携带至少一个逻辑块对应的待写入数据页,所述数据写指令用于指示所述存储器根据所述数据写指令将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中,同一个逻辑块对应的待写入数据页写入至少一个物理块中,每个物理块中写入同一个逻辑块对应的待写入数据页。
- 如权利要求28所述的存储管理方法,其特征在于,所述数据写指令中进一步携带所述至少一个逻辑块信息;所述数据写指令进一步指示所述存储器根据所述数据写指令中的所述至少一个逻辑块的信息查询所述存储器中预设的物理块与逻辑块的对应关系,确定所述至少一个逻辑块对应的物理块,将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中。
- 如权利要求28所述的存储管理方法,其特征在于,还包括:将数据类别不同的待写入数据页写入不同的缓存中,同一种数据类别的待写入数据页被写入同一缓存中,每个缓存的容量小于或等于所述每个逻辑块的容量;为每个写满的缓存中的同一种数据类别的数据页指定一个逻辑块;为所述待写入数据页指定的逻辑块,向所述存储器发送数据写指 令,所述数据写指令携带所述至少一个逻辑块的信息和所述至少一个逻辑块对应的数据页,所述数据写指令具体用于指示所述存储器为所述至少一个逻辑块分配物理块,以及将所述至少一个逻辑块对应的数据页写入所述分配的物理块,其中,所述至少一个逻辑块中的每个逻辑块被分配的物理块为所述存储器中的空闲物理块,且所述空闲物理块被分配之后被标记为非空闲,所述至少一个逻辑块中的每个逻辑块被被分配的物理块的总容量大于或等于所述至少一个逻辑块中的每个逻辑块的容量。
- 如权利要求29或30所述的存储管理方法,其特征在于,在所述为所述数据类别不同的待写入数据页指定不同的逻辑块之后,还包括在所述至少一个逻辑块中记录所述至少一个逻辑块对应的每个待写入数据页的逻辑地址。
- 如权利要求31所述的存储管理方法,其特征在于,还包括根据每个逻辑块对应的数据页,确定待擦除的逻辑块,向所述存储器发送擦除指令,所述擦除指令携带所述待擦除的逻辑块的信息,所述擦除指令用于指示所述存储器根据所述擦除指令中的所述待擦除的逻辑块的信息和所述存储器中设置的物理块与逻辑块的对应关系,确定待擦除的物理块,以及擦除所述待擦除的物理块。
- 如权利要求32所述的存储管理方法,其特征在于,所述数据类别为根据数据被访问的频率确定的冷数据和热数据;所述方法还包括:在确定需要对已存储的数据页进行更新时,将所述已存储的数据页对应的逻辑块中记录的所述已存储的数据页的逻辑地址置为无效;所述确定待擦除的逻辑块具体包括:选择数据类别为热数据的逻辑块,或者无效逻辑地址数量多的逻辑块作为所述待擦除的逻辑块。
- 如权利要求32所述的存储管理方法,其特征在于,所述数据类别为根据数据被访问的频率确定的冷数据和热数;所述确定待擦除的逻辑块具体包括:选择数据类别为冷数据的逻辑块作为所述待擦除的逻辑块;在所述擦除指令携带禁止垃圾回收的指示。
- 如权利要求32或33或34所述的存储管理方法,其特征在于,在所述向所述存储器发送所述擦除指令之前,还包括根据预设的迁移策略确定所述待擦除的逻辑块中待迁移的数据页,并向所述存储器发送数据迁移指令,所述数据迁移指令携带所述待迁移的数据页的信息,所述数据迁移指令用于指示所述固态存储器将所述固态存储器中所述待迁移的数据页进行迁移。
- 如权利要求35所述的存储管理方法,其特征在于,所述根据预设的迁移策略确定所述待擦除的逻辑块中待迁移的数据页具体包括:将所述待擦除的逻辑块中当前数据类别为热数据且逻辑地址有效的数据页确定为所述待迁移的数据页。
- 一种存储管理方法,应用于存储器,其特征在于,接收数据写指令,所述数据写指令携带至少一个逻辑块对应的待写入数据页,所述数据写指令是由管理器在确定待写入的数据页的数据类别,并为数据类别不同的待写入数据页指定不同的逻辑块之后发送的,其中,所指定的每个逻辑块对应同一种数据类别的待写入数据页;根据所述数据写指令将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中,其中,同一个逻辑块对应的待写入数据页写入至少一个物理块中,每个物理块中写入同一个逻辑块对应的待写入数据页。
- 如权利要求37所述的存储管理方法,其特征在于,所述存储器中包括预设的物理块与逻辑块的对应关系,其中,所述每个物理块对应一个逻辑块,每个逻辑块对应至少一个物理块;所述数据写指令中进一步携带所述至少一个逻辑块信息;在接收到所述数据写指令后,根据所述数据写指令将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中具体包括:根据所述数据写指令中的所述至少一个逻辑块的信息查询所述物理块与逻辑块的对应关系,确定所述至少一个逻辑块对应 的物理块,将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中。
- 如权利要求37所述的存储管理方法,其特征在于,所述数据写指令为所述管理器将数据类别不同的待写入数据页写入不同的缓存中,为每个写满的缓存中的同一种数据类别的数据页指定至少一个逻辑块之后发送的,其中,所述每个缓存写入同一种数据类别的待写入数据页;在接收到所述数据写指令后,根据所述数据写指令将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中具体包括:根据所述数据写指令,为所述至少一个逻辑块分配物理块,以及将所述至少一个逻辑块对应的数据页写入所述分配的物理块,其中,所述至少一个逻辑块中的每个逻辑块被分配的物理块为所述存储器中的空闲物理块,且所述空闲物理块被分配之后被标记为非空闲,所述至少一个逻辑块中的每个逻辑块被分配的物理块的总容量大于或等于所述至少一个逻辑块中的每个逻辑块的容量。
- 如权利要求39所述的存储管理方法,其特征在于,还包括:根据所述数据写指令中的所述至少一个逻辑块的信息以及所述至少一个逻辑块被分配的物理块的信息,记录物理块与逻辑块之间的对应关系。
- 如权利要求40所述的存储管理方法,其特征在于,还包括:接收所述管理器发送的擦除指令,所述擦除指令为所述管理器确定待擦除的逻辑块后发送的,所述擦除指令携带所述待擦除的逻辑块的信息;根据所述擦除指令中的所述待擦除的逻辑块的信息和所述物理块与逻辑块的对应关系,确定待擦除的物理块,以及擦除所述待擦除的物理块。
- 如权利要求41所述的存储管理方法,其特征在于,还包括:接收管理器发送的数据迁移指令,所述数据迁移指令为所述管理器根据预设的迁移策略确定所述待擦除的逻辑块中待迁移的数据页 后发送的,所述数据迁移指令携带所述待迁移的数据页的信息;根据所述数据迁移指令将所述存储器中所述待迁移的数据页进行迁移。
- 一种存储管理器,其特征在于,包括:处理器、存储器、总线和通信接口;所述存储器用于存储计算机执行指令,所述处理器与所述存储器通过所述总线连接,当所述计算设备运行时,所述处理器执行所述存储器存储的所述计算机执行指令,以使所述存储管理器如下方法:接收数据写请求,确定待写入的数据页的数据类别;为数据类别不同的待写入数据页指定不同的逻辑块,其中,每个指定的逻辑块对应同一种数据类别的待写入数据页;向所述存储器发送数据写指令,其中,所述数据写指令携带至少一个逻辑块对应的待写入数据页,所述数据写指令用于指示所述存储器根据所述数据写指令将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中,其中,同一个逻辑块对应的待写入数据页写入至少一个物理块中,每个物理块中写入同一个逻辑块对应的待写入数据页。
- 一种存储管理器,其特征在于,包括:处理器、存储器、总线和通信接口;所述存储器用于存储计算机执行指令,所述处理器与所述存储器通过所述总线连接,当所述计算设备运行时,所述处理器执行所述存储器存储的所述计算机执行指令,以使所述存储管理器执行如下方法:接收数据写指令,所述数据写指令携带至少一个逻辑块对应的待写入数据页,所述数据写指令是由管理器在确定待写入的数据页的数据类别,并为数据类别不同的待写入数据页指定不同的逻辑块之后发送的,其中,所指定的每个逻辑块对应同一种数据类别的待写入数据页;根据所述数据写指令将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中,其中,同一个逻辑块对 应的待写入数据页写入至少一个物理块中,每个物理块中写入同一个逻辑块对应的待写入数据页。
- 一种计算机可读介质,其特征在于,包括计算机执行指令,当计算机的处理器执行所述计算机执行指令时,所述计算机执行如下方法:接收数据写请求,确定待写入的数据页的数据类别;为数据类别不同的待写入数据页指定不同的逻辑块,其中,每个指定的逻辑块对应同一种数据类别的待写入数据页;向所述存储器发送数据写指令,其中,所述数据写指令携带至少一个逻辑块对应的待写入数据页,所述数据写指令用于指示所述存储器根据所述数据写指令将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中,其中,同一个逻辑块对应的待写入数据页写入至少一个物理块中,每个物理块中写入同一个逻辑块对应的待写入数据页。
- 一种计算机可读介质,其特征在于,包括计算机执行指令,当计算机的处理器执行所述计算机执行指令时,所述计算机执行如下方法:接收数据写指令,所述数据写指令携带至少一个逻辑块对应的待写入数据页,所述数据写指令是由管理器在确定待写入的数据页的数据类别,并为数据类别不同的待写入数据页指定不同的逻辑块之后发送的,其中,所指定的每个逻辑块对应同一种数据类别的待写入数据页;根据所述数据写指令将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中,其中,同一个逻辑块对应的待写入数据页写入至少一个物理块中,每个物理块中写入同一个逻辑块对应的待写入数据页。
Priority Applications (5)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
BR112017027429-9A BR112017027429B1 (pt) | 2015-06-29 | 2016-05-04 | Sistema de armazenamento, aparelho de gerenciamento de armazenamento, armazenamento, aparelho de armazenamento híbrido, e método de gerenciamento de armazenamento |
KR1020187000960A KR102055164B1 (ko) | 2015-06-29 | 2016-05-04 | 스토리지 시스템, 스토리지 관리 디바이스, 스토리지 디바이스, 하이브리드 스토리지 디바이스, 및 스토리지 관리 방법 |
JP2017568101A JP6616433B2 (ja) | 2015-06-29 | 2016-05-04 | ストレージシステム、ストレージ管理装置、ストレージ、ハイブリッドストレージ装置およびストレージ管理方法 |
EP16817022.3A EP3301584B1 (en) | 2015-06-29 | 2016-05-04 | Storage system, storage management device, storage device, hybrid storage device, and storage management method |
US15/853,874 US20180121351A1 (en) | 2015-06-29 | 2017-12-25 | Storage system, storage management apparatus, storage device, hybrid storage apparatus, and storage management method |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510369203.2A CN106326133B (zh) | 2015-06-29 | 2015-06-29 | 存储系统、存储管理装置、存储器、混合存储装置及存储管理方法 |
CN201510369203.2 | 2015-06-29 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US15/853,874 Continuation US20180121351A1 (en) | 2015-06-29 | 2017-12-25 | Storage system, storage management apparatus, storage device, hybrid storage apparatus, and storage management method |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2017000658A1 true WO2017000658A1 (zh) | 2017-01-05 |
Family
ID=57607821
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2016/081000 WO2017000658A1 (zh) | 2015-06-29 | 2016-05-04 | 存储系统、存储管理装置、存储器、混合存储装置及存储管理方法 |
Country Status (6)
Country | Link |
---|---|
US (1) | US20180121351A1 (zh) |
EP (1) | EP3301584B1 (zh) |
JP (1) | JP6616433B2 (zh) |
KR (1) | KR102055164B1 (zh) |
CN (1) | CN106326133B (zh) |
WO (1) | WO2017000658A1 (zh) |
Families Citing this family (27)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105278876B (zh) * | 2015-09-23 | 2018-12-14 | 华为技术有限公司 | 一种固态硬盘的数据擦除方法及装置 |
CN106708444A (zh) * | 2017-01-17 | 2017-05-24 | 北京联想核芯科技有限公司 | 数据存储方法和硬盘控制器 |
CN106844721A (zh) * | 2017-02-09 | 2017-06-13 | 济南浪潮高新科技投资发展有限公司 | 数据存储方法、装置、系统、可读介质及存储控制器 |
US10884630B2 (en) * | 2017-04-13 | 2021-01-05 | Hitachi, Ltd. | Storage system |
CN107341112A (zh) * | 2017-06-29 | 2017-11-10 | 西安交通大学 | 一种基于页面访问间隔的闪存数据缓冲区置换方法 |
CN107479825A (zh) * | 2017-06-30 | 2017-12-15 | 华为技术有限公司 | 一种存储系统、固态硬盘和数据存储方法 |
CN109388333B (zh) * | 2017-08-08 | 2023-05-05 | 北京忆恒创源科技股份有限公司 | 降低读命令处理延迟的方法与装置 |
CN109725844B (zh) * | 2017-10-31 | 2022-09-06 | 阿里巴巴集团控股有限公司 | 一种磁盘分配方法、装置和存储系统 |
US10877898B2 (en) * | 2017-11-16 | 2020-12-29 | Alibaba Group Holding Limited | Method and system for enhancing flash translation layer mapping flexibility for performance and lifespan improvements |
US10891239B2 (en) * | 2018-02-07 | 2021-01-12 | Alibaba Group Holding Limited | Method and system for operating NAND flash physical space to extend memory capacity |
CN108829346B (zh) * | 2018-05-28 | 2020-11-17 | 华中科技大学 | 一种适应闪存页差异的固态硬盘的用户写请求处理方法 |
CN108845770A (zh) * | 2018-06-22 | 2018-11-20 | 深圳忆联信息系统有限公司 | 降低ssd写放大的方法、装置及计算机设备 |
CN112352216B (zh) * | 2018-06-30 | 2022-06-14 | 华为技术有限公司 | 数据存储方法及数据存储装置 |
KR102679967B1 (ko) * | 2018-09-12 | 2024-07-02 | 에스케이하이닉스 주식회사 | 메모리 시스템에서의 유효 데이터 관리 방법 및 장치 |
KR102694952B1 (ko) * | 2018-09-20 | 2024-08-14 | 에스케이하이닉스 주식회사 | 메모리 시스템 및 그것의 동작방법 |
CN109491608A (zh) * | 2018-11-02 | 2019-03-19 | 郑州云海信息技术有限公司 | 一种提升随机数据读取性能的方法、系统、设备及存储介质 |
KR102663661B1 (ko) * | 2018-12-06 | 2024-05-10 | 에스케이하이닉스 주식회사 | 메모리 시스템 내 저장된 데이터를 제어하는 방법 및 장치 |
KR20200111989A (ko) | 2019-03-20 | 2020-10-05 | 삼성전자주식회사 | 외부 장치에 저장된 파일 정보를 검색하는 전자 장치 및 그의 동작 방법 |
US11199988B2 (en) | 2019-05-07 | 2021-12-14 | International Business Machines Corporation | Data migration across tiers in a multi-tiered storage area network |
CN110119251B (zh) * | 2019-05-14 | 2023-01-03 | 北京杰思安全科技有限公司 | 一种基于磁盘大流量的缓冲控制方法和系统 |
CN110658995B (zh) * | 2019-09-05 | 2022-11-08 | 苏州浪潮智能科技有限公司 | 一种固态硬盘及其配置数据管理方法、装置及存储介质 |
CN114115697B (zh) * | 2020-08-26 | 2024-03-22 | 浙江宇视科技有限公司 | 云存储数据处理方法、装置、电子设备和存储介质 |
KR20220060397A (ko) * | 2020-11-04 | 2022-05-11 | 삼성전자주식회사 | 전자 장치 및 이를 이용한 스토리지 관리 방법 |
US20220317918A1 (en) * | 2021-03-31 | 2022-10-06 | Micron Technology, Inc. | Reduction of Write Amplification in Sensor Data Recorders |
CN113377689B (zh) * | 2021-08-12 | 2021-11-05 | 新华三技术有限公司 | 一种路由表项查找、存储方法及网络芯片 |
US11977783B2 (en) | 2021-10-28 | 2024-05-07 | Silicon Motion, Inc. | Method and apparatus for performing data access control of memory device with aid of predetermined command |
US12061800B2 (en) | 2021-10-28 | 2024-08-13 | Silicon Motion, Inc. | Method and apparatus for performing data access control of memory device with aid of predetermined command |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110225347A1 (en) * | 2010-03-10 | 2011-09-15 | Seagate Technology Llc | Logical block storage in a storage device |
CN102298555A (zh) * | 2011-08-22 | 2011-12-28 | 宜兴市华星特种陶瓷科技有限公司 | 基于nand技术的模块化闪存管理系统 |
US20120023144A1 (en) * | 2010-07-21 | 2012-01-26 | Seagate Technology Llc | Managing Wear in Flash Memory |
CN103049389A (zh) * | 2012-12-14 | 2013-04-17 | 锐迪科科技有限公司 | Nand闪存控制器及其写入控制方法 |
CN103455283A (zh) * | 2013-08-19 | 2013-12-18 | 华中科技大学 | 一种混合存储系统 |
CN104298681A (zh) * | 2013-07-18 | 2015-01-21 | 华为技术有限公司 | 一种数据存储方法及装置 |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7174440B2 (en) * | 2002-10-28 | 2007-02-06 | Sandisk Corporation | Method and apparatus for performing block caching in a non-volatile memory system |
JP2006235960A (ja) * | 2005-02-24 | 2006-09-07 | Fujitsu Ltd | ガーベッジコレクション高速化方法 |
WO2007013372A1 (ja) * | 2005-07-29 | 2007-02-01 | Matsushita Electric Industrial Co., Ltd. | メモリコントローラ、不揮発性記憶装置、不揮発性記憶システム及び不揮発性メモリのアドレス管理方法 |
JP2009181314A (ja) * | 2008-01-30 | 2009-08-13 | Toshiba Corp | 情報記録装置およびその制御方法 |
US20100318719A1 (en) * | 2009-06-12 | 2010-12-16 | Micron Technology, Inc. | Methods, memory controllers and devices for wear leveling a memory |
US9183134B2 (en) * | 2010-04-22 | 2015-11-10 | Seagate Technology Llc | Data segregation in a storage device |
JP5569469B2 (ja) * | 2011-05-25 | 2014-08-13 | 株式会社デンソー | 電子機器 |
KR20120132820A (ko) * | 2011-05-30 | 2012-12-10 | 삼성전자주식회사 | 스토리지 디바이스, 스토리지 시스템 및 스토리지 디바이스의 가상화 방법 |
CN103827970B (zh) * | 2012-09-25 | 2016-05-18 | 株式会社东芝 | 对固态驱动器再配置数据的存储装置、存储控制器以及方法 |
US20140089564A1 (en) * | 2012-09-27 | 2014-03-27 | Skymedi Corporation | Method of data collection in a non-volatile memory |
US9632927B2 (en) * | 2014-09-25 | 2017-04-25 | International Business Machines Corporation | Reducing write amplification in solid-state drives by separating allocation of relocate writes from user writes |
-
2015
- 2015-06-29 CN CN201510369203.2A patent/CN106326133B/zh active Active
-
2016
- 2016-05-04 JP JP2017568101A patent/JP6616433B2/ja active Active
- 2016-05-04 WO PCT/CN2016/081000 patent/WO2017000658A1/zh active Application Filing
- 2016-05-04 EP EP16817022.3A patent/EP3301584B1/en active Active
- 2016-05-04 KR KR1020187000960A patent/KR102055164B1/ko active IP Right Grant
-
2017
- 2017-12-25 US US15/853,874 patent/US20180121351A1/en not_active Abandoned
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110225347A1 (en) * | 2010-03-10 | 2011-09-15 | Seagate Technology Llc | Logical block storage in a storage device |
US20120023144A1 (en) * | 2010-07-21 | 2012-01-26 | Seagate Technology Llc | Managing Wear in Flash Memory |
CN102298555A (zh) * | 2011-08-22 | 2011-12-28 | 宜兴市华星特种陶瓷科技有限公司 | 基于nand技术的模块化闪存管理系统 |
CN103049389A (zh) * | 2012-12-14 | 2013-04-17 | 锐迪科科技有限公司 | Nand闪存控制器及其写入控制方法 |
CN104298681A (zh) * | 2013-07-18 | 2015-01-21 | 华为技术有限公司 | 一种数据存储方法及装置 |
CN103455283A (zh) * | 2013-08-19 | 2013-12-18 | 华中科技大学 | 一种混合存储系统 |
Non-Patent Citations (1)
Title |
---|
See also references of EP3301584A4 * |
Also Published As
Publication number | Publication date |
---|---|
CN106326133B (zh) | 2020-06-16 |
EP3301584A4 (en) | 2018-06-27 |
KR102055164B1 (ko) | 2020-01-22 |
US20180121351A1 (en) | 2018-05-03 |
KR20180017148A (ko) | 2018-02-20 |
EP3301584A1 (en) | 2018-04-04 |
CN106326133A (zh) | 2017-01-11 |
JP2018525719A (ja) | 2018-09-06 |
JP6616433B2 (ja) | 2019-12-04 |
BR112017027429A2 (zh) | 2018-09-04 |
EP3301584B1 (en) | 2021-12-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2017000658A1 (zh) | 存储系统、存储管理装置、存储器、混合存储装置及存储管理方法 | |
US20240134552A1 (en) | Storage device that secures a block for a stream or namespace and system having the storage device | |
US11669444B2 (en) | Computing system and method for controlling storage device | |
US11467955B2 (en) | Memory system and method for controlling nonvolatile memory | |
JP6785205B2 (ja) | メモリシステムおよび制御方法 | |
TWI791140B (zh) | 記憶體系統 | |
US20230333978A1 (en) | Memory system and method for controlling nonvolatile memory | |
CN109144887B (zh) | 存储器系统及控制非易失性存储器的控制方法 | |
JP6785204B2 (ja) | メモリシステムおよび制御方法 | |
WO2017000821A1 (zh) | 存储系统、存储管理装置、存储器、混合存储装置及存储管理方法 | |
JP7392080B2 (ja) | メモリシステム | |
JP7013546B2 (ja) | メモリシステム | |
JP7102482B2 (ja) | メモリシステムおよび制御方法 | |
EP4303711A1 (en) | Systems, methods, and apparatus for data placement in a storage device | |
BR112017027429B1 (pt) | Sistema de armazenamento, aparelho de gerenciamento de armazenamento, armazenamento, aparelho de armazenamento híbrido, e método de gerenciamento de armazenamento | |
JP2022019787A (ja) | メモリシステムおよび制御方法 | |
JP2013214147A (ja) | ディスクアレイ装置 |
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: 16817022 Country of ref document: EP Kind code of ref document: A1 |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2016817022 Country of ref document: EP |
|
ENP | Entry into the national phase |
Ref document number: 2017568101 Country of ref document: JP Kind code of ref document: A |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
ENP | Entry into the national phase |
Ref document number: 20187000960 Country of ref document: KR Kind code of ref document: A |
|
REG | Reference to national code |
Ref country code: BR Ref legal event code: B01A Ref document number: 112017027429 Country of ref document: BR |
|
ENP | Entry into the national phase |
Ref document number: 112017027429 Country of ref document: BR Kind code of ref document: A2 Effective date: 20171219 |