WO2017000658A1 - 存储系统、存储管理装置、存储器、混合存储装置及存储管理方法 - Google Patents

存储系统、存储管理装置、存储器、混合存储装置及存储管理方法 Download PDF

Info

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
Application number
PCT/CN2016/081000
Other languages
English (en)
French (fr)
Inventor
张子刚
熊劲
蒋德钧
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to BR112017027429-9A priority Critical patent/BR112017027429B1/pt
Priority to KR1020187000960A priority patent/KR102055164B1/ko
Priority to JP2017568101A priority patent/JP6616433B2/ja
Priority to EP16817022.3A priority patent/EP3301584B1/en
Publication of WO2017000658A1 publication Critical patent/WO2017000658A1/zh
Priority to US15/853,874 priority patent/US20180121351A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • G06F12/0646Configuration or reconfiguration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C8/00Arrangements for selecting an address in a digital store
    • G11C8/06Address interface arrangements, e.g. address buffers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/10Providing a specific technical effect
    • G06F2212/1016Performance improvement
    • G06F2212/1024Latency reduction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/22Employing cache memory using specific memory technology
    • G06F2212/222Non-volatile memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7201Logical to physical mapping or translation of blocks or pages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7205Cleaning, 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

一种存储管理方法。所述存储管理方法包括:管理器接收数据写请求,确定待写入的数据页的数据类别(S1301),为数据类别不同的待写入数据页指定不同的逻辑块,且每个逻辑块对应同一种数据类别的待写入数据页(S1302),向SSD发送数据写指令,所述数据写指令携带至少一个指定的逻辑块对应的待写入数据页及至少一个指定的逻辑块信息(S1303);SSD接收所述数据写指令,根据所述数据写指令将所述至少一个指定的逻辑块对应的待写入数据页写入所述至少一个指定的逻辑块对应的物理块中(S1304)。有效减少SSD的物理块擦除时产生的写放大。

Description

存储系统、存储管理装置、存储器、混合存储装置及存储管理方法 技术领域
本发明涉及存储技术领域,特别涉及一种存储系统、存储管理装置、存储器、混合存储装置及存储管理方法。
背景技术
固态存储器(Solid state disk,SSD)具有高性能、低延迟、低功耗、环境适应性强等优点,同时成本也在不断降低,因此目前应用的越来越普遍,主要用作硬盘(Hard disk drive,HDD)的缓存。
由于SSD不能像HDD那样在原地进行覆盖写,而是需要擦除原来的数据,才能写入新的数据,而且SSD的读写单位为页,但擦除的单位却是物理块,所以在对SSD中的数据进行更新时,需要将更新的数据写入另外一个空闲的位置,而把原来的数据设置为无效,等到SSD满的时候再选择无效数据比较多的物理块进行擦除。
SSD擦除的物理块中可能包括大量的有效页,这就需要把这些有效页的数据重新拷贝到另外的空闲位置后,再对需要擦除的物理块中的数据进行擦除,这个过程即为垃圾回收,而在垃圾回收的过程,将这些有效页的数据重新拷贝到另外的空闲位置,额外增加了数据的写入,即引起了SSD的写放大。SSD的写放大会降低SSD的性能,缩短SSD的寿命。
发明内容
本发明实施例提供SSD存储器管理装置及方法,减少SSD存储器在数据擦除过程中产生的写放大问题。
本发明实施例第一方面提供一种存储系统,包括存储器和管理器;
所述存储器包括多个物理块;
所述管理器用于接收数据写请求,确定待写入数据页的数据类别,为数据类别不同的待写入数据页指定不同的逻辑块,并向所述存储器发送数据写指令,其中,所指定的每个逻辑块对应同一种数据类别的待写入数据页,所述数据写指令携带所指定的至少一个逻辑块对应的待写入数据页;
所述存储器用于接收所述数据写指令,根据所述数据写指令,将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中,其中,同一个逻辑块对应的待写入数据页写入至少一个物理块中,每个物理块中写入同一个逻辑块对应的待写入数据页。
结合第一方面,在第一种可能的实现方式中,所述存储器中还预先配置物理块与逻辑块的对应关系,其中,所述每个物理块对应一个逻辑块,每个逻辑块对应至少一个物理块;
则,所述管理器还用于在所述数据写指令中进一步携带所述至少一个逻辑块的信息;
所述存储器在接收到所述数据写指令后,具体用于:根据所述数据写指令中的所述至少一个逻辑块的信息查询所述物理块与逻辑块的对应关系,确定所述至少一个逻辑块对应的物理块,将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中。
结合第一方面,在第二种可能的实现方式中,所述存储系统还包括至少一个缓存,每个缓存的容量小于或等于所述每个逻辑块的容量;
所述管理器在接收数据写请求之后,具体用于:将数据类别不同的待写入数据页写入不同的缓存中,所述每个缓存中写入同一种数据类别的待写入数据页,为每个写满的缓存中的同一种数据类别的数据页指定至少一个逻辑块,向所述存储器发送数据写指令,所述数据写指令携带所述至少一个逻辑块的信息和所述至少一个逻辑块对应 的待写入数据页;
所述存储器在接收到所述数据写指令后,具体用于:根据所述数据写指令,为所述至少一个逻辑块分配物理块,以及将所述至少一个逻辑块对应的数据页写入所述分配的物理块中,其中,所述至少一个逻辑块中的每个逻辑块被分配的物理块为所述存储器中的空闲物理块,且所述空闲物理块在被分配之后被标记为非空闲,所述至少一个逻辑块中的每个逻辑块被分配的物理块的总容量大于或等于所述至少一个逻辑块中的每个逻辑块的容量。
结合第一方面的第二种实现方式,第三种可能的实现方式中,所述存储器还用于根据所述数据写指令中的所述至少一个逻辑块的信息以及所述至少一个逻辑块被分配的物理块的信息,记录物理块与逻辑块之间的对应关系。
结合第一方面的第一种可能的实现方式,或者第三种可能的实现方式,在第四种可能的实现方式中,所述管理器还用于在所述至少一个逻辑块中记录所述至少一个逻辑块对应的每个待写入数据页的逻辑地址,以及记录所述至少一个逻辑块对应的数据页的数据类别。
结合第一方面的第四种可能的实现方式,在第五种可能的实现方式中,所述管理器还用于根据每个逻辑块对应的数据页,确定待擦除的逻辑块,向所述存储器发送擦除指令,所述擦除指令携带所述待擦除的逻辑块的信息;
所述存储器还用于接收所述擦除指令,根据所述擦除指令中的所述待擦除的逻辑块的信息和所述物理块与逻辑块的对应关系,确定待擦除的物理块,以及擦除所述待擦除的物理块。
结合第一方面的第五种可能的实现方式,在第六种可能的实现方式中,所述数据类别为根据数据被访问的频率确定的冷数据和热数据;所述管理器还用于在确定需要对已存储的数据页进行更新时,将所述已存储的数据页对应的逻辑块中记录的所述已存储的数据页的逻辑地址置为无效;
所述管理器用于根据每个逻辑块对应的数据页,确定待擦除的 逻辑块具体包括:选择数据类别为热数据的逻辑块,或者无效逻辑地址数量多的逻辑块作为所述待擦除的逻辑块。
结合第一方面的第五种可能的实现方式,在第七种可能的实现方式中,所述数据类别为根据数据被访问的频率确定的冷数据和热数据;所述管理器用于根据每个逻辑块对应的数据页,确定待擦除的逻辑块具体包括:选择数据类别为冷数据的逻辑块作为所述待擦除的逻辑块;
所述管理器还用于在所述擦除指令携带禁止垃圾回收的指示。
结合第一方面的第五种或者第六种或者第七种可能的实现方式中,在第八种可能的实现方式中,所述管理器在向所述存储器发送所述擦除指令之前,所述管理器还用于根据预设的迁移策略确定所述待擦除的逻辑块中待迁移的数据页,并向所述存储器发送数据迁移指令,所述数据迁移指令携带所述待迁移的数据页的信息;
所述存储器还用于根据所述数据迁移指令将所述存储器中所述待迁移的数据页进行迁移。
结合第一方面的第八种可能的实现方式中,在第九种可能的实现方式中,所述管理器还用于根据预设的迁移策略确定所述待擦除的逻辑块中待迁移的数据页具体包括:将所述待擦除的逻辑块中当前数据类别为热数据且逻辑地址有效的数据页确定为所述待迁移的数据页。
第二方面,提供一种存储管理装置,应用于包括存储器的存储系统,所述存储器包括多个物理块,所述存储管理装置包括:
分类模块,用于接收数据写请求,确定待写入数据页的数据类别;
逻辑块管理模块,用于根据所述分类模块的分类结果,为数据类别不同的待写入数据页指定不同的逻辑块,其中,所指定的每个逻辑块对应同一种数据类别的待写入数据页;
写入指令模块,用于根据所述逻辑块管理模块为所述待写入数据页指定的逻辑块,向所述存储器发送数据写指令,其中,所述数据 写指令携带至少一个逻辑块对应的待写入数据页,所述数据写指令用于指示所述存储器根据所述数据写指令将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中,其中,同一个逻辑块对应的待写入数据页写入至少一个物理块中,每个物理块中写入同一个逻辑块对应的待写入数据页。
结合第二方面,在第一种可能的实现方式中,所述数据写指令中进一步携带所述至少一个逻辑块信息;
所述数据写指令具体用于指示所述存储器根据所述数据写指令中的所述至少一个逻辑块的信息查询所述存储器中预设的物理块与逻辑块的对应关系,确定所述至少一个逻辑块对应的物理块,将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中。
结合第二方面,在第二种可能的实现方式中,所述存储管理装置还包括:
缓存写入模块,用于根据所述分类模块的分类结果,将数据类别不同的待写入数据页写入不同的缓存中,同一种数据类别的待写入数据页被写入同一缓存中,每个缓存的容量小于或等于所述每个逻辑块的容量;
所述逻辑块管理模块用于为每个写满的缓存中的同一种数据类别的数据页指定一个逻辑块;
所述写入指令模块具体用于根据所述逻辑块管理模块为所述待写入数据页指定的逻辑块,向所述存储器发送数据写指令,所述数据写指令携带所述至少一个逻辑块的信息和所述至少一个逻辑块对应的数据页,所述数据写指令具体用于指示所述存储器为所述至少一个逻辑块分配物理块,以及将所述至少一个逻辑块对应的数据页写入所述分配的物理块,其中,所述至少一个逻辑块中的每个逻辑块被分配的物理块为所述存储器中的空闲物理块,且所述空闲物理块被分配之后被标记为非空闲,所述至少一个逻辑块中的每个逻辑块被分配的物理块的总容量大于或等于所述至少一个逻辑块中的每个逻辑块的容 量。
结合第二方面的第一种实现方式或者第二种实现方式,在第三种可能的实现方式中,所述逻辑块管理模块还用于在所述至少一个逻辑块中记录所述至少一个逻辑块对应的每个待写入数据页的逻辑地址,以及记录所述至少一个逻辑块对应的数据页的数据类别。
结合第二方面的第三种可能的实现方式,在第四种可能的实现方式中,所述的存储管理装置还包括擦除指令模块,用于根据每个逻辑块对应的数据页,确定待擦除的逻辑块,向所述存储器发送擦除指令,所述擦除指令携带所述待擦除的逻辑块的信息,所述擦除指令用于指示所述存储器根据所述擦除指令中的所述待擦除的逻辑块的信息和所述存储器中设置的物理块与逻辑块的对应关系,确定待擦除的物理块,以及擦除所述待擦除的物理块。
结合第二方面的第四种可能的实现方式,在第五种可能的实现方式中,所述数据类别为根据数据被访问的频率确定的冷数据和热数据;所述逻辑块管理模块还用于在确定需要对已存储的数据页进行更新时,将所述已存储的数据页对应的逻辑块中记录的所述已存储的数据页的逻辑地址置为无效;
所述擦除指令模块用于确定待擦除的逻辑块具体包括:选择数据类别为热数据的逻辑块,或者无效逻辑地址数量多的逻辑块作为所述待擦除的逻辑块。
结合第二方面的第四种可能的实现方式,在第六种可能的实现方式中,所述数据类别为根据数据被访问的频率确定的冷数据和热数据;所述擦除指令模块用于确定待擦除的逻辑块具体包括:选择数据类别为冷数据的逻辑块作为所述待擦除的逻辑块;
所述擦除指令模块还用于在所述擦除指令携带禁止垃圾回收的指示。
结合第二方面的第四种或者第五种或者第六种可能的实现方式,在第七种可能的实现方式中,所述存储管理装置还包括迁移指令模块,在所述擦除指令模块在向所述存储器发送所述擦除指令之前, 所述迁移指令模块用于根据预设的迁移策略确定所述待擦除的逻辑块中待迁移的数据页,并向所述存储器发送数据迁移指令,所述数据迁移指令携带所述待迁移的数据页的信息,所述数据迁移指令用于指示所述存储器将所述存储器中所述待迁移的数据页进行迁移。
结合第二方面的第七种可能的实现方式,在第八种可能的实现方式中,所述迁移指令模块根据预设的迁移策略确定所述待擦除的逻辑块中待迁移的数据页具体包括:将所述待擦除的逻辑块中当前数据类别为热数据且逻辑地址有效的数据页确定为所述待迁移的数据页。
第三方面,提供一种存储器,包括:
接收模块,用于接收数据写指令,所述数据写指令携带至少一个逻辑块对应的待写入数据页,所述数据写指令是由管理器在确定待写入的数据页的数据类别,并为数据类别不同的待写入数据页指定不同的逻辑块之后发送的,其中,所指定的每个逻辑块对应同一种数据类别的待写入数据页;
写入模块,用于根据所述数据写指令将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中,其中,同一个逻辑块对应的待写入数据页写入至少一个物理块中,每个物理块中写入同一个逻辑块对应的待写入数据页。
结合第三方面,在第一种可能的实现方式中,所述存储器中包括预设的物理块与逻辑块的对应关系,其中,所述每个物理块对应一个逻辑块,每个逻辑块对应至少一个物理块;
则,所述接收模块所接收的数据写指令中进一步携带所述至少一个逻辑块信息;
在所述接收模块接收到所述数据写指令后,所述写入模块具体用于:根据所述数据写指令中的所述至少一个逻辑块的信息查询所述配置模块预先配置的所述物理块与逻辑块的对应关系,确定所述至少一个逻辑块对应的物理块,将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中。
结合第三方面,在第二种可能的实现方式中,所述数据写指令 为所述管理器将数据类别不同的待写入数据页写入不同的缓存中,为每个写满的缓存中的同一种数据类别的数据页指定至少一个逻辑块之后发送的,其中,所述每个缓存写入同一种数据类别的待写入数据页;
在所述接收模块接收到所述数据写指令后,所述写入模块具体用于:根据所述数据写指令,为所述至少一个逻辑块分配物理块,以及将所述至少一个逻辑块对应的数据页写入所述分配的物理块,其中,所述至少一个逻辑块中的每个逻辑块被分配的物理块为所述存储器中的空闲物理块,且所述空闲物理块被分配之后被标记为非空闲,所述至少一个逻辑块中的每个逻辑块被分配的物理块的总容量大于或等于所述至少一个逻辑块中的每个逻辑块的容量。
结合第三方面的第二种可能的实现,在第三种可能的实现方式中,所述写入模块还用于根据所述数据写指令中的所述至少一个逻辑块的信息以及所述至少一个逻辑块被分配的物理块的信息,记录物理块与逻辑块之间的对应关系。
结合第三方面的第三种可能的实现,在第四种可能的实现方式中,所述接收模块还用于接收所述管理器发送的擦除指令,所述擦除指令为所述管理器确定待擦除的逻辑块后发送的,所述擦除指令携带所述待擦除的逻辑块的信息;
所述存储器还包括擦除模块,用于根据所述擦除指令中的所述待擦除的逻辑块的信息和所述物理块与逻辑块的对应关系,确定待擦除的物理块,以及擦除所述待擦除的物理块。
结合第三方面的第四种可能的实现,在第五种可能的实现方式中,所述接收模块还用于接收管理器发送的数据迁移指令,所述数据迁移指令为所述管理器根据预设的迁移策略确定所述待擦除的逻辑块中待迁移的数据页后发送的,所述数据迁移指令携带所述待迁移的数据页的信息;
所述存储器还包括迁移模块,用于根据所述数据迁移指令将所述存储器中所述待迁移的数据页进行迁移。
第四方面,提供一种混合存储装置,包括硬盘、如第二方面的任意一种实现方式中的管理器,以及第三方面的任意一种实现方式所述的存储器,所述存储器作为所述磁盘存储器的缓存。
第五方面,提供一种存储管理方法,应用于包括存储器的存储系统,所述存储器包括多个物理块,所述方法包括:
接收数据写请求,确定待写入的数据页的数据类别;
为数据类别不同的待写入数据页指定不同的逻辑块,其中,每个指定的逻辑块对应同一种数据类别的待写入数据页;
为所述待写入数据页指定的逻辑块,向所述存储器发送数据写指令,其中,所述数据写指令携带至少一个逻辑块对应的待写入数据页,所述数据写指令用于指示所述存储器根据所述数据写指令将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中,其中,同一个逻辑块对应的待写入数据页写入至少一个物理块中,每个物理块中写入同一个逻辑块对应的待写入数据页。
结合第五方面,在第一种可能的实现方式中,所述数据写指令中进一步携带所述至少一个逻辑块信息;
所述数据写指令进一步指示所述存储器根据所述数据写指令中的所述至少一个逻辑块的信息查询所述存储器中预设的物理块与逻辑块的对应关系,确定所述至少一个逻辑块对应的物理块,将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中。
结合第五方面,在第二种可能的实现方式中,所述方法还包括:
将数据类别不同的待写入数据页写入不同的缓存中,同一种数据类别的待写入数据页被写入同一缓存中,每个缓存的容量小于或等于所述每个逻辑块的容量;
为每个写满的缓存中的同一种数据类别的数据页指定一个逻辑块;
为所述待写入数据页指定的逻辑块,向所述存储器发送数据写指令,所述数据写指令携带所述至少一个逻辑块的信息和所述至少一 个逻辑块对应的数据页;
所述数据写指令具体用于指示所述存储器为所述至少一个逻辑块分配物理块,以及将所述至少一个逻辑块对应的数据页写入所述分配的物理块,其中,所述至少一个逻辑块中的每个逻辑块被分配的物理块为所述存储器中的空闲物理块,且所述空闲物理块被分配之后被标记为非空闲,所述至少一个逻辑块中的每个逻辑块被被分配的物理块的总容量大于或等于所述至少一个逻辑块中的每个逻辑块的容量。
结合第五方面的第一种或者第二种可能的实现方式中,在第三种可能的实现方式中,在所述为所述数据类别不同的待写入数据页指定不同的逻辑块之后,还包括在所述至少一个逻辑块中记录所述至少一个逻辑块对应的每个待写入数据页的逻辑地址,以及记录所述至少一个逻辑块对应的数据页的数据类别。
结合第五方面的第三种可能的实现方式,在第四种可能的实现方式中,所述方法还包括根据每个逻辑块对应的数据页,确定待擦除的逻辑块,向所述存储器发送擦除指令,所述擦除指令携带所述待擦除的逻辑块的信息,所述擦除指令用于指示所述存储器根据所述擦除指令中的所述待擦除的逻辑块的信息和所述存储器中设置的物理块与逻辑块的对应关系,确定待擦除的物理块,以及擦除所述待擦除的物理块。
结合第五方面的第四种可能的实现方式,在第五种可能的实现方式中,所述数据类别为根据数据被访问的频率确定的冷数据和热数据;所述方法还包括:在确定需要对已存储的数据页进行更新时,将所述已存储的数据页对应的逻辑块中记录的所述已存储的数据页的逻辑地址置为无效;
所述确定待擦除的逻辑块具体包括:选择数据类别为热数据的逻辑块,或者无效逻辑地址数量多的逻辑块作为所述待擦除的逻辑块。
结合第五方面的第四种可能的实现方式,在第六种可能的实现方式中,所述数据类别为根据数据被访问的频率确定的冷数据和热 数;
所述确定待擦除的逻辑块具体包括:选择数据类别为冷数据的逻辑块作为所述待擦除的逻辑块;
在所述擦除指令携带禁止垃圾回收的指示。
结合第五方面的第四种、第五种、或者第六种可能的实现方式,在第七种可能的实现方式中,在所述向所述存储器发送所述擦除指令之前,还包括根据预设的迁移策略确定所述待擦除的逻辑块中待迁移的数据页,并向所述存储器发送数据迁移指令,所述数据迁移指令携带所述待迁移的数据页的信息,所述数据迁移指令用于指示所述存储器将所述存储器中所述待迁移的数据页进行迁移。
结合第五方面的第七种可能的实现方式,在第八种可能的实现方式中,所述根据预设的迁移策略确定所述待擦除的逻辑块中待迁移的数据页具体包括:将所述待擦除的逻辑块中当前数据类别为热数据且逻辑地址有效的数据页确定为所述待迁移的数据页。
第六方面,提供一种存储管理方法,应用于存储器;包括:
接收数据写指令,所述数据写指令携带至少一个逻辑块对应的待写入数据页,所述数据写指令是由管理器在确定待写入的数据页的数据类别,并为数据类别不同的待写入数据页指定不同的逻辑块之后发送的,其中,所指定的每个逻辑块对应同一种数据类别的待写入数据页;
根据所述数据写指令将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中,其中,同一个逻辑块对应的待写入数据页写入至少一个物理块中,每个物理块中写入同一个逻辑块对应的待写入数据页。
结合第六方面,在第一种可能的实现方式中,所述存储器中包括预设的物理块与逻辑块的对应关系,其中,所述每个物理块对应一个逻辑块,每个逻辑块对应至少一个物理块;
所述数据写指令中进一步携带所述至少一个逻辑块信息;
在接收到所述数据写指令后,根据所述数据写指令将所述至少 一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中具体为:根据所述数据写指令中的所述至少一个逻辑块的信息查询所述物理块与逻辑块的对应关系,确定所述至少一个逻辑块对应的物理块,将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中。
结合第六方面,在第二种可能的实现方式中,所述数据写指令为所述管理器将数据类别不同的待写入数据页写入不同的缓存中,为每个写满的缓存中的同一种数据类别的数据页指定至少一个逻辑块之后发送的,其中,所述每个缓存写入同一种数据类别的待写入数据页;
在接收到所述数据写指令后,根据所述数据写指令将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中具体为:根据所述数据写指令,为所述至少一个逻辑块分配物理块,以及将所述至少一个逻辑块对应的数据页写入所述分配的物理块,其中,所述至少一个逻辑块中的每个逻辑块被分配的物理块为所述存储器中的空闲物理块,且所述空闲物理块被分配之后被标记为非空闲,所述至少一个逻辑块中的每个逻辑块被分配的物理块的总容量大于或等于所述至少一个逻辑块中的每个逻辑块的容量。
结合第六方面的第二种可能的实现方式,在第三种可能的实现方式中,根据所述数据写指令中的所述至少一个逻辑块的信息以及所述至少一个逻辑块被分配的物理块的信息,记录物理块与逻辑块之间的对应关系。
结合第六方面的第三种可能的实现方式,在第四种可能的实现方式中,还包括:
接收所述管理器发送的擦除指令,所述擦除指令为所述管理器确定待擦除的逻辑块后发送的,所述擦除指令携带所述待擦除的逻辑块的信息;
根据所述擦除指令中的所述待擦除的逻辑块的信息和所述物理块与逻辑块的对应关系,确定待擦除的物理块,以及擦除所述待擦除 的物理块。
结合第六方面的第四种可能的实现方式,在第五种可能的实现方式中,所述方法还包括:
接收管理器发送的数据迁移指令,所述数据迁移指令为所述管理器根据预设的迁移策略确定所述待擦除的逻辑块中待迁移的数据页后发送的,所述数据迁移指令携带所述待迁移的数据页的信息;
根据所述数据迁移指令将所述存储器中所述待迁移的数据页进行迁移。
第七方面,提供一种存储管理器,包括:处理器、存储器、总线和通信接口;
所述存储器用于存储计算机执行指令,所述处理器与所述存储器通过所述总线连接,当所述计算设备运行时,所述处理器执行所述存储器存储的所述计算机执行指令,以使所述存储管理器如下方法:
接收数据写请求,确定待写入的数据页的数据类别;
为数据类别不同的待写入数据页指定不同的逻辑块,其中,每个指定的逻辑块对应同一种数据类别的待写入数据页;
为所述待写入数据页指定的逻辑块,向所述存储器发送数据写指令,其中,所述数据写指令携带至少一个逻辑块对应的待写入数据页,所述数据写指令用于指示所述存储器根据所述数据写指令将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中,其中,同一个逻辑块对应的待写入数据页写入至少一个物理块中,每个物理块中写入同一个逻辑块对应的待写入数据页。
第八方面,提供一种存储管理器,包括:处理器、存储器、总线和通信接口;
所述存储器用于存储计算机执行指令,所述处理器与所述存储器通过所述总线连接,当所述计算设备运行时,所述处理器执行所述存储器存储的所述计算机执行指令,以使所述存储管理器执行如下方法:
接收数据写指令,所述数据写指令携带至少一个逻辑块对应的待写入数据页,所述数据写指令是由管理器在确定待写入的数据页的 数据类别,并为数据类别不同的待写入数据页指定不同的逻辑块之后发送的,其中,所指定的每个逻辑块对应同一种数据类别的待写入数据页;
根据所述数据写指令将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中,其中,同一个逻辑块对应的待写入数据页写入至少一个物理块中,每个物理块中写入同一个逻辑块对应的待写入数据页。
在第九方面,提供一种计算机可读介质,包括计算机执行指令,当计算机的处理器执行所述计算机执行指令时,所述计算机执行如下方法:
接收数据写请求,确定待写入的数据页的数据类别;
为数据类别不同的待写入数据页指定不同的逻辑块,其中,每个指定的逻辑块对应同一种数据类别的待写入数据页;
为所述待写入数据页指定的逻辑块,向所述存储器发送数据写指令,其中,所述数据写指令携带至少一个逻辑块对应的待写入数据页,所述数据写指令用于指示所述存储器根据所述数据写指令将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中,其中,同一个逻辑块对应的待写入数据页写入至少一个物理块中,每个物理块中写入同一个逻辑块对应的待写入数据页。
在第十方面,提供一种计算机可读介质,包括计算机执行指令,当计算机的处理器执行所述计算机执行指令时,所述计算机执行如下方法:
接收数据写指令,所述数据写指令携带至少一个逻辑块对应的待写入数据页,所述数据写指令是由管理器在确定待写入的数据页的数据类别,并为数据类别不同的待写入数据页指定不同的逻辑块之后发送的,其中,所指定的每个逻辑块对应同一种数据类别的待写入数据页;
根据所述数据写指令将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中,其中,同一个逻辑块对 应的待写入数据页写入至少一个物理块中,每个物理块中写入同一个逻辑块对应的待写入数据页。
在第十一方面,提供一种存储系统,包括存储器和管理器;
所述存储器包括多个物理块;
所述管理器用于接收数据写请求,确定待写入的数据页的数据类别,并向所述存储器发送数据写指令,所述数据写指令携带所述待写入数据页以及所述待写入的数据页的数据类别;
所述存储器用于接收所述数据写指令,根据所述数据写指令将所述至少一个数据类别对应的待写入数据页写入所述至少一个数据类别对应的物理块中,其中,同一个数据类别对应的待写入数据页写入至少一个物理块中,每个物理块中写入同一个数据类别对应的待写入数据页。
本发明通过对待写入的数据页进行分类,使得SSD上每个物理块上存储相同数据类别的数据页,由于相同数据类别的数据页的更新步调基本是一致的,因此,每个物理块上的有效的数据页的数量也随着物理块上的数据页的数据类别呈正态分布,例如,访问频率高的热数据所在的物理块上的无效的数据页较多,访问频率低的冷数据所在的物理块的无效数据页较少,这种数据页的有效性的分布情况不同于现有技术中随机写入的情况,SSD在进行垃圾回收时根据无效数据页的数量所挑选到的待擦除物理块上的有效的数据页的数量必然少于现有技术所挑选到的待擦除物理块上的有效的数据页的数量,因而,本发明实施例提供的方法减少了擦除物理块时的写放大。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为现有技术中SSD作为HDD的缓存使用的系统的架构图。
图2为现有技术中SSD进行数据更新时数据地址变化的示意图。
图3为本发明实施例提供的第一存储系统30的架构图。
图4为图3所示的实施例中数据类别、逻辑块与物理块的对应关系的示意图。
图5为图3所示的实施例中将数据写入请求中的待写入数据页被写入SSD的过程示意图。
图6为在图3所示的实施例中在对已存储的数据进行更新时,逻辑块中的逻辑地址变化的示意图。
图7为在图3所示的实施例中在擦除物理块之前,对待擦除物理块中的数据进行迁移的示意图。
图8为本发明实施例提供的第二存储系统的架构图。
图9为本发明实施例中提供的第一存储管理装置的方块图。
图10为本发明实施例中提供的第二存储管理装置的方块图。
图11为本发明实施例中提供的SSD的结构图。
图12为本发明实施例提供的一种混合存储装置的结构图。
图13本发明实施例中管理器将数据写入SSD的方法的流程图。
图14为本发明实施例中管理器将数据写入SSD的第一种具体实现方法的流程图。
图15为本发明实施例中管理器将数据写入SSD的第二种具体实现方法的流程图。
图16为本发明实施例中管理器控制SSD进行数据擦除的方法的流程图。
图17为本发明实施例中的计算机的结构组成示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普 通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明实施例中的存储器为包括多个物理块,擦除原来的数据才能写入新的数据,且以页为单位写入数据,而以物理块为单位擦除数据,这种存储器的代表为SSD,下面的实施例中即以SSD为例进行说明。
如图1,为现有技术中SSD作为HDD的缓存使用的系统的架构图。一般将经常访问的数据存储在SSD101中,并通过管理器103对SSD101和HDD102进行统一管理。所述管理器103通过映射表记录着哪些HDD102数据缓存在SSD101中。当一个请求到达时,所述管理器103查找映射表,判断所请求的数据是否存储在SSD101上。如果数据存储在SSD101上,则从SSD101中读取数据;如果数据不在SSD101上,则从HDD102中读取数据。如果SSD101中的数据写满,则进行数据擦除,将不常用的数据替换出去。
对于图1所示的架构,当所述SSD101与所述HDD103作为混合硬盘使用时,所述管理器103可以为所述混合硬盘的控制器,当所述SSD与所述HDD分别作为独立的设备接入计算机时,所述管理器101可以装载在所述计算机的操作系统中或者作为独立的模块装载在所述计算机中。上述图1中SSD101作为HDD的缓存使用,在其他的应用场景中,SSD101也可以独立作为存储设备。本发明可以运用于如图1所示的架构中,也可以运用于SSD101其它的应用场景中。
所述SSD一般为与非(not and,NAND)闪存,可以包括多个物理块(如1024个),每个物理块包括多个物理页(如64个)。其中物理页是读、写数据的基本单元,而物理块是SSD进行数据擦除的基本单元。
所述SSD包括闪存转换层(Flash translation layer,FTL),所述FTL可以用来记录数据的逻辑地址(Logical Block Address,LBA)与SSD中的物理地址(Physical Block Address,PBA)的对应关系,根据逻辑地址与物理地址的对应关系执行数据的读或者写操作。
另外,当需要对SSD上的数据进行更新时,所述FTL还可以把更新后的“新数据”写入到SSD的空闲物理页并更新数据的LBA和SSD中的PBA的对应关系,并把包含“旧数据”的物理页标记为无效页。如图2所示,若所述数据更新请求为对page0中的数据进行更新,则FTL将更新后的page0的数据写入到物理地址为n+2的物理页中,而将Page0的所在的物理地址为n的物理页标识为无效。
在SSD写满之后,需要进行物理块的替换,FTL选择无效页数量比较多的物理块进行擦除以释放空间存储新的数据。但由于SSD所擦除的物理块中可能包括大量的有效的数据页,这就需要把这些有效页的数据页迁移到另外的空闲位置后,再对需要擦除的物理块中的数据进行擦除,这个过程即为垃圾回收,由于垃圾回收的过程中需要将有效页的数据迁移到另外的空闲位置,对有效页的迁移引入了额外的写入,增加了SSD内部的数据写入的次数,即引起了写放大。
本发明实施例所提供的技术方案旨在减少在擦除物理块时所产生的写放大的问题。本发明实施例所提供的技术方案为通过管理器将需要写入SSD的数据根据访问情况分为多种数据类别(例如,热数据、普通热度数据及冷数据),然后通过修改SSD,使得SSD在存储数据时,在同一物理块存储同一种数据类别的数据。由于相同数据类别的数据页的更新步调基本是一致的,因此,每个物理块上的有效的数据页的数量也随着物理块上的数据页的数据类别呈正态分布,例如,访问频率高的热数据所在的物理块上的无效的数据页较多,访问频率低的冷数据所在的物理块的无效数据页较少,这种数据页的有效性的分布情况不同于现有技术中随机写入的情况,SSD在进行垃圾回收时根据无效数据页的数量所挑选到的待擦除物理块上的有效的数据页的数量必然少于现有技术所挑选到的待擦除物理块上的有效的数据页的数量,因而,本发明实施例提供的方法减少了擦除物理块时产生的写放大。
下面即通过本发明的不同的实施例对技术方案做详细的描述。
如图3所示,为本发明一实施例提供的第一存储系统30的架构 图。所述第一存储系统30包括管理器301及SSD302。所述SSD302包括多个物理块303。所述管理器301接收数据写请求,确定待写入的数据页的数据类别,为数据类别不同的待写入数据页指定不同的逻辑块,并向所述SSD302发送数据写指令,其中,每个逻辑块对应同一种数据类别的待写入数据页,所述数据写指令携带至少一个逻辑块对应的待写入数据页。
所述SSD302用于接收所述数据写指令,根据所述数据写指令将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块303中,其中,同一个逻辑块对应的待写入数据页写入至少一个物理块303中,每个物理块303中写入同一个逻辑块对应的待写入数据页。
所述管理器301所接收的所述数据写请求用于向所述SSD302写入数据,向所述SSD302写入的数据可以为第一次被写入所述存储系统30的数据,也可以为对已存储在SSD302上的数据进行更新的数据,也可以为从所述硬盘(图未示)中调入所述SSD302的数据。
由于所述SSD302是以页为单位进行数据的写入,所以在接收到所述数据写请求后,所述管理器301还将所述数据写请求中包含的待写入的数据分成多个数据页,然后分别确定每个待写入的数据页的数据类别。
所述管理器301将数据页分为多个数据类别,本实施例中,所述数据类别为数据访问类别,所述管理器根据数据的访问特征将数据页分为多个数据访问类别,所述访问特征可以为所述数据页的访问次数、或者所述数据页的重用距离、或者所述数据页的访问频率、或者所述数据页的访问次数与重用距离的综合特征,所述访问次数为所述待写入数据页被访问的次数,所述重用距离为所述数据页的两次访问之间所间隔的数据页的数量,即若一个数据页被访问后,若操作系统访问了7个数据页后,再次访问了这个数据页,则这个数据页的重用距离即为7;所述访问特征还可以是所述数据页被读、写的次数等,具体可根据实际情况进行访问特征的设定。
本实施例中,所述数据访问类别包括冷数据、热数据或普通热度数据中的任意两类的组合或全部类别的组合。例如,如表1所示,在所述访问特征为访问次数时,可定义访问次数(N)大于等于15次的为热数据,访问次数小于15次且大于等于5次时为普通热度数据,而当访问次数小于5次时为冷数据。
表2:类别定义表
访问特征 类别
N>=15次 热数据
5次<N<=15次 普通热度数据
N<5次 冷数据
上述对所述数据类别的划分及定义只是举例说明,在实际应用中,并不限于此,例如,可以根据数据的来源不同进行分类,如对来自不同应用的数据按照不同的应用进行分类。
对于第一次被写入所述第一存储系统的数据,所述管理器301可以预先为这些数据定义一种数据类别,比如,可以默认第一次被写入所述第一存储系统301的数据的数据类别为热数据。
本实施例中,数据类别与逻辑块的对应关系及逻辑块与SSD中的物理块的对应关系如图4所示,即一种数据类别可以对应至少一个逻辑块,一个逻辑块只能对应一种数据类别,同样地,一个逻辑块可以对应所述SSD302中的至少一个物理块303,所述SSD302中的一个物理块303只能对应一个逻辑块。这样,可以确保每个逻辑块中记录的是同一种数据类别的数据页,而每个物理块中也只存储一个逻辑块中的数据,也即存储同一种数据类别的数据页。
图4所示的数据类别与逻辑块的对应关系可以由所述管理器301预先建立,即所述管理器301预先将所述SSD302的逻辑空间划分为多个逻辑块,并为每种数据类别指定至少一个逻辑块,例如为热数据指定逻辑块A及B,为普通热度数据指定逻辑块C及D,为冷数据指定逻辑块E及F。如此,在管理器301确定待写入数据页的数据类别之后,即可为待写入数据页指定所确定的待写入数据页的数据类别 对应的逻辑块。
可替换地,图4所示的数据类别与逻辑块的对应关系并非为所述管理器301预先建立,而是在所述管理器301在确定每个待写入数据页的数据类别之后,若所确定的待写入数据页的数据类别没有对应的逻辑块,则随机地为所述待写入数据页指定一个逻辑块,然后再建立所确定的待写入数据页的数据类别与所指定的逻辑块的对应关系,若所确定的数据类别有对应的逻辑块,则为所述待写入数据页指定所确定的数据类别对应的逻辑块。本实施例中,在为待写入的数据页指定逻辑块后,所述管理器301还用于在为待写入的数据页指定逻辑块中记录每个逻辑块对应的每个待写入数据页的逻辑地址。
在所述SSD302预先配置了物理块303与逻辑块的对应关系,所述每个物理块303对应一个逻辑块,每个逻辑块对应至少一个物理块303。物理块303与逻辑块的对应关系如图4所示。如此,在所述SSD302在接收到所述数据写指令后,可以根据所述数据写指令中的所述至少一个逻辑块的信息查询所述物理块与逻辑块的对应关系,确定所述至少一个逻辑块对应的物理块303,将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块303中。通过上面的方式,可以使同一物理块303上存储的为同一数据类别的数据。
为了更清楚数据写入请求中的待写入数据页被写入SSD的过程,则以图5所示的例子进行详细说明。在图5所示的例子中,管理器301所接收的数据写入请求中包含待写入数据页page0、page1、page2;管理器301对根据page0、page1、page2的访问特征确定各自的数据类别,即page0为热数据,page1为普通热度数据,page2为冷数据;在确定个数据页的数据类别之后,管理器302根据每个数据页的类别为每个数据页指定一个逻辑块,其中,为热数据page0指定逻辑块A,为普通热度数据page1指定逻辑块C,为冷数据page2指定逻辑块E;可选地,所述管理器302还可以为待写入的数据页指定逻辑块中记录每个逻辑块对应的每个待写入数据页的逻辑地址,即将Page0的逻 辑地址记录至逻辑块A,将Page1的逻辑地址记录至逻辑块C,将Page2的逻辑地址记录至逻辑块E;所述管理器301在为各数据页指定逻辑块之后,管理器301发送数据写入指令至SSD302,所述数据写入指令中包含了待写入的数据页及每个待写入数据页的逻辑块信息(Page0,逻辑块A;page1,逻辑块C;page2,逻辑块E)。
在所述SSD302接收到所述数据写指令后,根据每个待写入数据页的逻辑块信息及SSD302中预设的物理块与逻辑块的对应关系确定每个逻辑块对应的物理块,即逻辑块A对应物理块A,B;逻辑块C对应物理块C,D;逻辑块E对应物理块E,F,然后所述SSD302再将待写入的数据页pag0存储至物理块A或者B、将待写入的数据页page1存储至物理块C或者D、将待写入的数据页page2存储至物理块E或者F。
通过本实施例的方式,可以使SSD302的同一物理块303上只存储同一种数据类别的数据页,这样,若一个物理块303上存储的都是访问率比较高的热数据,则这个物理块303上的所有数据被更新的可能性就比较高,在存储热数据的物理块的热数据被更新后,则存储在物理块上的更新前的热数据会变为无效数据,即存储热数据的物理块由于数据被更新的可能性高,则数据更新后,存储热数据的物理块上的无效页的数量也会较多,从而在对该物理块进行擦书时,所需要迁移的有效页的数量比较少,从而有效的减少了写放大。
进一步地,在本实施例中,在为待写入的数据页指定逻辑块后,所述管理器301还为待写入的数据页指定逻辑块中记录每个逻辑块对应的每个待写入数据页的逻辑地址,则在确定需要对已存储的数据页进行更新时,将所述已存储的数据页对应的逻辑块中所记录的所述已存储的数据页的逻辑地址置为无效。如图6所示,若记录在逻辑块A中的数据页Page0、page3、page4及page5被更新,则记录在逻辑块A中的数据页Page0、page3、page4及page5的逻辑地址LA0、LA3、LA4、LA5被设置为无效。这样,通过在逻辑块中记录每个数据页的逻辑地址,管理器301可以获知SSD内部存储的数据页的 类别及状态,可以实现对SSD302中存储的数据页的管理。
进一步地,本实施例可通过管理器301控制SSD302中物理块303的擦除,具体为:所述管理器301确定待擦除的逻辑块,向所述SSD302发送擦除指令,所述擦除指令携带所述待擦除的逻辑块的信息。
所述SSD302接收所述擦除指令,根据所述擦除指令中的所述待擦除的逻辑块的信息和所述物理块303与逻辑块的对应关系,确定待擦除的物理块303,以及擦除所述待擦除的物理块303。
本实施例中,所述管理器301根据每个逻辑块对应的数据页,确定待擦除的逻辑块。
进一步地,所述管理器301选择数据类别为热数据的逻辑块,或者无效逻辑地址数量多的逻辑块作为所述待擦除的逻辑块。
可替换地,所述管理器301选择数据类别为冷数据的逻辑块作为所述待擦除的逻辑块。
进一步地,在本实施例中,所述管理器302在向所述SSD302发送所述擦除指令之前,还根据预设的迁移策略确定所述待擦除的逻辑块中待迁移的数据页,并向所述SSD302发送数据迁移指令,所述数据迁移指令携带所述待迁移的数据页的信息。
所述SSD302根据所述数据迁移指令将所述SSD302中所述待迁移的数据页进行迁移。
所述管理器301将所述待擦除的逻辑块中当前数据类别为热数据且逻辑地址有效的数据页确定为所述待迁移的数据页。
管理器302根据数据写入时的那个时刻的待写入数据页的数据类别为待写入数据页指定逻辑块,但由于数据页的数据类别是根据访问特征的变化而变化的,所以在数据页被记录至逻辑块后,由于后续访问特征的变化,则记录在所述逻辑块中数据页的数据类别也会发生变化,例如,若一个数据页在被写入的时刻的数据类别为热数据,当被指定至热数据对应的逻辑块后,一直没有被访问,则变为冷数据,而一个数据页在被写入的时刻的数据类别为冷数据,当被指定至冷数 据对应的逻辑块后,则会变为热数据,所以,在对待擦除的逻辑块进行擦除的时刻,所述待擦除的逻辑块中所记录的数据页的数据类别可能跟刚记录至所述待擦除的逻辑块的时刻的数据类别已经不同,所以在对待擦除的逻辑块擦除时,可进一步判断待擦除的逻辑块中的数据页的类别,从而只将特定类别,如热数据或者普通热度数据的数据页进行迁移。这样可以进一步减少数据迁移的数量,从而进一步减少写放大。
在进行数据迁移时,所述数据迁移指令携带的所述待迁移的数据页的信息为待迁移的数据页的逻辑地址,所述SSD302在接收到所述数据迁移指令后,根据所述数据迁移指令中的所述待迁移的数据页的逻辑地址在所述待擦除的物理块中找到待迁移的数据页,然后对待迁移的数据页进行迁移。
进一步地,所述管理器301在确定所述待擦除的逻辑块中待迁移的数据页后,还将待迁移的数据页的逻辑地址记录到待迁移的数据页的数据类别对应的逻辑块中,相应地,所述管理器301向所述SSD302发送的数据迁移指令中还携带待迁移的数据页的数据类别对应的逻辑块的信息。则所述SSD302则根据所述迁移指令中携带的待迁移的数据页的数据类别对应的逻辑块的信息确定待迁移的数据页的数据类别对应的逻辑块对应的物理块,则将在所述待迁移的数据页迁移到所述待迁移的数据页的数据类别对应的逻辑块对应的物理块中。
如图7所示,若逻辑块A因为无效的逻辑页的数量比较多而被选择为待擦除的逻辑块,但在逻辑块A中还存在有效的逻辑地址LA14、LA15、LA16及LA17,其中,有效的逻辑地址LA14及LA15对应的数据类别为冷数据,LA16及LA17对应的数据类别分别为普通热度数据及热数据,则可确定待迁移的数据页为有效的逻辑地址LA16及LA17所对应的数据页,则分别将有效的逻辑地址LA16迁移到普通热度数据对应的逻辑块C中,而将有效的逻辑地址LA17迁移到热数据对应的另一个逻辑块B中,然后,管理器301向所述SSD301发送数据迁移指令,所述数据迁移指令中携带待迁移的数据 页page16及page17的逻辑地址LA16及LA17,及记录LA16及LA17的逻辑块即逻辑块C及逻辑块B的信息。
所述SSD302接收到所述数据迁移指令后,则根据逻辑地址LA16及LA17在待擦除的逻辑块A对应的待擦除的物理块B中找到待迁移的数据页page16及page17,然后将待迁移的数据页page16迁移到记录逻辑地址LA16的逻辑块所对应的物理块C中,将待迁移的数据页page17迁移到记录逻辑地址LA17的逻辑块所对应的物理块G中。在数据迁移完后,所述SSD302即可对待擦除的物理块A及物理块B进行擦除。
如图8所示,为另外一个实施例提供的第二存储系统80的架构图。所述第二存储系统50包括管理器801、SSD802及至少一个缓存804。所述SSD802包括多个物理块803。
所述管理器80在接收数据写请求之后,将数据类别不同的待写入数据页写入不同的缓存804中,所述每个缓存804写入同一种数据类别的待写入数据页,在任意一个缓存804写满时,为写满的缓存804中同一种类别的数据页指定一个逻辑块,向所述SSD802发送数据写指令,所述数据写指令携带所述写满的缓存804中的数据页被指定的逻辑块的信息和所述写满的缓存804中的数据页,其中每个缓存的容量小于或等于所述每个逻辑块的容量。
所述SSD802在接收到所述数据写指令后根据所述数据写指令,为所述写满的缓存804中的数据页被指定的逻辑块分配物理块803,以及将所述写满的缓存804中的数据页写入所述分配的物理块803,其中,所述分配的物理块804为所述SSD中的空闲物理块803,且所述空闲物理块803后续被标记为非空闲,所述分配的物理块803的总容量大于或等于所述写满的缓存804中的数据页被指定的逻辑块的容量。
本实施例中,所述空闲物理块804可以在物理块803被分配之后标记为非空闲,也可以在缓存804中的数据页被写入物理块803之后,被标记为非空闲。
在所述第二存储系统80中,数据页类别的划分方式,数据类别与逻辑块的对应关系建立方式,以及为待写入数据页指定逻辑块的方式与所述第一存储系统30相同,在此不再赘述。
在所述第二存储系统80中,为每种数据类别的数据页设置了一个缓存,在接收到数据写入请求时,将同一种数据类别的待写入数据页先写入同一缓存中,在发送数据写入指令给所述SSD,指示所述SSD将写满的缓存中的数据存储在同一物理块时,这样使同一物理块803上存储同一数据类别的数据的同时,还可以增大数据的写入粒度,从而提高数据的写入效率。
在所述第二存储系统80中,对物理块803中的数据的擦除,及在擦除前,对待擦除的物理块804中数据的迁移方式与第一存储系统30中的相同,在此不再赘述。
如图9所示,为本发明一实施例中提供的第一存储管理装置的方块图。所述第一存储管理装置90应用于存储系统,所述存储系统包括SSD,所述SSD包括多个物理块。所述第一存储管理装置90包括分类模块901、逻辑块管理模块902、写入指示模块903、擦除指示模块904及迁移指示模块905。
所述分类模块901用于接收数据写请求,确定待写入的数据页的数据类别。
所述分类模块901对数据的分类方式与所述第一存储系统30的管理器301对数据的分类方式相同,在此不再赘述。
所述逻辑块管理模块902用于根据所述分类模块901的分类结果,为数据类别不同的待写入数据页指定不同的逻辑块,其中,每个指定的逻辑块对应同一种数据类别的待写入数据页。
所述逻辑块管理模块902为数据类别不同的待写入数据页指定不同的逻辑块的方式与所述第一存储系统30的管理器301对数据类别不同的待写入数据页指定不同的逻辑块的方式相同,在此不再赘述。
所述写入指示模块903用于根据所述逻辑块管理模块902为所述 待写入数据页指定的逻辑块,向所述SSD发送数据写指令,其中,所述数据写指令携带至少一个指定的逻辑块对应的待写入数据页,所述数据写指令用于指示所述SSD根据所述数据写指令将所述至少一个指定的逻辑块对应的待写入数据页写入所述至少一个指定的逻辑块对应的物理块中,其中,同一个逻辑块对应的待写入数据页写入至少一个物理块中,每个物理块中写入同一个逻辑块对应的待写入数据页。
所述数据写指令进一步指示所述SSD根据所述数据写指令中的所述至少一个指定的逻辑块的信息查询所述SSD中设置的物理块与逻辑块的对应关系,确定所述至少一个指定的逻辑块对应的物理块,将所述至少一个指定的逻辑块对应的待写入数据页写入所述至少一个指定的逻辑块对应的物理块中。
所述逻辑块管理模块902在为所述数据类别不同的待写入数据页指定不同的逻辑块之后,还用于在所述至少一个指定的逻辑块中记录所述至少一个指定的逻辑块对应的每个待写入数据页的逻辑地址,以及记录所述至少一个指定的逻辑块与所述至少一个指定的逻辑块对应的数据页的数据类别之间的对应关系。
所述擦除指示模块904用于确定待擦除的逻辑块,向所述SSD302发送擦除指令,所述擦除指令携带所述待擦除的逻辑块的信息,所述擦除指令用于指示所述SSD根据所述擦除指令中的所述待擦除的逻辑块的信息和所述SSD中设置的物理块与逻辑块的对应关系,确定待擦除的物理块,以及擦除所述待擦除的物理块。
进一步地,所述逻辑块管理模块902在确定需要对已存储的数据页进行更新时,将所述已存储的数据页对应的逻辑块中所记录的所述已存储的数据页的逻辑地址置为无效;
所述擦除指示模块904根据每个逻辑块对应的数据页,确定待擦除的逻辑块。
进一步地,所述擦除指示模块904选择数据类别为热数据的逻辑块,或者无效逻辑地址数量多的逻辑块作为所述待擦除的逻辑块。
可替换地,所述管理器301选择数据类别为冷数据的逻辑块作为所述待擦除的逻辑块。
在所述擦除指示模块904在向所述SSD发送所述擦除指令之前,所述迁移指示模块905用于根据预设的迁移策略确定所述待擦除的逻辑块中待迁移的数据页,并向所述SSD发送数据迁移指令,所述数据迁移指令携带所述待迁移的数据页的信息,所述数据迁移指令用于指示所述SSD将所述SSD中所述待迁移的数据页进行迁移。
所述迁移指示模块905将所述待擦除的逻辑块中当前数据类别为热数据且逻辑地址有效的数据页确定为所述待迁移的数据页。
如图10所示,为本发明另一实施例中提供的第二存储管理装置100的方块图。所述第二存储管理装置100应用于一存储系统,所述存储系统包括SSD及至少一个缓存,所述SSD包括多个物理块。所述存储管理装置100包括分类模块1001、缓存写入模块1002、逻辑块管理模块1003、写入指示模块1004、擦除指示模块1005及迁移指示模块1006。
所述分类模块1001用于接收数据写请求,确定待写入的数据页的数据类别。
所述缓存写入模块1002,用于根据所述分类模块1001的分类结果,将数据类别不同的待写入数据页写入不同的缓存中,同一种数据类别的待写入数据页被写入同一缓存中,每个缓存的容量小于或等于所述每个逻辑块的容量。所述逻辑块管理模块1003用于根据所述分类模块1001的分类结果为每个写满的缓存中的同一种数据类别的数据页指定一个逻辑块。
所述写入指示模块1004用于在所述缓存写入模块1002写满缓存时,根据所述逻辑块管理模块1003为所述待写入数据页指定的逻辑块,向所述SSD发送数据写指令,所述数据写指令携带所述至少一个指定的逻辑块的信息和所述至少一个指定的逻辑块对应的数据页;
所述数据写指令用于指示所述SSD为所述至少一个指定的逻辑块分配物理块,以及将所述至少一个指定的逻辑块对应的数据页写入 所述分配的物理块,其中,所述分配的物理块为所述SSD中的空闲物理块,且所述空闲物理块后续被标记为非空闲,所述分配的物理块的总容量大于或等于所述至少一个指定的逻辑块的容量。本实施例中,所述空闲物理块可以在物理块被分配之后标记为非空闲,也可以在缓存中的数据页被写入物理块之后,被标记为非空闲。
所述擦除指示模块1005及迁移指示模块1006与所述第一存储装置10中的擦除指示模块1004及迁移指示模块1005所执行的功能相同,在此不再赘述。
如图11所示,为本发明一实施例提供的SSD的方块图。所述SSD11可以应用于一存储系统,所述存储系统包括管理器。所述SSD11包括接收模块1102、写入模块1103、擦除模块1104、及迁移模块1105。
所述接收模块1102用于接收由所述管理器所述数据写指令,所述数据写指令携带至少一个指定的逻辑块对应的待写入数据页及所述至少一个指定的逻辑块信息,所述数据写指令是由所述管理器在确定待写入的数据页的数据类别,并为数据类别不同的待写入数据页指定不同的逻辑块之后发送的,其中,每个指定的逻辑块对应同一种数据类别的待写入数据页。
所述写入模块1103用于根据所述数据写指令中的所述至少一个指定的逻辑块的信息查询所述SSD11中设置的物理块与逻辑块的对应关系,确定所述至少一个指定的逻辑块对应的物理块,将所述至少一个指定的逻辑块对应的待写入数据页写入所述至少一个指定的逻辑块对应的物理块中,所述每个物理块对应一个逻辑块,每个逻辑块对应至少一个物理块;
所述接收模块1102还用于接收所述管理器发送的擦除指令,所述擦除指令为所述管理器确定待擦除的逻辑块后发送的,所述擦除指令携带所述待擦除的逻辑块的信息。
所述擦除模块1104用于根据所述擦除指令中的所述待擦除的逻辑块的信息和所述物理块与逻辑块的对应关系,确定待擦除的物理 块,以及擦除所述待擦除的物理块。
所述接收模块1102还用于接收管理器发送的数据迁移指令,所述数据迁移指令为所述管理器根据预设的迁移策略确定所述待擦除的逻辑块中待迁移的数据页后发送的,所述数据迁移指令携带所述待迁移的数据页的信息;
所述迁移模块1105用于根据所述数据迁移指令将所述SSD中所述待迁移的数据页进行迁移。
所述SSD11还可用于包括缓存及管理器的系统中,接收数据写指令,所述数据写指令为所述管理器将数据类别不同的待写入数据页写入不同的缓存中,且在缓存写满时,为每个写满的缓存中的同一种数据类别的数据页指定至少一个逻辑块之后发送的,其中,所述每个缓存写入同一种数据类别的待写入数据页。
在所述接收模块1102接收到所述数据写指令后,所述写入模块1103根据所述数据写指令,为所述至少一个指定的逻辑块分配物理块,以及将所述至少一个指定的逻辑块对应的数据页写入所述分配的物理块,其中,所述分配的物理块为所述SSD11中的空闲物理块,且所述空闲物理块后续被标记为非空闲,所述分配的物理块的总容量大于或等于所述至少一个指定的逻辑块的容量。
所述写入模块1103还用于根据所述数据写指令中的所述至少一个指定的逻辑块的信息以及所述至少一个指定的逻辑块被分配的物理块的信息,记录物理块与逻辑块之间的对应关系。
如图12所示,为本发明一实施例提供的一种混合存储装置12的结构图。所述混合存储装置12包括包括管理器1201、SSD1202、及HDD1203,所述SSD1202作为所述HDD的缓存,所述SSD1202包括多个物理块1204。
所述管理器1201所执行的功能与所述第一存储系统30的管理器301或者所述第二存储系统80的管理器801所执行的功能相同,所述SSD1202所执行的功能与所述第一存储系统30的SSD302或者所述第二存储系统80中的SSD802所执行的功能相同,在此不再赘述。
本发明一实施例还提供一种存储管理方法,所述存储管理方法可以应用于存储管理系统,所述存储管理系统包括管理器及SSD,所述SSD包括多个物理块。所述存储管理方法包括三部分,第一部分为管理器将数据写入SSD的方法,第三部分所述管理器控制所述SSD进行数据擦除的方法。
如图13所示,为管理器将数据写入SSD的方法的流程图。
步骤S1301,所述管理器接收数据写请求,确定待写入的数据页的数据类别。
步骤S1302,所述管理器为数据类别不同的待写入数据页指定不同的逻辑块,且每个逻辑块对应同一种数据类别的待写入数据页。
步骤S1303,所述管理器向所述SSD发送数据写指令,所述数据写指令携带至少一个逻辑块对应的待写入数据页及所述至少一个指定的逻辑块信息。
步骤S1304,所述SSSD接收所述数据写指令,根据所述数据写指令,将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中。其中,同一个逻辑块对应的待写入数据页写入至少一个物理块中,每个物理块中写入同一个逻辑块对应的待写入数据页。
在步骤S1302之后,所述方法还可以进一步包括:所述管理器在所述至少一个指定的逻辑块中记录所述至少一个指定的逻辑块对应的每个待写入数据页的逻辑地址,以及记录所述至少一个指定的逻辑块与所述至少一个指定的逻辑块对应的数据页的数据类别之间的对应关系。
如图14所示,为管理器将数据写入SSD的第一种具体实现方法的的流程图。
步骤S1401,所述管理器接收数据写请求,确定待写入的数据页的数据类别。
步骤S1402,所述管理器为数据类别不同的待写入数据页指定不同的逻辑块,且每个逻辑块对应同一种数据类别的待写入数据页。
步骤S1403,所述管理器向所述SSD发送数据写指令,所述数据写指令携带至少一个逻辑块对应的待写入数据页及所述至少一个指定的逻辑块信息。
步骤S1404,所述SSD根据所述数据写指令中的所述至少一个指定的逻辑块的信息查询SSD中设置的物理块与逻辑块的对应关系,确定所述至少一个指定的逻辑块对应的物理块。
步骤S1405,所述SSD根据所述数据写指令中的所述至少一个指定的逻辑块的信息查询SSD中设置的物理块与逻辑块的对应关系,确定所述至少一个指定的逻辑块对应的物理块。
步骤S1405,所述SSD将所述至少一个指定的逻辑块对应的待写入数据页写入所述至少一个指定的逻辑块对应的物理块中。
在步骤S1402之后,所述方法还可以进一步包括:所述管理器在所述至少一个指定的逻辑块中记录所述至少一个指定的逻辑块对应的每个待写入数据页的逻辑地址,以及记录所述至少一个指定的逻辑块与所述至少一个指定的逻辑块对应的数据页的数据类别之间的对应关系。
所述存储管理方法所应用的存储管理系统还进一步包括多个缓存,在包括多个缓存的存储管理系统中,所述管理器通过第二种方法将数据写入SSD。
如图15所示,为管理器将数据写入SSD的第二种具体实现方法的流程图。
步骤S1501,所述管理器接收数据写请求,确定待写入的数据页的数据类别。
步骤S1502,所述管理器将数据类别不同的待写入数据页写入不同的缓存中,所述每个缓存写入同一种数据类别的待写入数据页。
步骤S1503,所述管理器在缓存写满时,为每个写满的缓存中的同一种数据类别的数据页指定至少一个逻辑块。
步骤S1504,所述管理器向所述SSD发送数据写指令,所述数据写指令携带至少一个逻辑块对应的待写入数据页及所述至少一个指 定的逻辑块信息。
步骤S1505,所述SSD根据所述数据写指令,为所述至少一个指定的逻辑块分配物理块。
步骤S1506,所述SSD将所述至少一个指定的逻辑块对应的数据页写入所述分配的物理块。
步骤S1507,所述SSD根据所述数据写指令中的所述至少一个指定的逻辑块的信息以及所述至少一个指定的逻辑块被分配的物理块的信息,记录物理块与逻辑块之间的对应关系。
在所述步骤S1503之后,所述方法还可以进一步包括:所述管理器在所述至少一个指定的逻辑块中记录所述至少一个指定的逻辑块对应的每个待写入数据页的逻辑地址,以及记录所述至少一个指定的逻辑块与所述至少一个指定的逻辑块对应的数据页的数据类别之间的对应关系。
在所述存储管理方法还包括:在确定需要对已存储的数据页进行更新时,所述管理器将所述已存储的数据页对应的逻辑块中所记录的所述已存储的数据页的逻辑地址置为无效。
如图16所示,为所述管理器控制所述SSD进行数据擦除的方法的流程图。
步骤S1601,所述管理器确定待擦除的逻辑块。
步骤S1602,所述管理器根据预设的迁移策略确定所述待擦除的逻辑块中待迁移的数据页。
步骤1603,所述管理器向所述SSD发送数据迁移指令,所述数据迁移指令携带所述待迁移的数据页的信息。
步骤1604,所述SSD接收所述数据迁移指令,根据所述数据迁移指令中的所述待迁移的数据页的信息将所述SSD中所述待迁移的数据页进行迁移。
步骤1605,所述管理器向所述SSD发送擦除指令,所述擦除指令携带所述待擦除的逻辑块的信息。
步骤1606,所述SSD接收所述擦除指令,根据所述擦除指令中 的所述待擦除的逻辑块的信息和所述物理块与逻辑块的对应关系,确定待擦除的物理块,以及擦除所述待擦除的物理块。
所述管理器可以通过两种方式确定带擦除的逻辑块,第一种方式为:根据已指定的逻辑块中无效的逻辑地址的数量确定待擦除的逻辑块,其中,所述待擦除的逻辑块中包含的无效的逻辑地址的数量大于预设值;第二种方式为:根据所述已指定的逻辑块与所述已指定的逻辑块对应的数据页的数据类别之间的对应关系,选择数据类别为冷数据的逻辑块作为所述待擦除的逻辑块。
如图17所示,为本发明实施例提供的存储管理器的结构组成示意图。本发明实施例的存储管理器可包括:
处理器1701、存储器1702、系统总线1704和通信接口1705。CPU1701、存储器1702和通信接口1705之间通过系统总线1704连接并完成相互间的通信。
处理器1701可能为单核或多核中央处理单元,或者为特定集成电路,或者为被配置成实施本发明实施例的一个或多个集成电路。
存储器1702可以为高速RAM存储器,也可以为非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。
存储器1702用于计算机执行指令1703。具体的,计算机执行指令1703中可以包括程序代码。
当存储管理器运行时,处理器1701运行计算机执行指令1703,可以执行图13-图16任意之一所述的方法流程。
本发明实施例还提供一种计算机可读介质,包括计算机执行指令,当计算机的处理器执行所述计算机执行指令时,所述计算机执行图13-图16任意之一所述的方法。
本发明SSD所执行的功能对SSD的FTL改进,由SSD的FTL执行,也可以为嵌入入SSD的独立的功能模块。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来请求相关的硬件来完成,所述程序可以存储于一计算机可读存储介质中,存储介质可以包括:ROM、RAM、 磁盘或光盘等。
以上对本发明实施例所提供的数据配置及其回退方法和设备,进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。

Claims (46)

  1. 一种存储系统,包括存储器和管理器;
    所述存储器包括多个物理块;
    所述管理器用于接收数据写请求,确定待写入数据页的数据类别,为数据类别不同的待写入数据页指定不同的逻辑块,并向所述存储器发送数据写指令,其中,所指定的每个逻辑块对应同一种数据类别的待写入数据页,所述数据写指令携带所指定的至少一个逻辑块对应的待写入数据页;
    所述存储器用于接收所述数据写指令,根据所述数据写指令,将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中,其中,同一个逻辑块对应的待写入数据页写入至少一个物理块中,每个物理块中写入同一个逻辑块对应的待写入数据页。
  2. 如权利要求1所述的存储系统,其特征在于,所述存储器中还预先配置物理块与逻辑块的对应关系,其中,所述每个物理块对应一个逻辑块,每个逻辑块对应至少一个物理块;
    则,所述管理器还用于在所述数据写指令中进一步携带所述至少一个逻辑块的信息;
    所述存储器在接收到所述数据写指令后,具体用于:根据所述数据写指令中的所述至少一个逻辑块的信息查询所述物理块与逻辑块的对应关系,确定所述至少一个逻辑块对应的物理块,将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中。
  3. 如权利要求1所述的存储系统,其特征在于,所述存储系统还包括至少一个缓存,每个缓存的容量小于或等于所述每个逻辑块的容量;
    所述管理器在接收数据写请求之后,具体用于:将数据类别不同的待写入数据页写入不同的缓存中,所述每个缓存中写入同一种数据 类别的待写入数据页,为每个写满的缓存中的同一种数据类别的数据页指定至少一个逻辑块,向所述存储器发送数据写指令,所述数据写指令携带所述至少一个逻辑块的信息和所述至少一个逻辑块对应的待写入数据页;
    所述存储器在接收到所述数据写指令后,具体用于:根据所述数据写指令,为所述至少一个逻辑块分配物理块,以及将所述至少一个逻辑块对应的数据页写入所述分配的物理块中,其中,所述至少一个逻辑块中的每个逻辑块被分配的物理块为所述存储器中的空闲物理块,且所述空闲物理块在被分配之后被标记为非空闲,所述至少一个逻辑块中的每个逻辑块被分配的物理块的总容量大于或等于所述至少一个逻辑块中的每个逻辑块的容量。
  4. 如权利要求3所述的存储系统,其特征在于,所述存储器还用于根据所述数据写指令中的所述至少一个逻辑块的信息以及所述至少一个逻辑块被分配的物理块的信息,记录物理块与逻辑块之间的对应关系。
  5. 如权利要求2或4所述的存储系统,其特征在于,所述管理器还用于在所述至少一个逻辑块中记录所述至少一个逻辑块对应的每个待写入数据页的逻辑地址。
  6. 如权利要求5所述的存储系统,其特征在于,所述管理器还用于根据每个逻辑块对应的数据页,确定待擦除的逻辑块,向所述存储器发送擦除指令,所述擦除指令携带所述待擦除的逻辑块的信息;
    所述存储器还用于接收所述擦除指令,根据所述擦除指令中的所述待擦除的逻辑块的信息和所述物理块与逻辑块的对应关系,确定待擦除的物理块,以及擦除所述待擦除的物理块。
  7. 如权利要求6所述的存储系统,其特征在于,所述数据类别为根据数据被访问的频率确定的冷数据和热数据;所述管理器还用于在确定需要对已存储的数据页进行更新时,将所述已存储的数据页对应的逻辑块中记录的所述已存储的数据页的逻辑地址置为无效;
    所述管理器用于根据每个逻辑块对应的数据页,确定待擦除的逻 辑块具体包括:选择数据类别为热数据的逻辑块。
  8. 如权利要求6所述的存储系统,其特征在于,所述管理器还用于在确定需要对已存储的数据页进行更新时,将所述已存储的数据页对应的逻辑块中记录的所述已存储的数据页的逻辑地址置为无效;
    所述管理器用于根据每个逻辑块对应的数据页,确定待擦除的逻辑块具体包括:选择无效逻辑地址数量多的逻辑块作为所述待擦除的逻辑块。
  9. 如权利要求6所述的存储系统,其特征在于,所述数据类别为根据数据被访问的频率确定的冷数据和热数据;所述管理器用于根据每个逻辑块对应的数据页,确定待擦除的逻辑块具体包括:选择数据类别为冷数据的逻辑块作为所述待擦除的逻辑块;
    所述管理器还用于在所述擦除指令携带禁止垃圾回收的指示。
  10. 如权利要求6至9中任意一项所述的存储系统,其特征在于,所述管理器在向所述存储器发送所述擦除指令之前,所述管理器还用于根据预设的迁移策略确定所述待擦除的逻辑块中待迁移的数据页,并向所述存储器发送数据迁移指令,所述数据迁移指令携带所述待迁移的数据页的信息;
    所述存储器还用于根据所述数据迁移指令将所述存储器中所述待迁移的数据页进行迁移。
  11. 如权利要求10所述的存储系统,其特征在于,所述管理器还用于根据预设的迁移策略确定所述待擦除的逻辑块中待迁移的数据页具体包括:将所述待擦除的逻辑块中当前数据类别为热数据且逻辑地址有效的数据页确定为所述待迁移的数据页。
  12. 一种存储管理装置,其特征在于,应用于包括存储器的存储系统,所述存储器包括多个物理块,所述存储管理装置包括:
    分类模块,用于接收数据写请求,确定待写入数据页的数据类别;
    逻辑块管理模块,用于根据所述分类模块的分类结果,为数据类别不同的待写入数据页指定不同的逻辑块,其中,所指定的每个逻辑块对应同一种数据类别的待写入数据页;
    写入指令模块,用于根据所述逻辑块管理模块为所述待写入数据页指定的逻辑块,向所述存储器发送数据写指令,其中,所述数据写指令携带至少一个逻辑块对应的待写入数据页,所述数据写指令用于指示所述存储器根据所述数据写指令将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中,其中,同一个逻辑块对应的待写入数据页写入至少一个物理块中,每个物理块中写入同一个逻辑块对应的待写入数据页。
  13. 如权利要求12所述的存储管理装置,其特征在于,所述数据写指令中进一步携带所述至少一个逻辑块信息;
    所述数据写指令具体用于指示所述存储器根据所述数据写指令中的所述至少一个逻辑块的信息查询所述存储器中预设的物理块与逻辑块的对应关系,确定所述至少一个逻辑块对应的物理块,将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中。
  14. 如权利要求12所述的存储管理装置,其特征在于,所述存储管理装置还包括:
    缓存写入模块,用于根据所述分类模块的分类结果,将数据类别不同的待写入数据页写入不同的缓存中,同一种数据类别的待写入数据页被写入同一缓存中,每个缓存的容量小于或等于所述每个逻辑块的容量;
    所述逻辑块管理模块用于为每个写满的缓存中的同一种数据类别的数据页指定一个逻辑块;
    所述写入指令模块具体用于根据所述逻辑块管理模块为所述待写入数据页指定的逻辑块,向所述存储器发送数据写指令,所述数据写指令携带所述至少一个逻辑块的信息和所述至少一个逻辑块对应的数据页,所述数据写指令具体用于指示所述存储器为所述至少一个逻辑块分配物理块,以及将所述至少一个逻辑块对应的数据页写入所述分配的物理块,其中,所述至少一个逻辑块中的每个逻辑块被分配的物理块为所述存储器中的空闲物理块,且所述空闲物理块被分配之 后被标记为非空闲,所述至少一个逻辑块中的每个逻辑块被分配的物理块的总容量大于或等于所述至少一个逻辑块中的每个逻辑块的容量。
  15. 如权利要求13或14所述的存储管理装置,其特征在于,所述逻辑块管理模块还用于在所述至少一个逻辑块中记录所述至少一个逻辑块对应的每个待写入数据页的逻辑地址,以及记录所述至少一个逻辑块对应的数据页的数据类别。
  16. 如权利要求15所述的存储管理装置,其特征在于,所述的存储管理装置还包括擦除指令模块,用于根据每个逻辑块对应的数据页,确定待擦除的逻辑块,向所述存储器发送擦除指令,所述擦除指令携带所述待擦除的逻辑块的信息,所述擦除指令用于指示所述存储器根据所述擦除指令中的所述待擦除的逻辑块的信息和所述存储器中设置的物理块与逻辑块的对应关系,确定待擦除的物理块,以及擦除所述待擦除的物理块。
  17. 如权利要求16所述的存储管理装置,其特征在于,所述数据类别为根据数据被访问的频率确定的冷数据和热数据;所述逻辑块管理模块还用于在确定需要对已存储的数据页进行更新时,将所述已存储的数据页对应的逻辑块中记录的所述已存储的数据页的逻辑地址置为无效;
    所述擦除指令模块用于确定待擦除的逻辑块具体包括:选择数据类别为热数据的逻辑块,或者无效逻辑地址数量多的逻辑块作为所述待擦除的逻辑块。
  18. 如权利要求16所述的存储管理装置,其特征在于,所述数据类别为根据数据被访问的频率确定的冷数据和热数据;所述擦除指令模块用于确定待擦除的逻辑块具体包括:选择数据类别为冷数据的逻辑块作为所述待擦除的逻辑块;
    所述擦除指令模块还用于在所述擦除指令携带禁止垃圾回收的指示。
  19. 如权利要求16或17或18所述的存储管理装置,其特征在 于,所述存储管理装置还包括迁移指令模块,在所述擦除指令模块在向所述存储器发送所述擦除指令之前,所述迁移指令模块用于根据预设的迁移策略确定所述待擦除的逻辑块中待迁移的数据页,并向所述存储器发送数据迁移指令,所述数据迁移指令携带所述待迁移的数据页的信息,所述数据迁移指令用于指示所述存储器将所述存储器中所述待迁移的数据页进行迁移。
  20. 如权利要求19所述的存储管理装置,其特征在于,所述迁移指令模块根据预设的迁移策略确定所述待擦除的逻辑块中待迁移的数据页具体包括:将所述待擦除的逻辑块中当前数据类别为热数据且逻辑地址有效的数据页确定为所述待迁移的数据页。
  21. 一种存储器,其特征在于,包括:
    接收模块,用于接收数据写指令,所述数据写指令携带至少一个逻辑块对应的待写入数据页,所述数据写指令是由管理器在确定待写入的数据页的数据类别,并为数据类别不同的待写入数据页指定不同的逻辑块之后发送的,其中,所指定的每个逻辑块对应同一种数据类别的待写入数据页;
    写入模块,用于根据所述数据写指令将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中,其中,同一个逻辑块对应的待写入数据页写入至少一个物理块中,每个物理块中写入同一个逻辑块对应的待写入数据页。
  22. 如权利要求21所述的存储器,其特征在于,所述存储器中包括预设的物理块与逻辑块的对应关系,其中,所述每个物理块对应一个逻辑块,每个逻辑块对应至少一个物理块;
    则,所述接收模块所接收的数据写指令中进一步携带所述至少一个逻辑块信息;
    在所述接收模块接收到所述数据写指令后,所述写入模块具体用于:根据所述数据写指令中的所述至少一个逻辑块的信息查询所述配置模块预先配置的所述物理块与逻辑块的对应关系,确定所述至少一个逻辑块对应的物理块,将所述至少一个逻辑块对应的待写入数据页 写入所述至少一个逻辑块对应的物理块中。
  23. 如权利要求21所述的存储器,其特征在于,
    所述数据写指令为所述管理器将数据类别不同的待写入数据页写入不同的缓存中,为每个写满的缓存中的同一种数据类别的数据页指定至少一个逻辑块之后发送的,其中,所述每个缓存写入同一种数据类别的待写入数据页;
    在所述接收模块接收到所述数据写指令后,所述写入模块具体用于:根据所述数据写指令,为所述至少一个逻辑块分配物理块,以及将所述至少一个逻辑块对应的数据页写入所述分配的物理块,其中,所述至少一个逻辑块中的每个逻辑块被分配的物理块为所述存储器中的空闲物理块,且所述空闲物理块被分配之后被标记为非空闲,所述至少一个逻辑块中的每个逻辑块被分配的物理块的总容量大于或等于所述至少一个逻辑块中的每个逻辑块的容量。
  24. 如权利要求23所述的存储器,其特征在于,所述写入模块还用于根据所述数据写指令中的所述至少一个逻辑块的信息以及所述至少一个逻辑块被分配的物理块的信息,记录物理块与逻辑块之间的对应关系。
  25. 如权利要求24所述的存储器,其特征在于,所述接收模块还用于接收所述管理器发送的擦除指令,所述擦除指令为所述管理器确定待擦除的逻辑块后发送的,所述擦除指令携带所述待擦除的逻辑块的信息;
    所述存储器还包括擦除模块,用于根据所述擦除指令中的所述待擦除的逻辑块的信息和所述物理块与逻辑块的对应关系,确定待擦除的物理块,以及擦除所述待擦除的物理块。
  26. 如权利要求25所述的存储器,其特征在于,所述接收模块还用于接收管理器发送的数据迁移指令,所述数据迁移指令为所述管理器根据预设的迁移策略确定所述待擦除的逻辑块中待迁移的数据页后发送的,所述数据迁移指令携带所述待迁移的数据页的信息;
    所述存储器还包括迁移模块,用于根据所述数据迁移指令将所述 存储器中所述待迁移的数据页进行迁移。
  27. 一种混合存储装置,其特征在于,包括硬盘、如权利要求12-20任一项所述的管理器,以及如权利要求21-26任一项所述的存储器,所述存储器作为所述磁盘存储器的缓存。
  28. 一种存储管理方法,应用于包括存储器的存储系统,所述存储器包括多个物理块,所述方法包括:
    接收数据写请求,确定待写入的数据页的数据类别;
    为数据类别不同的待写入数据页指定不同的逻辑块,其中,每个指定的逻辑块对应同一种数据类别的待写入数据页;
    向所述存储器发送数据写指令,其中,所述数据写指令携带至少一个逻辑块对应的待写入数据页,所述数据写指令用于指示所述存储器根据所述数据写指令将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中,同一个逻辑块对应的待写入数据页写入至少一个物理块中,每个物理块中写入同一个逻辑块对应的待写入数据页。
  29. 如权利要求28所述的存储管理方法,其特征在于,所述数据写指令中进一步携带所述至少一个逻辑块信息;
    所述数据写指令进一步指示所述存储器根据所述数据写指令中的所述至少一个逻辑块的信息查询所述存储器中预设的物理块与逻辑块的对应关系,确定所述至少一个逻辑块对应的物理块,将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中。
  30. 如权利要求28所述的存储管理方法,其特征在于,还包括:
    将数据类别不同的待写入数据页写入不同的缓存中,同一种数据类别的待写入数据页被写入同一缓存中,每个缓存的容量小于或等于所述每个逻辑块的容量;
    为每个写满的缓存中的同一种数据类别的数据页指定一个逻辑块;
    为所述待写入数据页指定的逻辑块,向所述存储器发送数据写指 令,所述数据写指令携带所述至少一个逻辑块的信息和所述至少一个逻辑块对应的数据页,所述数据写指令具体用于指示所述存储器为所述至少一个逻辑块分配物理块,以及将所述至少一个逻辑块对应的数据页写入所述分配的物理块,其中,所述至少一个逻辑块中的每个逻辑块被分配的物理块为所述存储器中的空闲物理块,且所述空闲物理块被分配之后被标记为非空闲,所述至少一个逻辑块中的每个逻辑块被被分配的物理块的总容量大于或等于所述至少一个逻辑块中的每个逻辑块的容量。
  31. 如权利要求29或30所述的存储管理方法,其特征在于,在所述为所述数据类别不同的待写入数据页指定不同的逻辑块之后,还包括在所述至少一个逻辑块中记录所述至少一个逻辑块对应的每个待写入数据页的逻辑地址。
  32. 如权利要求31所述的存储管理方法,其特征在于,还包括根据每个逻辑块对应的数据页,确定待擦除的逻辑块,向所述存储器发送擦除指令,所述擦除指令携带所述待擦除的逻辑块的信息,所述擦除指令用于指示所述存储器根据所述擦除指令中的所述待擦除的逻辑块的信息和所述存储器中设置的物理块与逻辑块的对应关系,确定待擦除的物理块,以及擦除所述待擦除的物理块。
  33. 如权利要求32所述的存储管理方法,其特征在于,所述数据类别为根据数据被访问的频率确定的冷数据和热数据;所述方法还包括:在确定需要对已存储的数据页进行更新时,将所述已存储的数据页对应的逻辑块中记录的所述已存储的数据页的逻辑地址置为无效;
    所述确定待擦除的逻辑块具体包括:选择数据类别为热数据的逻辑块,或者无效逻辑地址数量多的逻辑块作为所述待擦除的逻辑块。
  34. 如权利要求32所述的存储管理方法,其特征在于,所述数据类别为根据数据被访问的频率确定的冷数据和热数;
    所述确定待擦除的逻辑块具体包括:选择数据类别为冷数据的逻辑块作为所述待擦除的逻辑块;
    在所述擦除指令携带禁止垃圾回收的指示。
  35. 如权利要求32或33或34所述的存储管理方法,其特征在于,在所述向所述存储器发送所述擦除指令之前,还包括根据预设的迁移策略确定所述待擦除的逻辑块中待迁移的数据页,并向所述存储器发送数据迁移指令,所述数据迁移指令携带所述待迁移的数据页的信息,所述数据迁移指令用于指示所述固态存储器将所述固态存储器中所述待迁移的数据页进行迁移。
  36. 如权利要求35所述的存储管理方法,其特征在于,所述根据预设的迁移策略确定所述待擦除的逻辑块中待迁移的数据页具体包括:将所述待擦除的逻辑块中当前数据类别为热数据且逻辑地址有效的数据页确定为所述待迁移的数据页。
  37. 一种存储管理方法,应用于存储器,其特征在于,
    接收数据写指令,所述数据写指令携带至少一个逻辑块对应的待写入数据页,所述数据写指令是由管理器在确定待写入的数据页的数据类别,并为数据类别不同的待写入数据页指定不同的逻辑块之后发送的,其中,所指定的每个逻辑块对应同一种数据类别的待写入数据页;
    根据所述数据写指令将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中,其中,同一个逻辑块对应的待写入数据页写入至少一个物理块中,每个物理块中写入同一个逻辑块对应的待写入数据页。
  38. 如权利要求37所述的存储管理方法,其特征在于,所述存储器中包括预设的物理块与逻辑块的对应关系,其中,所述每个物理块对应一个逻辑块,每个逻辑块对应至少一个物理块;
    所述数据写指令中进一步携带所述至少一个逻辑块信息;
    在接收到所述数据写指令后,根据所述数据写指令将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中具体包括:根据所述数据写指令中的所述至少一个逻辑块的信息查询所述物理块与逻辑块的对应关系,确定所述至少一个逻辑块对应 的物理块,将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中。
  39. 如权利要求37所述的存储管理方法,其特征在于,
    所述数据写指令为所述管理器将数据类别不同的待写入数据页写入不同的缓存中,为每个写满的缓存中的同一种数据类别的数据页指定至少一个逻辑块之后发送的,其中,所述每个缓存写入同一种数据类别的待写入数据页;
    在接收到所述数据写指令后,根据所述数据写指令将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中具体包括:根据所述数据写指令,为所述至少一个逻辑块分配物理块,以及将所述至少一个逻辑块对应的数据页写入所述分配的物理块,其中,所述至少一个逻辑块中的每个逻辑块被分配的物理块为所述存储器中的空闲物理块,且所述空闲物理块被分配之后被标记为非空闲,所述至少一个逻辑块中的每个逻辑块被分配的物理块的总容量大于或等于所述至少一个逻辑块中的每个逻辑块的容量。
  40. 如权利要求39所述的存储管理方法,其特征在于,还包括:根据所述数据写指令中的所述至少一个逻辑块的信息以及所述至少一个逻辑块被分配的物理块的信息,记录物理块与逻辑块之间的对应关系。
  41. 如权利要求40所述的存储管理方法,其特征在于,还包括:
    接收所述管理器发送的擦除指令,所述擦除指令为所述管理器确定待擦除的逻辑块后发送的,所述擦除指令携带所述待擦除的逻辑块的信息;
    根据所述擦除指令中的所述待擦除的逻辑块的信息和所述物理块与逻辑块的对应关系,确定待擦除的物理块,以及擦除所述待擦除的物理块。
  42. 如权利要求41所述的存储管理方法,其特征在于,还包括:
    接收管理器发送的数据迁移指令,所述数据迁移指令为所述管理器根据预设的迁移策略确定所述待擦除的逻辑块中待迁移的数据页 后发送的,所述数据迁移指令携带所述待迁移的数据页的信息;
    根据所述数据迁移指令将所述存储器中所述待迁移的数据页进行迁移。
  43. 一种存储管理器,其特征在于,包括:处理器、存储器、总线和通信接口;
    所述存储器用于存储计算机执行指令,所述处理器与所述存储器通过所述总线连接,当所述计算设备运行时,所述处理器执行所述存储器存储的所述计算机执行指令,以使所述存储管理器如下方法:
    接收数据写请求,确定待写入的数据页的数据类别;
    为数据类别不同的待写入数据页指定不同的逻辑块,其中,每个指定的逻辑块对应同一种数据类别的待写入数据页;
    向所述存储器发送数据写指令,其中,所述数据写指令携带至少一个逻辑块对应的待写入数据页,所述数据写指令用于指示所述存储器根据所述数据写指令将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中,其中,同一个逻辑块对应的待写入数据页写入至少一个物理块中,每个物理块中写入同一个逻辑块对应的待写入数据页。
  44. 一种存储管理器,其特征在于,包括:处理器、存储器、总线和通信接口;
    所述存储器用于存储计算机执行指令,所述处理器与所述存储器通过所述总线连接,当所述计算设备运行时,所述处理器执行所述存储器存储的所述计算机执行指令,以使所述存储管理器执行如下方法:
    接收数据写指令,所述数据写指令携带至少一个逻辑块对应的待写入数据页,所述数据写指令是由管理器在确定待写入的数据页的数据类别,并为数据类别不同的待写入数据页指定不同的逻辑块之后发送的,其中,所指定的每个逻辑块对应同一种数据类别的待写入数据页;
    根据所述数据写指令将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中,其中,同一个逻辑块对 应的待写入数据页写入至少一个物理块中,每个物理块中写入同一个逻辑块对应的待写入数据页。
  45. 一种计算机可读介质,其特征在于,包括计算机执行指令,当计算机的处理器执行所述计算机执行指令时,所述计算机执行如下方法:
    接收数据写请求,确定待写入的数据页的数据类别;
    为数据类别不同的待写入数据页指定不同的逻辑块,其中,每个指定的逻辑块对应同一种数据类别的待写入数据页;
    向所述存储器发送数据写指令,其中,所述数据写指令携带至少一个逻辑块对应的待写入数据页,所述数据写指令用于指示所述存储器根据所述数据写指令将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中,其中,同一个逻辑块对应的待写入数据页写入至少一个物理块中,每个物理块中写入同一个逻辑块对应的待写入数据页。
  46. 一种计算机可读介质,其特征在于,包括计算机执行指令,当计算机的处理器执行所述计算机执行指令时,所述计算机执行如下方法:
    接收数据写指令,所述数据写指令携带至少一个逻辑块对应的待写入数据页,所述数据写指令是由管理器在确定待写入的数据页的数据类别,并为数据类别不同的待写入数据页指定不同的逻辑块之后发送的,其中,所指定的每个逻辑块对应同一种数据类别的待写入数据页;
    根据所述数据写指令将所述至少一个逻辑块对应的待写入数据页写入所述至少一个逻辑块对应的物理块中,其中,同一个逻辑块对应的待写入数据页写入至少一个物理块中,每个物理块中写入同一个逻辑块对应的待写入数据页。
PCT/CN2016/081000 2015-06-29 2016-05-04 存储系统、存储管理装置、存储器、混合存储装置及存储管理方法 WO2017000658A1 (zh)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (6)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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