WO2018041258A1 - Method for processing de-allocation command, and storage device - Google Patents

Method for processing de-allocation command, and storage device Download PDF

Info

Publication number
WO2018041258A1
WO2018041258A1 PCT/CN2017/100317 CN2017100317W WO2018041258A1 WO 2018041258 A1 WO2018041258 A1 WO 2018041258A1 CN 2017100317 W CN2017100317 W CN 2017100317W WO 2018041258 A1 WO2018041258 A1 WO 2018041258A1
Authority
WO
WIPO (PCT)
Prior art keywords
command
allocation
physical
logical address
read
Prior art date
Application number
PCT/CN2017/100317
Other languages
French (fr)
Chinese (zh)
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
Priority claimed from CN201610803054.0A external-priority patent/CN107797938B/en
Priority claimed from CN201610804881.1A external-priority patent/CN107797934B/en
Application filed by 北京忆恒创源科技有限公司 filed Critical 北京忆恒创源科技有限公司
Publication of WO2018041258A1 publication Critical patent/WO2018041258A1/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

Definitions

  • the present application relates to storage technologies, and more particularly to a processing method for processing a de-allocation command and a storage device thereof.
  • the host and the storage device can be coupled in various ways, including but not limited to connecting to the host through, for example, SATA, IDE, USB, PCIE, NVMe (NVM Express), SAS, Ethernet, Fibre Channel, wireless communication network, and the like.
  • the host may be an information processing device capable of communicating with the storage device in the manner described above, such as a personal computer, tablet, server, portable computer, network switch, router, cellular telephone, personal digital assistant, and the like.
  • FIG. 1 is a block diagram of a storage device.
  • the solid state storage device 102 is coupled to the host for providing storage capabilities to the host.
  • the host and the solid-state storage device 102 can be coupled in various manners, including but not limited to, for example, SATA (Serial Advanced Technology Attachment), SCSI (Small Computer System Interface). , SAS (Serial Attached SCSI), IDE (Integrated Drive Electronics), USB (Universal Serial Bus), PCIE (Peripheral Component Interconnect Express, PCIe, High Speed Peripheral Component Interconnect) NVMe (NVM Express, high speed nonvolatile storage), Ethernet, Fibre Channel, wireless communication network, etc. are connected to the host and solid state storage device 102.
  • SATA Serial Advanced Technology Attachment
  • SCSI Serial Attached SCSI
  • IDE Integrated Drive Electronics
  • USB Universal Serial Bus
  • PCIE Peripheral Component Interconnect Express
  • PCIe High Speed Peripheral Component Interconnect
  • NVMe High Speed
  • the host may be an information processing device capable of communicating with the storage device in the manner described above, such as a personal computer, tablet, server, portable computer, network switch, router, cellular telephone, personal digital assistant, and the like.
  • the storage device 102 includes an interface 103, a control unit 104, one or more NVM (Non-Volatile Memory) chips 105, and a DRAM (Dynamic Random Access Memory) 110.
  • NVM Non-Volatile Memory
  • DRAM Dynamic Random Access Memory
  • the interface 103 can be adapted to exchange data with the host via, for example, SATA, IDE, USB, PCIE, NVMe, SAS, Ethernet, Fibre Channel, and the like.
  • Control component 104 is used to control data transfers between interface 103, NVM chip 105, and DRAM 110, as well as for storage management, host logical address to flash physical address mapping, erase equalization, bad block management, and the like.
  • Control component 104 can be implemented in a variety of ways, including software, hardware, firmware, or a combination thereof.
  • the control unit 104 may be in the form of an FPGA (Field-programmable gate array), an ASIC (Application Specific Integrated Circuit), or a combination thereof.
  • Control component 104 may also include a processor or controller that executes software in the processor or controller to manipulate the hardware of control component 104 to process IO commands.
  • Control component 104 is also coupled to DRAM 110 and can access data from DRAM 110.
  • the DRAM can store data for FTL tables and/or cached IO commands.
  • Control component 104 includes a flash interface controller (or referred to as a flash channel controller).
  • the flash interface controller is coupled to the NVM chip 105 and issues commands to the NVM chip 105 in a manner consistent with the interface protocol of the NVM chip 105 to operate the NVM chip 105 and receive command execution results output from the NVM chip 105.
  • the interface protocol of the NVM chip 105 includes well-known interface protocols or standards such as "Toggle” and "ONFI".
  • a memory target is one or more Logic Units of a shared chip enable (CE, Chip Enable) signal within a NAND flash package.
  • Each logical unit has a LUN (Logic Unit Number).
  • One or more dies (Die) may be included in the NAND flash package.
  • Die may be included in the NAND flash package.
  • the logic unit can include a plurality of planes. Multiple planes within a logical unit can be accessed in parallel, while multiple logical units within a NAND flash chip can execute command and report states independently of each other.
  • a page on a storage medium (referred to as a physical page) has a fixed size, such as 17,664 bytes. Of course, physical pages can also have other sizes.
  • a logical address constitutes a storage space of a solid-state storage device perceived by an upper layer software such as an operating system.
  • the physical address is the address of the physical storage unit used to access the solid state storage device.
  • the Trim command is defined in ATA8-ACS2. Commands with the same or similar meaning are called UNMAP (Unmap) in the SCSI (Small Computer System Interface) specification, and are in the NVMe specification. Called Deallocate.
  • de-allocation is used to indicate a data set management command having the same or similar function as "pruning" of ATA8-ACS2, “de-mapping” of SCSI, “de-allocation” of NVMe, and also indicating other or Commands with the same or similar functions that appear in future protocols, specifications, or technologies.
  • a logical address range is described. After performing the de-allocation command, there can be different effects. For example, (1) after executing the de-allocation command, and then reading the logical address range indicated by the de-allocation command, the obtained is determined (before performing other write operations on the logical address range); (2) execution After the command is allocated, and the logical address range indicated by the allocation command is read, the result is all 0 (before performing other write operations on the logical address range); (3) after executing the deal allocation command, When the logical address range indicated by the allocation command is read again, the result obtained can be any value (before performing other write operations on the logical address range). In the de-allocation command or other commands, you can set or select to assign the execution effect of the command.
  • the host can tell the SSD which logical address space no longer stores valid data, so that the SSD does not have to move the expired data when reclaiming storage space.
  • a large number of memory access operations are required in the process of performing the deallocation command, which seriously prolongs the processing time of the deallocation command and affects the performance of the solid state hard disk, thereby affecting the simultaneous IO commands. carried out.
  • a first aspect of the present application provides a de-allocation method, the method comprising: obtaining a logical address range indicated by a de-allocation command according to a de-allocation command; updating a de-allocation table, and de-allocating a table corresponding to a logical address range indicated by the de-allocation command The entry is set to a first specified value; wherein the de-allocation table is used to record information on whether the logical address in the FTL table is allocated; indicating that the execution of the allocation command is completed.
  • the de-allocation method further includes: updating the FTL table, The entry of the FTL table corresponding to the logical address range indicated by the allocation command is set to the first specified value.
  • the de-allocation method further includes: updating a valid data unit table, where the valid data unit table is used to record each physical of the storage device The state of the data of the data unit; the valid data unit count table is updated, wherein the valid data unit count table is used to record the number of physical data units in a physical block, a large block, or a physical block group that are in an active state.
  • the valid data unit table is a valid data unit bitmap, and each bit in the valid data unit bitmap is used to indicate storage. The state of the data for each physical data unit of the device.
  • the physical data unit is part of a physical page or physical page.
  • the de-allocation method further includes: updating the physical block according to the valid data unit count table, The first priority of the block or physical block group, the first priority being a priority for performing a garbage collection operation; performing a garbage collection operation according to the first priority.
  • a physical block, a large block, or a physical block group having fewer valid data units has a higher first priority.
  • the seventh possible implementation manner during the updating of the FTL table, other components are prevented from accessing the entry of the FTL table being updated. Or, to prevent other components from accessing the entries of the FTL table being updated.
  • updating the FTL table includes updating a plurality of entries of the FTL table each time.
  • updating the FTL table includes updating, by using a DMA operation, a memory that stores multiple entries of the FTL table. space.
  • the de-allocation method further includes: before the FTL table is updated, the logic of the command indication is to be allocated The entry of the FTL table corresponding to the address range is locked. After the FTL table is updated, the entry of the FTL table corresponding to the logical address range indicated by the command is unlocked.
  • the de-allocation method further includes: in response to receiving the read command, by de-allocating the table Determining whether a logical address read by the read command is allocated, wherein if the read logical address is not allocated, the second specified value is used as a response to the read command, if the read logical unit address is In the case of allocation, the FTL table is queried to obtain the physical address corresponding to the logical address to be read, and the data is read from the physical address as a response to the read command.
  • the de-allocation method further includes: by receiving a read command, by using a de-allocation table Determining whether the logical address read by the read command is allocated, wherein if the read logical address is not allocated, the status information is notified to the host that the read logical address is invalid, illegal, or in one or more Go to assign status.
  • the de-allocation method further includes: the driver of the host generates the read for the read based on the notified state information The read result or data of the application of the logical address.
  • the de-allocation method further includes: in response to receiving the write command, a write command The physical address is assigned, and the FTL table and the de-allocation table are updated according to the assigned physical address.
  • the de-allocation method further includes: in response to receiving the write command, after updating the FTL table, to the physical The address is written to the data, and the write command processing is completed to the host.
  • the de-allocation method is provided by using the de-allocation method provided by the first aspect of the present application
  • the logical address range indicated by the de-allocation command is first obtained according to the de-allocation command, and then the de-allocation table is updated, and the de-allocation corresponding to the logical address range indicated by the de-allocation command is allocated.
  • the table entry is set to a first specified value, wherein the de-allocation table is used to record whether the logical address in the FTL table is allocated, and then indicates that the allocation command execution is completed, so that the de-allocation command can be processed at a high speed, and
  • the process of assigning commands does not affect the execution of concurrent IO commands.
  • a second aspect of the present application provides a method of processing a read command, the method comprising: determining, by a de-allocation table, whether a logical address read by the read command is allocated, in response to receiving the read command, wherein If the logical address is not allocated, the second specified value is used as a response to the read command. If the read logical unit address is allocated, the FTL table is queried to obtain the physical address corresponding to the logical address to be read, from the physical The address reads the data as a response to the read command.
  • a third aspect of the present application provides a method of processing a read command, the method comprising: determining, by a de-allocation table, whether a logical address read by the read command is allocated, in response to receiving the read command, wherein The logical address fetched is not assigned, and the status information is notified to the host that the read logical address is invalid, illegal, or in one or more de-allocation states.
  • the method for processing a read command further includes: a driver of the host generates a read provided to an application that reads the logical address based on the notified state information Take results or data.
  • a fourth aspect of the present application provides a method of processing a write command, the method comprising: assigning a physical address to a write command, updating an FTL table, a valid data unit table, and valid data with the allocated physical address in response to receiving the write command Unit count table and de-allocation table.
  • the method for processing a write command further includes: in response to receiving the write command, after the FTL table is updated, writing data to the physical address, and The feedback write command processing is completed.
  • a fifth aspect of the present application provides a storage device, where the storage device includes an acquisition module, an update module, and an indication module, wherein the acquisition module is configured to obtain a logical address range indicated by the de-allocation command according to the de-allocation command; and the update module is used to update De-allocating the table, setting an entry of the de-allocation table corresponding to the logical address range indicated by the allocation command to a first specified value, wherein the de-allocation table is used to record information about whether the logical address in the FTL table is allocated; The instruction is executed to complete the execution of the command.
  • a sixth aspect of the present application provides a storage device including a control unit, an interface, a DRAM, and one or more NVMs, wherein the DRAM stores a de-allocation table and an FTL table for exchanging data with the control unit ,
  • the control unit acquires the logical address range indicated by the de-allocation command according to the de-allocation command, and updates the de-allocation table, and sets the entry of the de-allocation table corresponding to the logical address range indicated by the de-allocation command to the first specified value, where the de-allocation table A message for recording whether a logical address in the FTL table is allocated, and instructing to allocate the command execution completion.
  • a seventh aspect of the present application provides a computer program comprising computer program code for causing a control component to perform a first aspect or a first aspect of the first aspect when loaded onto a storage device and executed on a control component of the storage device A de-allocation method as described in one of the fifteenth possible implementations.
  • An eighth aspect of the present application provides a de-allocation method, the de-allocation method comprising: step S1, acquiring a logical address range indicated by a de-allocation command according to a de-allocation command; and step S2, updating an FTL table, and de-allocating the logic of the command indication
  • the entry of the FTL table corresponding to the address range is set to a preset value, where the entry of the FTL table is used to indicate the correspondence between the logical address and the physical address; and in step S3, the valid page table is updated in response to the update of the FTL table, and the valid
  • the page table is used to record the state of the data stored in the physical page of the storage device; in step S4, the valid page count table is updated in response to the update of the valid page table, wherein the valid page count table is used to record physical blocks, chunks or physics The number of physical pages in the block group that are in a valid state.
  • the de-allocation method further includes: in step S5, updating a priority of a physical block, a large block, or a physical block group in response to an update of the valid page count table,
  • the priority is a priority when performing a garbage collection operation on a physical block, a large block, or a physical block group; and in step S6, performing a garbage collection operation on the physical block, the large block, or the physical block group having the highest priority.
  • the step S2 includes: updating multiple entries of the FTL table each time.
  • the entries of the multiple FTL tables in the storage space are updated each time, and the storage space is continuously updated in one CPU. During the entry of multiple FTL tables, other CPUs are prevented from accessing the entries of the FTL table being updated, or other CPUs are not allowed to access the entries of the FTL table being updated.
  • step S2 the DMA operation is used to update and store the multiple FTL tables.
  • the memory space of the table entry is used to update and store the multiple FTL tables.
  • step S2 the preset value is 0.
  • the logical address is the address of the logical page, the physical address The address of the physical page.
  • the eighth possible implementation if the storage space corresponding to the logical page and the storage space of the physical page are the same, each bit in the valid page table Used to indicate the validity of a physical page.
  • each bit in the valid page table is used to indicate Physics corresponding to a logical address The validity of the storage area.
  • the effective page count table is an array, a linear table, or Linked list.
  • step S6 the physical block, the large block or the physical number of the valid page number is 0.
  • a block group is the highest priority physical block, large block, or physical block group.
  • the de-allocation method further includes: after step S2, The host feedback de-allocation command processing is completed; or, after step S4, the feedback processing to the host is completed.
  • the de-allocation method further includes: in step S1 and step S2 The entry of the FTL table corresponding to the logical address range indicated by the allocation command is locked; and between the step S2 and the step S3, the entry of the FTL table corresponding to the logical address range indicated by the allocation command is unlocked.
  • the de-allocation method further includes: at step S1 and step S2 Between the entries of the allocation table is cleared, wherein the table of the allocation table is used to store information about whether each logical address is allocated.
  • the de-allocation method further includes: after the de-allocation table is cleared, the command processing is sent to the host to be distributed. carry out.
  • the de-allocation method further includes: updating the de-allocation table by using a DMA operation.
  • Figure 1 is a block diagram of a storage device
  • FIG. 2 is a schematic diagram of an FTL table before processing a deallocation command in Embodiment 2 of the present application;
  • FIG. 3 is a schematic diagram of a valid page table before processing a deallocation command in Embodiment 2 of the present application;
  • FIG. 4 is a schematic diagram of a valid page count table before processing a deallocation command in Embodiment 2 of the present application;
  • FIG. 5 is a flowchart of a method for processing a deallocation command according to Embodiment 2 of the present application.
  • FIG. 6 is a schematic diagram of an FTL table after processing a deallocation command according to Embodiment 2 of the present application;
  • FIG. 7 is a schematic diagram of a valid page table after processing a deallocation command in Embodiment 2 of the present application.
  • FIG. 8 is a schematic diagram of a valid page count table after processing a deallocation command in Embodiment 2 of the present application;
  • Embodiment 9 is a flowchart of processing a read command in Embodiment 2 of the present application.
  • FIG. 10 is a schematic diagram of a de-allocation table before processing a deallocation command in Embodiment 3 of the present application;
  • FIG. 11 is a schematic diagram of a de-allocation table after processing a deallocation command in Embodiment 3 of the present application;
  • FIG. 12A is a flowchart of a method for processing a deallocation command in Embodiment 3 of the present application.
  • FIG. 12B is a flowchart of a method for responding to a read command in Embodiment 3 of the present application.
  • FIG. 12C is a flowchart of a method for responding to a write command in Embodiment 3 of the present application.
  • FIG. 13 is a schematic diagram of a large block in the fourth embodiment of the present application.
  • FIG. 14 is a schematic diagram of an FTL table before processing a deallocation command in Embodiment 4 of the present application;
  • FIG. 15 is a schematic diagram of a valid page table before processing a deallocation command in Embodiment 4 of the present application;
  • FIG. 16 is a schematic diagram of a valid page count table before processing a deallocation command in Embodiment 4 of the present application;
  • FIG. 17 is a flowchart of a method for processing a deallocation command in Embodiment 4 of the present application.
  • FIG. 18 is a schematic diagram of an FTL table after processing a deallocation command according to Embodiment 4 of the present application.
  • FIG. 19 is a schematic diagram of a valid page table after processing a deallocation command in Embodiment 4 of the present application.
  • FIG. 20 is a schematic diagram of a valid page count table after processing a deallocation command in Embodiment 4 of the present application;
  • FIG. 21 is a flowchart of a method for processing a deallocation command according to Embodiment 5 of the present application.
  • a table structure that stores mapping information from a logical address to a physical address is called an FTL table.
  • FTL tables are important metadata in solid state storage devices.
  • the FTL table records the address mapping relationship in the storage device in units of data pages.
  • the FTL table includes entries (or entries) of multiple FTL tables.
  • a correspondence between a logical page address and a physical page is recorded in an entry of each FTL table.
  • a correspondence between consecutive logical page addresses and consecutive multiple physical pages is recorded in an entry of each FTL table.
  • a correspondence between a logical block address and a physical block address is recorded in an entry of each FTL table.
  • the FTL table records the mapping relationship between logical block addresses and physical block addresses, and/or the mapping relationship between logical page addresses and physical page addresses.
  • a logical address range is described. After performing the de-allocation command, there can be different effects. For example, (1) after executing the de-allocation command, when reading the logical address range indicated by the de-allocation command, what is obtained is determined (before performing other write operations on the logical address range); (2) execution After the command is allocated, when the logical address range indicated by the allocation command is read, the result is all 0 (before performing other write operations on the logical address range); (3) after executing the deal allocation command, When reading the range of logical addresses indicated by the de-allocation command, the result obtained can be any value (before performing other write operations on the logical address range). In the de-allocation command or other commands, you can set or select to assign the execution effect of the command. By using the Disassign command, the host can tell the SSD which logical address space no longer stores valid data, so that the SSD does not have to move the expired data when reclaiming storage space.
  • the FTL entry indicated by the logical address range described by the de-allocation command in the FTL table is set to a special flag (for example, 0).
  • the logical address range indicated by the de-allocation command includes 0-7 and 100-103.
  • the contents of the entries in the FTL table in which logical addresses 0-7 and 100-103 are recorded are set to 0.
  • the physical address corresponding to the logical addresses in the FTL table is 0 (meaning a special mark), thereby conforming
  • the result of assigning the specified effect of the command (for example, all 0s) is used as a response to the read command.
  • the logical address range indicated by the de-allocation command may have a different unit size than the entry of the FTL table. For example, in the allocation command, one logical address corresponds to 512 bytes of storage space, and in the FTL table, one entry corresponds to 4 KB (kilobytes) of storage space.
  • the erasing or garbage collection operation is performed in units of physical blocks, chunks, or physical block groups, and the erasing or garbage collection operation is performed in units of physical blocks, and in units of large blocks.
  • the method of performing the erasing or garbage collection operation corresponding to the process of allocating the command is described in detail, and the method of performing the erasing or garbage collection operation corresponding to the physical block group to allocate the command can be obtained by referring to the contents of the two contents. No more details are given.
  • the erasing or garbage collection operation is performed in units of physical blocks in the storage device.
  • a correspondence between a logical page address and a physical page is recorded in an entry of each FTL table.
  • the FTL table, the valid page table, and the valid page count table are maintained.
  • 2 is a schematic diagram of an FTL table before processing a deallocation command in the embodiment, where the FTL table indicates a correspondence between a logical page address and a physical page address.
  • 3 is a schematic diagram of a valid page table before processing a deallocation command in the embodiment (only the valid page table of the physical block associated with the FTL table in FIG. 2 is shown in FIG. 3), and the valid page table records the corresponding physical block.
  • the state of the data stored in the corresponding logical page. 4 is a schematic diagram of a valid page count table before processing a deallocation command in the embodiment, in which the number of physical pages in a valid state in each physical block is recorded in the effective page count table.
  • the valid bits indicated by the horizontal lines in the valid page table shown in FIG. 3 indicate the physical pages corresponding to the logical addresses LBA0-LBA7 shown in FIG. 2, and other valid bits not marked with horizontal lines indicate The physical page corresponding to the other logical address, and the physical page corresponding to the invalid bit is not referenced by any logical address.
  • bitmaps are used as data structures to indicate the validity of individual physical pages of a physical block, it being understood that a variety of other data structures can be used as well.
  • a physical page whose physical address is "PBA 1-4" stores data having a logical address of "LBA 0", and thus a valid page of physical block 1 shown in FIG.
  • the state of the physical page whose physical address is "PBA 1-4" is valid (in FIG. 3, the position in the second row and the first column is indicated by "1").
  • the physical page of physical block 1 shown in FIG. 2 whose physical address is "PBA 1-0" is not referred to by any logical address, and thus the physical address of the physical page 1 shown in FIG. 3 is "
  • the state of the physical page of PBA 1-0" is invalid (in FIG. 3, the position of the first column and the first column is indicated by "0").
  • the valid page count table in FIG. 4 indicates that there are currently 5 physical pages in physical block 0, 9 physical pages in physical block 1 are currently valid, and 0 physical pages in physical block 2 are currently valid. There are currently 11 physical pages in physical block 3 that are valid.
  • each bit in the valid page table is used to indicate a valid physical storage area.
  • the storage space corresponding to the logical page is the same as the storage space of the physical page.
  • 1 bit is used to indicate the state of the corresponding physical page to reduce the occupation of the memory space.
  • a logical page in an FTL table corresponds to 4 KB of storage space
  • a physical page has a storage space of 4 KB (including additional out-of-band storage space).
  • each bit in the valid page table indicates a physical page. status.
  • the storage space corresponding to the logical page is different from the storage space of the physical page.
  • the storage space of the physical page can accommodate multiple logical pages
  • the logical page corresponds to 4 KB of storage space
  • the storage space of the physical page can accommodate Multiple logical pages (eg, four), in this case, in the valid page table, each bit indicates the validity of the physical storage area corresponding to the logical address.
  • the effective page table of physical block 1 includes 2048 bits.
  • the effective page count table records the number of 4 KB of memory space currently stored in the physical block that is referenced by the logical address in the FTL table. For example, if physical block 1 includes 512 16KB physical pages, and the physical address corresponding to 9 LBAs in the FTL table belongs to physical block 1, the effective page count of physical block 1 is 9.
  • FIG. 5 is a flowchart of a method for processing a deallocation command according to the embodiment.
  • the method for processing a deallocation command according to the embodiment includes: obtaining a deallocation command indication in response to receiving a deallocation command.
  • the logical address range(s) for example, LBA0-LBA3.
  • the entries of the locked FTL table are unlocked, allowing other tasks to access these entries of the FTL table.
  • FIG. 6 is a schematic diagram of an FTL table after processing a deallocation command in the embodiment.
  • Figure 2 shows the FTL table before processing the allocation command.
  • FIG. 7 is a schematic diagram of a valid page table after processing a deallocation command in the embodiment.
  • Figure 3 shows the valid page table before processing the assignment command. Accordingly, as shown in FIG.
  • FIG. 8 is a schematic diagram of a valid page count table after processing a deallocation command in the embodiment.
  • 4 is a schematic diagram of a valid page count table before the process of allocating a command in the embodiment.
  • the entry of the FTL table corresponding to LBA0-LBA3 is cleared, and the physical The effective page count of block 1 changes from 9 to 6, and the effective page count of physical block 3 changes from 11 to 10.
  • a valid page count can be used to indicate the priority of the garbage collection operation. For example, when performing a garbage collection operation, the physical block with a low effective page count is preferentially reclaimed.
  • the valid page count table can be a plurality of data structures such as an array, a linear table, and a linked list.
  • the feedback processing to the host is completed.
  • the FTL table is obtained.
  • the host can also be indicated to the host by other means that the read logical address is de-allocated, for example, the read data is not provided to the host, and the status information is used to inform the host that the read logical address is invalid, illegal or in a kind of Or multiple to assign status.
  • the driver of the host generates a read result or data provided to the application that reads the addresses based on the status information notified by the storage device.
  • the FTL table, the valid page table, and the valid page count table in this embodiment may be stored in the DRAM.
  • the command is allocated for efficient processing, and the allocation table is also maintained. Further, the de-allocation table is also written to the NVM, so that when the device is restarted after an abnormal power failure, the correct FTL table can be obtained by de-allocating the information recorded in the table.
  • FIG. 10 and FIG. 11 are schematic diagrams of a de-allocation table, where FIG. 10 is a schematic diagram of a de-allocation table before processing a de-allocation command in the embodiment of the present application; FIG. 11 is a de-allocation after processing a de-allocation command in the embodiment of the present application. Schematic diagram of the table. As shown in FIG. 10 and FIG. 11, in the deallocation table, information corresponding to whether or not each logical address in the FTL table is allocated is stored. By way of example, one bit of storage space is provided for each logical address of the FTL table in the de-allocation table.
  • the logical address when a logical address has been allocated (ie, the logical address has a valid physical address in the FTL table), in the de-allocation table, the logical address is marked as "assigned" (eg, corresponding) The 1-bit memory space is set to 0); when the logical address is not allocated or the de-allocation command has been applied, the logical address is marked as "de-allocated" in the de-allocation table (for example, the corresponding 1-bit memory space is set) Is 1).
  • LBA 0-LBA 7 in the FTL table are all assigned valid physical addresses, so in the de-allocation table shown in FIG. 10, LBA 0-LBA 7 is marked as "assigned" (corresponding 1 bit) The storage space is set to 0).
  • LBA 0 - LBA 3 In response to receiving the de-allocation command, during the execution of the de-allocation command for the logical address range of LBA 0 - LBA 3, as shown in FIG.
  • the LBA 0-LBA 3 in the de-allocation table is marked as "de-allocation” ( The corresponding 1-bit memory space is set to 1), and the LBA 4-LBA 7 in the de-allocation table is still marked as "assigned" (the corresponding 1-bit memory space is set to 0).
  • the physical address of the entry corresponding to the logical address LBA 0-LBA 3 is set to zero.
  • the valid page table and the valid page count table are modified accordingly. Referring to FIG. 3 and FIG. 7, the effective page table of physical block 0 and physical block 1 is also updated accordingly. Similarly, referring to FIG. 4 and FIG. 8, the effective page count table is also updated accordingly.
  • the de-allocation table in this embodiment is stored in the DRAM.
  • the de-allocation table in the DRAM is updated by a DMA operation.
  • FIG. 12A is a flowchart of a method for processing a deallocation command according to Embodiment 3 of the present application.
  • the logical address range indicated by the de-allocation command is acquired (see 1212 in FIG. 12A), for example, de-allocation is performed on the logical address range of LBA 0 - LBA 3. Updating the entries of the de-allocation table (see FIG. 10 and FIG. 11) according to the logical address range indicated by the de-allocation command (see FIG. 12A and FIG. 11), for example, the de-allocation table shown in FIG.
  • the FTL table entry is updated according to the logical address range indicated by the de-allocation command, for example, the FTL entry corresponding to the one or more logical addresses indicated by the de-allocation command is cleared, or set to a specified value ( See 1218 in Figure 12A.
  • the entry of the FTL table corresponding to the one or more logical addresses to be updated is also locked (refer to 1216 in FIG. 12A), so as to prevent other tasks from being read during the update of the FTL entry. Take these FTL entries. And after updating the FTL table, the entries of the FTL table corresponding to the updated one or more logical addresses are also unlocked (refer to 1220 in FIG. 12A).
  • the valid page table of the physical block corresponding to the physical address of the entry of the updated FTL table (see FIG. 7 and 1222 in FIG. 12A) and the valid page count table (see FIG. 8 and 1224 in FIG. 12A) are also updated. .
  • FIG. 12B is a flowchart of a method for responding to a read command in Embodiment 3 of the present application.
  • the host when the de-allocation table update is completed, the host is informed that the de-allocation command execution is completed. After the host reads the assigned logical address, it should receive a specified indication such as all 0s.
  • the de-allocation table in response to receiving the read command (see 1230 in Fig. 12B), the de-allocation table (see Fig. 11) is queried to determine whether the logical address read by the read command is de-allocated (see 1232 in Fig. 12B).
  • the de-allocation table indicates that the read logical address is in the de-allocation state, then all 0s or other specified indications are used as responses to the read command (see 1234 in Figure 12B). Only when the area allocation table indicates that the read logical address has been allocated, the FTL table is queried to obtain the physical address corresponding to the logical address to be read (see 1236 in FIG. 12B), and the data is read from the obtained physical address as Response to a read command (see 1238 in Figure 12B).
  • the tag storage device In response to receiving the de-allocation command (see 1210 in Figure 12A), the tag storage device is executing a de-allocation command. In this case, if a read command is received, the de-allocation table is first queried (see 1232 in Fig. 12B). When the execution of the de-allocation command is completed, for example, after the execution of step 1218 or step 1220 shown in FIG. 12A is completed, the tag storage device has completed execution of the de-allocation command. In this case, if a read command is received, step 1232 in Fig. 12B is not necessarily performed, and step 1236 in Fig. 12B is directly executed.
  • FIG. 12C is a flowchart of a method for responding to a write command in Embodiment 3 of the present application.
  • its de-allocation table indicates that all logical addresses are in a de-allocation state.
  • the table corresponding to the logical address of the de-allocation table and the data to be written is modified to the allocated state.
  • the de-allocated logical address in the de-allocation table is modified again to the de-allocation state.
  • step 12C a physical address is assigned to the write command, and the FTL table is updated with the logical address indicated by the write command and the assigned physical address (see 1242 in Fig. 12C).
  • the data is written to the assigned physical address and the write command processing is completed to the host (see 1244 in Fig. 12C).
  • step 1242 the write command processing is completed to the host before the data is written to the physical address.
  • the valid page table and valid page count table are also updated to be a response to the physical block being written to the data.
  • the de-allocation table is also updated, and the entry of the logical address to be written in the de-allocation table is set to be allocated (see 1248 in Fig. 12C).
  • the order of step 1244, step 1246, and step 1248 may be adjusted, or may be performed in parallel or simultaneously.
  • step 1244, step 1246, and step 1248 occur after step 1242.
  • FIG. 13 is a schematic diagram of a large block.
  • a large block is constructed on every 16 logical units (LUNs).
  • Each chunk consists of 16 physical blocks from each of the 16 logical units (LUNs).
  • chunk 0 includes physical block 0 from each of 16 logical units (LUNs)
  • chunk 1 includes physical block 1 from each logical unit (LUN).
  • each logical address corresponds to 4 KB of storage space
  • each physical page in the NVM includes 4 physical units, each of which holds data corresponding to 1 logical address (optionally, Also included is out-of-band data such as check data.
  • FIG. 14 is a schematic diagram of the FTL table before processing the deallocation command in the embodiment. Referring to FIG.
  • the PBA 0-4 recorded in the FTL table indicates the physical unit of the address 0 of the large block 0, and the PBA 1-6 indicates the large
  • the physical unit of block 1 has an address of 6
  • the PBA0-9 recorded in the FTL table indicates the physical unit whose address of the large block 0 is 9
  • the PBA0-15 indicates the physical unit whose address of the large block 0 is 15.
  • a page strip is constructed in chunks, and the physical pages of the same physical address within each logical unit (LUN) constitute a "page strip.”
  • LUN logical unit
  • physical page 0-0, physical page 0-1, ... and physical page 0-x constitute a page strip 0.
  • physical page 0-0, physical page 0-1... physical page 0-14 is used to store user data
  • physical pages 0-15 are used to store check data calculated from all user data in the strip.
  • the physical page used to store the verification data can be located anywhere in the page strip, which is by way of example and not limitation.
  • the physical page 2-0, the physical page 2-1, ... and the physical page 2-x constitute the page strip 2.
  • a valid page table is provided for each large block for recording the state of data (data unit) corresponding to the logical address stored in the corresponding large block.
  • 15 is a valid page table before processing the deallocation command in the embodiment. It should be noted that, in FIG. 15, the valid bits indicated by the horizontal lines in the valid page table indicate the logical addresses in the FTL table of FIG.
  • the physical unit corresponding to LBA0-LBA7, the other valid bits not marked with a horizontal line indicate the physical unit corresponding to other logical addresses, and the physical unit corresponding to the invalid bit is not referenced by any logical address.
  • the physical unit whose physical address is "PBA 0-4" stores the data whose logical address is "LBA 0", and thus in the valid page table of the large block 0, the address is The state of the physical unit of "PBA 0-4" is valid (in FIG. 15, indicated by "1" in the second row and first column of the valid page table (large block 0)).
  • the physical unit of the block 0 whose address is "PBA 0-0" shown in FIG. 15 is not referred to by any logical address, and thus the physical address of the address "PBA 0-0" in the valid page table of the large block 0
  • the state of the cell is invalid (in FIG.
  • 1 bit is used to indicate the state of the corresponding one physical unit to reduce the occupation of the memory space.
  • 16 is a valid page count table before processing the deallocation command in the embodiment, in which the number of physical units in the active state in each large block is recorded in the valid page count table.
  • the number of physical units in the active state in each large block is recorded in the valid page count table.
  • FIG. 16 there are currently 9 physical units in the large block 0, 11 physical units in the large block 1 are currently valid, and 0 physical units in the large block 2 are valid, and the large block 3 is in the middle. There are 11 physical units available.
  • FIG. 17 is a flowchart of a method for processing a deallocation command according to the embodiment.
  • the method for processing a deallocation command according to this embodiment includes: responding to receiving a deallocation command (refer to 1710 in FIG. 17). And obtaining the logical address range(s) to which the command command is assigned (for example, LBA0-LBA3) (refer to 1720 in FIG. 17).
  • the entry of the FTL table corresponding to the logical address(s) (for example, LBA0-LBA3) is cleared, or the entry of the FTL table is set to a specified value (refer to 1740 in FIG. 17).
  • a specified value (refer to 1740 in FIG. 17).
  • zero or other specified value is taken as the physical address, indicating that reading the physical address will acquire the value specified for executing the de-allocation command (for example, a value of all 0s or a value of all specified values).
  • the entries of the locked FTL table are unlocked (see 1750 in Figure 17), allowing other tasks to access these entries of the FTL table.
  • FIG. 18 is a schematic diagram of an FTL table after processing a deallocation command in the embodiment.
  • 14 is a schematic diagram of the FTL table before the process of assigning a command in the embodiment.
  • the physical addresses PBA 0-4, PBA 1-6, PBA 0-9, and PBA 0-10 no longer store valid data.
  • FIG. 19 is a process of assigning a life in the embodiment.
  • FIG. 15 is a schematic diagram of a valid page table before the process of allocating a command in the embodiment.
  • the physical unit of the chunk 0 is PBA 0-4, and the physical units of PBA 0-9 and PBA0-10 become invalid (for example, the corresponding bit is set to 0), and in the valid page table of the chunk 1, the physical unit of the chunk 1 whose address is PBA 1-6 becomes invalid.
  • FIG. 20 is a schematic diagram of the valid page count table after the process of allocating the command in the embodiment.
  • 16 is a schematic diagram of a valid page count table before the process of allocating a command in the embodiment.
  • the effective page count of chunk 0 changes from 9 to 6
  • the effective page count of chunk 1 changes from 11 to 10.
  • a valid page count can be used to indicate the priority of the garbage collection operation. For example, when performing a garbage collection operation, a large chunk with a low effective page count is preferentially reclaimed.
  • an erase operation can be performed immediately to reclaim the storage space.
  • the priority of the bulk of the valid page number being updated for garbage collection is also updated (refer to 1780 in FIG. 17), thereby performing the garbage collection operation according to Large chunks of garbage collection priority to select the chunks to be recycled.
  • the valid page count table can be a plurality of data structures such as an array, a linear table, and a linked list.
  • the feedback processing to the host is completed.
  • the FTL table is obtained in response to receiving the read command.
  • the host can also be indicated to the host by other means that the read logical address is de-allocated, for example, the read data is not provided to the host, and the status information is used to inform the host that the read logical address is invalid, illegal or in a kind of Or multiple to assign status.
  • the driver of the host generates a read result or data provided to the application that reads the addresses based on the status information notified by the storage device.
  • Embodiment 4 of the present application if the allocation command indicates a large number of logical address ranges (for example, LBA 10000-LBA 20000), the clearing of multiple FTL table entries is Time consuming.
  • There are several ways to speed up the update of FTL table entries For example, each time multiple FTL table entries are updated, and during the update of multiple FTL table entries by one CPU, other CPUs are prevented from accessing the updated FTL table entries, or other CPUs are not allowed to try to access the updated FTL table. Entry.
  • a DMA operation is used to update the memory space in which multiple FTL table entries are stored.
  • the entries of the FTL table in the storage space are updated each time, and the operations of accessing the FTL table entries are blocked during the update of the FTL table entries in the storage space to reduce random access to the memory. To speed up the update of FTL table entries.
  • the FTL table, the valid page table, and the valid page count table in this embodiment may be stored in the DRAM.
  • the command is allocated for efficient processing, and the allocation table is also maintained. Further, the de-allocation table is also written to the NVM, so that when the device is restarted after an abnormal power failure, the correct FTL table can be obtained by de-allocating the information recorded in the table.
  • the de-allocation table shown in Figs. 10 and 11 is used.
  • the storage corresponds to the FTL table. Whether each logical address is assigned information. By way of example, one bit of storage space is provided for each logical address of the FTL table in the de-allocation table.
  • FIG. 21 is a flowchart of a method for processing a deallocation command according to Embodiment 5 of the present application.
  • the logical address range(s) indicated by the de-allocation command is obtained (see 2112 in FIG. 21), for example, the logic to be used for LBA 0 - LBA 3.
  • the address range is executed to be assigned. Updating the entries of the de-allocation table (refer to FIG. 10 and FIG. 11) according to the logical address range indicated by the de-allocation command (refer to FIG. 21 and FIG. 11), for example, the de-allocation table shown in FIG.
  • the FTL table entry is updated according to the logical address range indicated by the de-allocation command, for example, the FTL entry corresponding to the one or more logical addresses indicated by the de-allocation command is cleared, or set to a specified value ( See 2118 in Figure 21).
  • the entry of the FTL table corresponding to the one or more logical addresses to be updated is also locked (refer to 2116 in FIG. 21), so as to prevent other tasks from being read during the update of the FTL entry. Take these FTL entries.
  • the entries of the FTL table corresponding to the updated one or more logical addresses are also unlocked (refer to 2120 in FIG. 21).
  • the valid page table of the large block corresponding to the physical address of the entry of the updated FTL table (see 2122 in FIG. 7 and FIG. 21) and the valid page count table are also updated (see FIG. 8 and FIG. 21, 2124). ).

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A method for processing a de-allocation command and a storage device. The method for processing a de-allocation command comprises: acquiring, according to the de-allocation command, a logical address range indicated by the de-allocation command; updating an FTL table and setting an entry of the FTL table corresponding to the logical address range indicated by the de-allocation command as a first designated value; and indicating that the execution of the de-allocation command is completed.

Description

去分配命令处理的方法与存储设备Method and storage device for assigning command processing 技术领域Technical field
本申请涉及存储技术,尤其涉及处理去分配命令的处理方法及其存储设备。The present application relates to storage technologies, and more particularly to a processing method for processing a de-allocation command and a storage device thereof.
背景技术Background technique
主机同存储设备之间可通过多种方式相耦合,耦合方式包括但不限于通过例如SATA、IDE、USB、PCIE、NVMe(NVM Express)、SAS、以太网、光纤通道、无线通信网络等连接主机与存储设备。主机可以是能够通过上述方式同存储设备相通信的信息处理设备,例如,个人计算机、平板电脑、服务器、便携式计算机、网络交换机、路由器、蜂窝电话、个人数字助理等。The host and the storage device can be coupled in various ways, including but not limited to connecting to the host through, for example, SATA, IDE, USB, PCIE, NVMe (NVM Express), SAS, Ethernet, Fibre Channel, wireless communication network, and the like. With storage devices. The host may be an information processing device capable of communicating with the storage device in the manner described above, such as a personal computer, tablet, server, portable computer, network switch, router, cellular telephone, personal digital assistant, and the like.
图1为存储设备的框图。固态存储设备102同主机相耦合,用于为主机提供存储能力。主机同固态存储设备102之间可通过多种方式相耦合,耦合方式包括但不限于通过例如SATA(Serial Advanced Technology Attachment,串行高级技术附件)、SCSI(Small Computer System Interface,小型计算机系统接口)、SAS(Serial Attached SCSI,串行连接SCSI)、IDE(Integrated Drive Electronics,集成驱动器电子)、USB(Universal Serial Bus,通用串行总线)、PCIE (Peripheral Component Interconnect Express,PCIe,高速外围组件互联)、NVMe(NVM Express,高速非易失存储)、以太网、光纤通道、无线通信网络等连接主机与固态存储设备102。主机可以是能够通过上述方式同存储设备相通信的信息处理设备,例如,个人计算机、平板电脑、服务器、便携式计算机、网络交换机、路由器、蜂窝电话、个人数字助理等。存储设备102包括接口103、控制部件104、一个或多个NVM(非易失存储器,Non-Volatile Memory)芯片105以及DRAM(Dynamic Random Access Memory,动态随机访问存储器)110。NAND闪存、相变存储器、FeRAM、MRAM等是常见的NVM。接口103可适配于通过例如SATA、IDE、USB、PCIE、NVMe、SAS、以太网、光纤通道等方式与主机交换数据。控制部件104用于控制在接口103、NVM芯片105以及DRAM 110之间的数据传输,还用于存储管理、主机逻辑地址到闪存物理地址映射、擦除均衡、坏块管理等。可通过软件、硬件、固件或其组合的多种方式实现控制部件104。控制部件104可以是FPGA(Field-programmable gate array,现场可编程门阵列)、ASIC(Application Specific Integrated Circuit,应用专用集成电路)或者其组合的形式。控制部件104也可以包括处理器或者控制器,在处理器或控制器中执行软件来操纵控制部件104的硬件来处理IO命令。控制部件104还耦合到DRAM 110,并可访问DRAM 110的数据。在DRAM可存储FTL表和/或缓存的IO命令的数据。Figure 1 is a block diagram of a storage device. The solid state storage device 102 is coupled to the host for providing storage capabilities to the host. The host and the solid-state storage device 102 can be coupled in various manners, including but not limited to, for example, SATA (Serial Advanced Technology Attachment), SCSI (Small Computer System Interface). , SAS (Serial Attached SCSI), IDE (Integrated Drive Electronics), USB (Universal Serial Bus), PCIE (Peripheral Component Interconnect Express, PCIe, High Speed Peripheral Component Interconnect) NVMe (NVM Express, high speed nonvolatile storage), Ethernet, Fibre Channel, wireless communication network, etc. are connected to the host and solid state storage device 102. The host may be an information processing device capable of communicating with the storage device in the manner described above, such as a personal computer, tablet, server, portable computer, network switch, router, cellular telephone, personal digital assistant, and the like. The storage device 102 includes an interface 103, a control unit 104, one or more NVM (Non-Volatile Memory) chips 105, and a DRAM (Dynamic Random Access Memory) 110. NAND flash, phase change memory, FeRAM, MRAM, etc. are common NVMs. The interface 103 can be adapted to exchange data with the host via, for example, SATA, IDE, USB, PCIE, NVMe, SAS, Ethernet, Fibre Channel, and the like. Control component 104 is used to control data transfers between interface 103, NVM chip 105, and DRAM 110, as well as for storage management, host logical address to flash physical address mapping, erase equalization, bad block management, and the like. Control component 104 can be implemented in a variety of ways, including software, hardware, firmware, or a combination thereof. The control unit 104 may be in the form of an FPGA (Field-programmable gate array), an ASIC (Application Specific Integrated Circuit), or a combination thereof. Control component 104 may also include a processor or controller that executes software in the processor or controller to manipulate the hardware of control component 104 to process IO commands. Control component 104 is also coupled to DRAM 110 and can access data from DRAM 110. The DRAM can store data for FTL tables and/or cached IO commands.
控制部件104包括闪存接口控制器(或称为闪存通道控制器)。闪存接口控制器耦合到NVM芯片105,并以遵循NVM芯片105的接口协议的方式向NVM芯片105发出命令,以操作NVM芯片105,并接收从NVM芯片105输出的命令执行结果。NVM芯片105的接口协议包括“Toggle”、“ONFI”等公知的接口协议或标准。 Control component 104 includes a flash interface controller (or referred to as a flash channel controller). The flash interface controller is coupled to the NVM chip 105 and issues commands to the NVM chip 105 in a manner consistent with the interface protocol of the NVM chip 105 to operate the NVM chip 105 and receive command execution results output from the NVM chip 105. The interface protocol of the NVM chip 105 includes well-known interface protocols or standards such as "Toggle" and "ONFI".
存储器目标(Target)是NAND闪存封装内的共享芯片使能(CE,Chip Enable)信号的一个或多个逻辑单元(Logic Unit)。每个逻辑单元具有逻辑单元号(LUN,Logic Unit Number)。NAND闪存封装内可包括一个或多个管芯(Die)。典型地,每个逻辑单元对应于单一的管芯。逻辑单元可包括多个平面(Plane)。逻辑单元内的多个平面可以并行存取,而NAND闪存芯片内的多个逻辑单元可以彼此独立地执行命令和报告状态。在可从http://www.micron.com/~/media/Documents/Products/Other%20Documents/ONFI3_0Gold.ashx获得的“Open NAND Flash Interface Specification(Revision 3.0)”中,提供了目标(target)、逻辑单元、LUN、平面(Plane)的含义参见,其为现有技术的一部分。A memory target is one or more Logic Units of a shared chip enable (CE, Chip Enable) signal within a NAND flash package. Each logical unit has a LUN (Logic Unit Number). One or more dies (Die) may be included in the NAND flash package. Typically, each logical unit corresponds to a single die. The logic unit can include a plurality of planes. Multiple planes within a logical unit can be accessed in parallel, while multiple logical units within a NAND flash chip can execute command and report states independently of each other. In the "Open NAND Flash Interface Specification (Revision 3.0)" available from http://www.micron.com/~/media/Documents/Products/Other%20Documents/ONFI3_0Gold.ashx, the target is provided, The meaning of logical units, LUNs, and planes is described as part of the prior art.
存储介质上通常按页来存储和读取数据,而按块来擦除数据。块包含多个页。存储介质上的页(称为物理页)具有固定的尺寸,例如17664字节。当然,物理页也可以具有其他的尺寸。On a storage medium, data is usually stored and read by page, and blocks are erased. A block contains multiple pages. A page on a storage medium (referred to as a physical page) has a fixed size, such as 17,664 bytes. Of course, physical pages can also have other sizes.
在固态存储设备中,逻辑地址构成了操作系统等上层软件所感知到的固态存储设备的存储空间。物理地址是用于访问固态存储设备的物理存储单元的地址。In a solid-state storage device, a logical address constitutes a storage space of a solid-state storage device perceived by an upper layer software such as an operating system. The physical address is the address of the physical storage unit used to access the solid state storage device.
在ATA8-ACS2中定义了Trim(修剪)命令,具有相同或类似含义的命令在SCSI(Small Computer System Interface,小型计算机系统接口)规范中被称为UNMAP(解除映射),而在NVMe规范中被称为Deallocate(去分配)。下文中,用“去分配”来指示具有同ATA8-ACS2的“修剪”、SCSI的“解除映射”、NVMe的“去分配”具有相同或相似功能的数据集管理命令,以及也指示在其他或将来的协议、规范或技术中出现的具有相同或相似功能的命令。The Trim command is defined in ATA8-ACS2. Commands with the same or similar meaning are called UNMAP (Unmap) in the SCSI (Small Computer System Interface) specification, and are in the NVMe specification. Called Deallocate. Hereinafter, "de-allocation" is used to indicate a data set management command having the same or similar function as "pruning" of ATA8-ACS2, "de-mapping" of SCSI, "de-allocation" of NVMe, and also indicating other or Commands with the same or similar functions that appear in future protocols, specifications, or technologies.
在去分配命令中,描述了逻辑地址范围。在执行了去分配命令后,可以有不同的效果。例如,(1)执行去分配命令后,再读取去分配命令所指示的逻辑地址范围时,所得到的是确定的(执行对该逻辑地址范围的其他写入操作之前);(2)执行去分配命令后,再读取去分配命令所指示的逻辑地址范围时,所得到的结果是全0(执行对该逻辑地址范围的其他写入操作之前);(3)执行去分配命令后,再读取去分配命令所指示的逻辑地址范围时,所得到的结果可以是任意值(执行对该逻辑地址范围的其他写入操作之前)。在去分配命令或者其他命令中可设置或选择去分配命令的执行效果。In the de-allocation command, a logical address range is described. After performing the de-allocation command, there can be different effects. For example, (1) after executing the de-allocation command, and then reading the logical address range indicated by the de-allocation command, the obtained is determined (before performing other write operations on the logical address range); (2) execution After the command is allocated, and the logical address range indicated by the allocation command is read, the result is all 0 (before performing other write operations on the logical address range); (3) after executing the deal allocation command, When the logical address range indicated by the allocation command is read again, the result obtained can be any value (before performing other write operations on the logical address range). In the de-allocation command or other commands, you can set or select to assign the execution effect of the command.
通过使用去分配命令,主机能够告知固态硬盘哪些逻辑地址空间不再存储有效数据,从而固态硬盘在回收存储空间时,不必搬移已经失效的数据。然而,现有技术中,在执行去分配命令过程中,需要大量的内存访问操作,这严重延长了对去分配命令进行处理的时间,并影响固态硬盘的性能,进而影响同时发生的IO命令的执行。By using the Disassign command, the host can tell the SSD which logical address space no longer stores valid data, so that the SSD does not have to move the expired data when reclaiming storage space. However, in the prior art, a large number of memory access operations are required in the process of performing the deallocation command, which seriously prolongs the processing time of the deallocation command and affects the performance of the solid state hard disk, thereby affecting the simultaneous IO commands. carried out.
发明内容Summary of the invention
本申请的第一方面提供一种去分配方法,该方法包括:根据去分配命令获取去分配命令指示的逻辑地址范围;更新去分配表,将去分配命令指示的逻辑地址范围对应的去分配表的表项设置为第一指定值;其中去分配表用于记录FTL表中的逻辑地址是否被分配的信息;指示去分配命令执行完成。A first aspect of the present application provides a de-allocation method, the method comprising: obtaining a logical address range indicated by a de-allocation command according to a de-allocation command; updating a de-allocation table, and de-allocating a table corresponding to a logical address range indicated by the de-allocation command The entry is set to a first specified value; wherein the de-allocation table is used to record information on whether the logical address in the FTL table is allocated; indicating that the execution of the allocation command is completed.
结合本申请的第一方面,在第一种可能的实现方式中,去分配方法还包括:更新FTL表, 将去分配命令指示的逻辑地址范围对应的FTL表的表项设为第一指定值。In conjunction with the first aspect of the present application, in a first possible implementation, the de-allocation method further includes: updating the FTL table, The entry of the FTL table corresponding to the logical address range indicated by the allocation command is set to the first specified value.
结合本申请的第一方面的第一种可能的实现方式,在第二种可能的实现方式中,去分配方法还包括:更新有效数据单元表,有效数据单元表用于记录存储设备的各物理数据单元的数据的状态;更新有效数据单元计数表,其中,有效数据单元计数表用于记录物理块、大块或物理块组中处于有效状态的物理数据单元的数量。With reference to the first possible implementation manner of the first aspect of the present application, in a second possible implementation manner, the de-allocation method further includes: updating a valid data unit table, where the valid data unit table is used to record each physical of the storage device The state of the data of the data unit; the valid data unit count table is updated, wherein the valid data unit count table is used to record the number of physical data units in a physical block, a large block, or a physical block group that are in an active state.
结合本申请的第一方面的第二种可能的实现方式,在第三种可能的实现方式中,有效数据单元表为有效数据单元位图,有效数据单元位图中每个比特用于指示存储设备的各物理数据单元的数据的状态。In conjunction with the second possible implementation of the first aspect of the present application, in a third possible implementation, the valid data unit table is a valid data unit bitmap, and each bit in the valid data unit bitmap is used to indicate storage. The state of the data for each physical data unit of the device.
结合本申请的第一方面的第二种或者第三种可能的实现方式,在第四种可能的实现方式中,物理数据单元是物理页或物理页的部分。In conjunction with the second or third possible implementation of the first aspect of the present application, in a fourth possible implementation, the physical data unit is part of a physical page or physical page.
结合本申请的第一方面的第二种至第四种可能的实现方式之一,在第五种可能的实现方式中,去分配方法还包括:依据有效数据单元计数表,更新物理块、大块或物理块组的第一优先级,该第一优先级为用于执行垃圾回收操作的优先级;依据第一优先级执行垃圾回收操作。With reference to one of the second to fourth possible implementation manners of the first aspect of the present application, in a fifth possible implementation, the de-allocation method further includes: updating the physical block according to the valid data unit count table, The first priority of the block or physical block group, the first priority being a priority for performing a garbage collection operation; performing a garbage collection operation according to the first priority.
结合本申请的第一方面的第五种可能的实现方式,在第六种可能的实现方式中,含有更少有效数据单元的物理块、大块或物理块组具有更高的第一优先级。In conjunction with the fifth possible implementation of the first aspect of the present application, in a sixth possible implementation, a physical block, a large block, or a physical block group having fewer valid data units has a higher first priority. .
结合本申请的第一方面的第一种至第六种可能的实现方式之一,在第七种可能的实现方式中,更新FTL表期间,阻止其他组件访问正在被更新的FTL表的表项,或者,使其他组件不访问正在被更新的FTL表的表项。With reference to one of the first to sixth possible implementation manners of the first aspect of the present application, in the seventh possible implementation manner, during the updating of the FTL table, other components are prevented from accessing the entry of the FTL table being updated. Or, to prevent other components from accessing the entries of the FTL table being updated.
结合本申请的第一方面的第一种至第七种可能的实现方式之一,在第八种可能的实现方式中,更新FTL表包括每次更新FTL表的多个表项。In conjunction with one of the first to seventh possible implementations of the first aspect of the present application, in an eighth possible implementation, updating the FTL table includes updating a plurality of entries of the FTL table each time.
结合本申请的第一方面的第一种至第八种可能的实现方式之一,在第九种可能的实现方式中,更新FTL表包括使用DMA操作更新存储FTL表的多个表项的内存空间。With reference to one of the first to eighth possible implementation manners of the first aspect of the present application, in a ninth possible implementation manner, updating the FTL table includes updating, by using a DMA operation, a memory that stores multiple entries of the FTL table. space.
结合本申请的第一方面的第一种至第九种可能的实现方式之一,在第十种可能的实现方式中,去分配方法还包括:更新FTL表之前,将去分配命令指示的逻辑地址范围对应的FTL表的表项加锁;更新FTL表之后,将去分配命令指示的逻辑地址范围对应的FTL表的表项解锁。With reference to one of the first to ninth possible implementation manners of the first aspect of the present application, in a tenth possible implementation manner, the de-allocation method further includes: before the FTL table is updated, the logic of the command indication is to be allocated The entry of the FTL table corresponding to the address range is locked. After the FTL table is updated, the entry of the FTL table corresponding to the logical address range indicated by the command is unlocked.
结合本申请的第一方面的第一种至第十种可能的实现方式之一,在第十一种可能的实现方式中,去分配方法还包括:响应于收到读命令,通过去分配表判断所述读命令所读取的逻辑地址是否被分配,其中,若所读取的逻辑地址未被分配,则以第二指定值作为对读命令的响应,若所读取的逻辑单元地址被分配,则查询FTL表获得要读取的逻辑地址对应的物理地址,从物理地址读取数据作为对读命令的响应。With reference to one of the first to the tenth possible implementation manners of the first aspect of the present application, in an eleventh possible implementation manner, the de-allocation method further includes: in response to receiving the read command, by de-allocating the table Determining whether a logical address read by the read command is allocated, wherein if the read logical address is not allocated, the second specified value is used as a response to the read command, if the read logical unit address is In the case of allocation, the FTL table is queried to obtain the physical address corresponding to the logical address to be read, and the data is read from the physical address as a response to the read command.
结合本申请的第一方面的第一种至第十种可能的实现方式之一,在第十二种可能的实现方式中,去分配方法还包括:响应于收到读命令,通过去分配表判断所述读命令所读取的逻辑地址是否被分配,其中,若所读取的逻辑地址未被分配,以状态信息向主机告知所读取的逻辑地址无效、非法或处于一种或多种去分配状态。 With reference to one of the first to tenth possible implementation manners of the first aspect of the present application, in a twelfth possible implementation, the de-allocation method further includes: by receiving a read command, by using a de-allocation table Determining whether the logical address read by the read command is allocated, wherein if the read logical address is not allocated, the status information is notified to the host that the read logical address is invalid, illegal, or in one or more Go to assign status.
结合本申请的第一方面的第十二种可能的实现方式,在第十三种可能的实现方式中,去分配方法还包括:主机的驱动程序基于被告知的状态信息,生成提供给读取所述逻辑地址的应用的读取结果或者数据。With reference to the twelfth possible implementation manner of the first aspect of the present application, in the thirteenth possible implementation manner, the de-allocation method further includes: the driver of the host generates the read for the read based on the notified state information The read result or data of the application of the logical address.
结合本申请的第一方面的第二种至第十三种可能的实现方式之一,在第十四种可能的实现方式中,去分配方法还包括:响应于收到写命令,为写命令分配物理地址,根据所分配的物理地址更新FTL表以及去分配表。With reference to one of the second to thirteenth possible implementation manners of the first aspect of the present application, in the fourteenth possible implementation manner, the de-allocation method further includes: in response to receiving the write command, a write command The physical address is assigned, and the FTL table and the de-allocation table are updated according to the assigned physical address.
结合本申请的第一方面的第十四种可能的实现方式,在第十五种可能的实现方式中,去分配方法还包括:响应于收到写命令,在更新FTL表完成后,向物理地址写入数据,并向主机反馈写命令处理完成。With reference to the fourteenth possible implementation manner of the first aspect of the present application, in a fifteenth possible implementation manner, the de-allocation method further includes: in response to receiving the write command, after updating the FTL table, to the physical The address is written to the data, and the write command processing is completed to the host.
在使用本申请的第一方面提供的去分配方法处理时,先根据去分配命令获取去分配命令指示的逻辑地址范围,再更新去分配表,将去分配命令指示的逻辑地址范围对应的去分配表的表项设置为第一指定值,其中去分配表用于记录FTL表中的逻辑地址是否被分配的信息,然后指示去分配命令执行完成,从而可以高速对去分配命令进行处理,并且对去分配命令的处理不影响同时发生的IO命令的执行。When the de-allocation method is provided by using the de-allocation method provided by the first aspect of the present application, the logical address range indicated by the de-allocation command is first obtained according to the de-allocation command, and then the de-allocation table is updated, and the de-allocation corresponding to the logical address range indicated by the de-allocation command is allocated. The table entry is set to a first specified value, wherein the de-allocation table is used to record whether the logical address in the FTL table is allocated, and then indicates that the allocation command execution is completed, so that the de-allocation command can be processed at a high speed, and The process of assigning commands does not affect the execution of concurrent IO commands.
本申请的第二方面提供一种处理读命令的方法,该方法包括:响应于收到读命令,通过去分配表判断所述读命令所读取的逻辑地址是否被分配,其中,若所读取的逻辑地址未被分配,则以第二指定值作为对读命令的响应,若所读取的逻辑单元地址被分配,则查询FTL表获得要读取的逻辑地址对应的物理地址,从物理地址读取数据作为对读命令的响应。A second aspect of the present application provides a method of processing a read command, the method comprising: determining, by a de-allocation table, whether a logical address read by the read command is allocated, in response to receiving the read command, wherein If the logical address is not allocated, the second specified value is used as a response to the read command. If the read logical unit address is allocated, the FTL table is queried to obtain the physical address corresponding to the logical address to be read, from the physical The address reads the data as a response to the read command.
本申请的第三方面提供一种处理读命令的方法,该方法包括:响应于收到读命令,通过去分配表判断所述读命令所读取的逻辑地址是否被分配,其中,若所读取的逻辑地址未被分配,以状态信息向主机告知所读取的逻辑地址无效、非法或处于一种或多种去分配状态。A third aspect of the present application provides a method of processing a read command, the method comprising: determining, by a de-allocation table, whether a logical address read by the read command is allocated, in response to receiving the read command, wherein The logical address fetched is not assigned, and the status information is notified to the host that the read logical address is invalid, illegal, or in one or more de-allocation states.
结合本申请的第三方面,在第一种可能的实现方式中,处理读命令的方法还包括:主机的驱动程序基于被告知的状态信息,生成提供给读取所述逻辑地址的应用的读取结果或者数据。In conjunction with the third aspect of the present application, in a first possible implementation, the method for processing a read command further includes: a driver of the host generates a read provided to an application that reads the logical address based on the notified state information Take results or data.
本申请的第四方面提供一种处理写命令的方法,该方法包括:响应于收到写命令,为写命令分配物理地址,用所分配的物理地址更新FTL表、有效数据单元表、有效数据单元计数表以及去分配表。A fourth aspect of the present application provides a method of processing a write command, the method comprising: assigning a physical address to a write command, updating an FTL table, a valid data unit table, and valid data with the allocated physical address in response to receiving the write command Unit count table and de-allocation table.
结合本申请的第四方面,在第一种可能的实现方式中,处理写命令的方法还包括:响应于收到写命令,在更新FTL表完成后,向物理地址写入数据,并向主机反馈写命令处理完成。In conjunction with the fourth aspect of the present application, in a first possible implementation, the method for processing a write command further includes: in response to receiving the write command, after the FTL table is updated, writing data to the physical address, and The feedback write command processing is completed.
本申请的第五方面提供一种存储设备,该存储设备包括获取模块、更新模块和指示模块,其中,获取模块用于根据去分配命令获取去分配命令指示的逻辑地址范围;更新模块用于更新去分配表,将去分配命令指示的逻辑地址范围对应的去分配表的表项设置为第一指定值,其中去分配表用于记录FTL表中的逻辑地址是否被分配的信息;指示模块用于指示去分配命令执行完成。A fifth aspect of the present application provides a storage device, where the storage device includes an acquisition module, an update module, and an indication module, wherein the acquisition module is configured to obtain a logical address range indicated by the de-allocation command according to the de-allocation command; and the update module is used to update De-allocating the table, setting an entry of the de-allocation table corresponding to the logical address range indicated by the allocation command to a first specified value, wherein the de-allocation table is used to record information about whether the logical address in the FTL table is allocated; The instruction is executed to complete the execution of the command.
本申请的第六方面提供一种存储设备,该存储设备包括控制部件、接口、DRAM和一个或多个NVM,其中,DRAM中存储有去分配表和FTL表,接口用于与控制部件交换数据, 控制部件根据去分配命令获取去分配命令指示的逻辑地址范围,并更新去分配表,将去分配命令指示的逻辑地址范围对应的去分配表的表项设置为第一指定值,其中去分配表用于记录FTL表中的逻辑地址是否被分配的信息,并指示去分配命令执行完成。A sixth aspect of the present application provides a storage device including a control unit, an interface, a DRAM, and one or more NVMs, wherein the DRAM stores a de-allocation table and an FTL table for exchanging data with the control unit , The control unit acquires the logical address range indicated by the de-allocation command according to the de-allocation command, and updates the de-allocation table, and sets the entry of the de-allocation table corresponding to the logical address range indicated by the de-allocation command to the first specified value, where the de-allocation table A message for recording whether a logical address in the FTL table is allocated, and instructing to allocate the command execution completion.
本申请的第七方面提供一种计算机程序,当被载入存储设备并在存储设备的控制部件上执行时,计算机程序包括的计算机程序代码使控制部件执行第一方面或者第一方面的第一种至第十五种可能的实现方式之一所述的去分配方法。A seventh aspect of the present application provides a computer program comprising computer program code for causing a control component to perform a first aspect or a first aspect of the first aspect when loaded onto a storage device and executed on a control component of the storage device A de-allocation method as described in one of the fifteenth possible implementations.
本申请的第八方面提供一种去分配方法,该去分配方法包括:步骤S1、根据去分配命令获取去分配命令指示的逻辑地址范围;步骤S2、更新FTL表,将去分配命令指示的逻辑地址范围对应的FTL表的表项设为预设值,其中,FTL表的表项用于指示逻辑地址与物理地址的对应关系;步骤S3、响应于FTL表的更新,更新有效页表,有效页表用于记录存储设备的物理页所存储的数据的状态;步骤S4、响应于有效页表的更新,更新有效页计数表,其中,有效页计数表用于记录物理块、大块或物理块组中处于有效状态的物理页的数量。An eighth aspect of the present application provides a de-allocation method, the de-allocation method comprising: step S1, acquiring a logical address range indicated by a de-allocation command according to a de-allocation command; and step S2, updating an FTL table, and de-allocating the logic of the command indication The entry of the FTL table corresponding to the address range is set to a preset value, where the entry of the FTL table is used to indicate the correspondence between the logical address and the physical address; and in step S3, the valid page table is updated in response to the update of the FTL table, and the valid The page table is used to record the state of the data stored in the physical page of the storage device; in step S4, the valid page count table is updated in response to the update of the valid page table, wherein the valid page count table is used to record physical blocks, chunks or physics The number of physical pages in the block group that are in a valid state.
结合本申请的第八方面,在第一种可能的实现方式中,去分配方法还包括:步骤S5、响应于有效页计数表的更新,更新物理块、大块或物理块组的优先级,该优先级为对物理块、大块或物理块组在执行垃圾回收操作时的优先级;步骤S6、对优先级最高的物理块、大块或物理块组执行垃圾回收操作。With reference to the eighth aspect of the present application, in a first possible implementation, the de-allocation method further includes: in step S5, updating a priority of a physical block, a large block, or a physical block group in response to an update of the valid page count table, The priority is a priority when performing a garbage collection operation on a physical block, a large block, or a physical block group; and in step S6, performing a garbage collection operation on the physical block, the large block, or the physical block group having the highest priority.
结合本申请的第八方面或者第八方面的第一种可能的实现方式,在第二种可能的实现方式中,步骤S2包括:每次更新FTL表的多个表项。With reference to the eighth aspect of the present application or the first possible implementation manner of the eighth aspect, in a second possible implementation manner, the step S2 includes: updating multiple entries of the FTL table each time.
结合本申请的第八方面的第二种可能的实现方式,在第三种可能的实现方式中,在一个CPU更新FTL表的多个表项期间,阻止其他CPU访问正在被更新的FTL表的表项,或者,使其他CPU不要访问正在被更新的FTL表的表项。With reference to the second possible implementation manner of the eighth aspect of the present application, in a third possible implementation manner, during a CPU updating multiple entries of the FTL table, preventing other CPUs from accessing the FTL table being updated The entry, or, causes other CPUs to not access the entry of the FTL table being updated.
结合本申请的第八方面的第三种可能的实现方式,在第四种可能的实现方式中,每次更新存储空间连续的多个FTL表的表项,并且在一个CPU更新存储空间连续的多个FTL表的表项期间,阻止其他CPU访问正在被更新的FTL表的表项,或者,使其他CPU不要访问正在被更新的FTL表的表项。With reference to the third possible implementation manner of the eighth aspect of the present application, in a fourth possible implementation, the entries of the multiple FTL tables in the storage space are updated each time, and the storage space is continuously updated in one CPU. During the entry of multiple FTL tables, other CPUs are prevented from accessing the entries of the FTL table being updated, or other CPUs are not allowed to access the entries of the FTL table being updated.
结合本申请的第八方面或者第八方面的第一种至第四种可能的实现方式之一,在第五种可能的实现方式中,步骤S2中,使用DMA操作更新存储多个FTL表的表项的内存空间。With reference to the eighth aspect of the present application or the first to fourth possible implementation manners of the eighth aspect, in the fifth possible implementation manner, in step S2, the DMA operation is used to update and store the multiple FTL tables. The memory space of the table entry.
结合本申请的第八方面或者第八方面的第一种至第五种可能的实现方式之一,在第六种可能的实现方式中,步骤S2中,预设值为0。With reference to the eighth aspect of the present application or the first to fifth possible implementation manners of the eighth aspect, in the sixth possible implementation manner, in step S2, the preset value is 0.
结合本申请的第八方面或者第八方面的第一种至第六种可能的实现方式之一,在第七种可能的实现方式中,步骤S2中,逻辑地址为逻辑页的地址,物理地址为物理页的地址。With reference to the eighth aspect of the present application or one of the first to sixth possible implementation manners of the eighth aspect, in the seventh possible implementation manner, in step S2, the logical address is the address of the logical page, the physical address The address of the physical page.
结合本申请的第八方面的第七种可能的实现方式,在第八种可能的实现方式中,若逻辑页对应的存储空间和物理页的存储空间相同,在有效页表中,每个比特用于指示一个物理页的有效性。With reference to the seventh possible implementation manner of the eighth aspect of the present application, in the eighth possible implementation, if the storage space corresponding to the logical page and the storage space of the physical page are the same, each bit in the valid page table Used to indicate the validity of a physical page.
结合本申请的第八方面的第七种可能的实现方式,在第九种可能的实现方式中,若物理页的存储空间可容纳多个逻辑页,在有效页表中每个比特用于指示同逻辑地址相对应的物理 存储区域的有效性。In conjunction with the seventh possible implementation of the eighth aspect of the present application, in a ninth possible implementation, if a physical page storage space can accommodate multiple logical pages, each bit in the valid page table is used to indicate Physics corresponding to a logical address The validity of the storage area.
结合本申请的第八方面或者第八方面的第一种至第九种可能的实现方式之一,在第十种可能的实现方式中,步骤S4中,有效页计数表是数组、线性表或者链表。With reference to the eighth aspect of the present application or the first to the ninth possible implementation manners of the eighth aspect, in the tenth possible implementation manner, in step S4, the effective page count table is an array, a linear table, or Linked list.
结合本申请的第八方面的第一种至第十种可能的实现方式之一,在第十一种可能的实现方式中,步骤S6中,有效页数为0的物理块、大块或物理块组为优先级最高的物理块、大块或物理块组。With reference to one of the first to tenth possible implementation manners of the eighth aspect of the present application, in the eleventh possible implementation manner, in step S6, the physical block, the large block or the physical number of the valid page number is 0. A block group is the highest priority physical block, large block, or physical block group.
结合本申请的第八方面或者第八方面的第一种至第十一种可能的实现方式之一,在第十二种可能的实现方式中,去分配方法还包括:在步骤S2之后,向主机反馈去分配命令处理完成;或者,在步骤S4之后,向主机反馈去分配命令处理完成。With reference to the eighth aspect of the present application, or the first to the eleventh possible implementation manners of the eighth aspect, in the twelfth possible implementation, the de-allocation method further includes: after step S2, The host feedback de-allocation command processing is completed; or, after step S4, the feedback processing to the host is completed.
结合本申请的八方面或者第八方面的第一种至第十二种可能的实现方式之一,在第十三种可能的实现方式中,去分配方法还包括:在步骤S1和步骤S2之间,将去分配命令指示的逻辑地址范围对应的FTL表的表项加锁;在步骤S2和步骤S3之间,将去分配命令指示的逻辑地址范围对应的FTL表的表项解锁。With reference to the eight aspects of the present application or one of the first to twelfth possible implementation manners of the eighth aspect, in the thirteenth possible implementation manner, the de-allocation method further includes: in step S1 and step S2 The entry of the FTL table corresponding to the logical address range indicated by the allocation command is locked; and between the step S2 and the step S3, the entry of the FTL table corresponding to the logical address range indicated by the allocation command is unlocked.
结合本申请的第八方面或者第八方面的第一种至第十三种可能的实现方式之一,在第十四种可能的实现方式中,去分配方法还包括:在步骤S1和步骤S2之间,将去分配表的表项清零,其中,去分配表的表项用于存储每个逻辑地址是否被分配的信息。With reference to the eighth aspect of the present application or the first to thirteenth possible implementation manners of the eighth aspect, in the fourteenth possible implementation manner, the de-allocation method further includes: at step S1 and step S2 Between the entries of the allocation table is cleared, wherein the table of the allocation table is used to store information about whether each logical address is allocated.
结合本申请的第八方面的第十四种可能的实现方式,在第十五种可能的实现方式中,去分配方法还包括:在将去分配表清零后,向主机反馈去分配命令处理完成。With reference to the fourteenth possible implementation manner of the eighth aspect of the present application, in the fifteenth possible implementation manner, the de-allocation method further includes: after the de-allocation table is cleared, the command processing is sent to the host to be distributed. carry out.
结合本申请的第八方面的第十四种或者第十五种可能的实现方式,在第十六种可能的实现方式中,去分配方法还包括:通过DMA操作对去分配表进行更新。With reference to the fourteenth or fifteenth possible implementation manner of the eighth aspect of the present application, in the sixteenth possible implementation manner, the de-allocation method further includes: updating the de-allocation table by using a DMA operation.
附图说明DRAWINGS
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only the present application. For some embodiments, other drawings may be obtained from those of ordinary skill in the art without departing from the drawings.
图1为存储设备的框图;Figure 1 is a block diagram of a storage device;
图2为本申请实施例二中处理去分配命令前的FTL表的示意图;2 is a schematic diagram of an FTL table before processing a deallocation command in Embodiment 2 of the present application;
图3为本申请实施例二中的处理去分配命令前的有效页表的示意图;3 is a schematic diagram of a valid page table before processing a deallocation command in Embodiment 2 of the present application;
图4为本申请实施例二中的处理去分配命令前的有效页计数表的示意图;4 is a schematic diagram of a valid page count table before processing a deallocation command in Embodiment 2 of the present application;
图5为本申请实施例二中的处理去分配命令的方法的流程图;FIG. 5 is a flowchart of a method for processing a deallocation command according to Embodiment 2 of the present application;
图6为本申请实施例二中处理去分配命令后的FTL表的示意图;6 is a schematic diagram of an FTL table after processing a deallocation command according to Embodiment 2 of the present application;
图7为本申请实施例二中的处理去分配命令后的有效页表的示意图;7 is a schematic diagram of a valid page table after processing a deallocation command in Embodiment 2 of the present application;
图8为本申请实施例二中的处理去分配命令后的有效页计数表的示意图;8 is a schematic diagram of a valid page count table after processing a deallocation command in Embodiment 2 of the present application;
图9为本申请实施例二中处理读命令的流程图;9 is a flowchart of processing a read command in Embodiment 2 of the present application;
图10为本申请实施例三中处理去分配命令前的去分配表的示意图; 10 is a schematic diagram of a de-allocation table before processing a deallocation command in Embodiment 3 of the present application;
图11为本申请实施例三中处理去分配命令后的去分配表的示意图;11 is a schematic diagram of a de-allocation table after processing a deallocation command in Embodiment 3 of the present application;
图12A为本申请实施例三中处理去分配命令的方法的流程图;12A is a flowchart of a method for processing a deallocation command in Embodiment 3 of the present application;
图12B为本申请实施例三中响应读命令的方法的流程图;12B is a flowchart of a method for responding to a read command in Embodiment 3 of the present application;
图12C为本申请实施例三中响应写命令的方法的流程图;12C is a flowchart of a method for responding to a write command in Embodiment 3 of the present application;
图13为本申请实施例四中大块的示意图;13 is a schematic diagram of a large block in the fourth embodiment of the present application;
图14为本申请实施例四中处理去分配命令前的FTL表的示意图;14 is a schematic diagram of an FTL table before processing a deallocation command in Embodiment 4 of the present application;
图15为本申请实施例四中的处理去分配命令前的有效页表的示意图;15 is a schematic diagram of a valid page table before processing a deallocation command in Embodiment 4 of the present application;
图16为本申请实施例四中的处理去分配命令前的有效页计数表的示意图;16 is a schematic diagram of a valid page count table before processing a deallocation command in Embodiment 4 of the present application;
图17为本申请实施例四中的处理去分配命令的方法的流程图;17 is a flowchart of a method for processing a deallocation command in Embodiment 4 of the present application;
图18为本申请实施例四中处理去分配命令后的FTL表的示意图;FIG. 18 is a schematic diagram of an FTL table after processing a deallocation command according to Embodiment 4 of the present application;
图19为本申请实施例四中的处理去分配命令后的有效页表的示意图;19 is a schematic diagram of a valid page table after processing a deallocation command in Embodiment 4 of the present application;
图20为本申请实施例四中的处理去分配命令后的有效页计数表的示意图;20 is a schematic diagram of a valid page count table after processing a deallocation command in Embodiment 4 of the present application;
图21为本申请实施例五中处理去分配命令的方法的流程图。FIG. 21 is a flowchart of a method for processing a deallocation command according to Embodiment 5 of the present application.
具体实施方式detailed description
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application are clearly and completely described in the following with reference to the drawings in the embodiments of the present application. It is obvious that the described embodiments are a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
实施例一 Embodiment 1
存储了从逻辑地址到物理地址的映射信息的表结构被称为FTL表。FTL表是固态存储设备中的重要元数据。FTL表记录了存储设备中以数据页为单位的地址映射关系。FTL表包括多个FTL表的表项(或称条目)。在一个例子中,每个FTL表的表项中记录了一个逻辑页地址与一个物理页的对应关系。在另一个例子中,每个FTL表的表项中记录了连续的多个逻辑页地址与连续的多个物理页的对应关系。在又一个实施例中,每个FTL表的表项中记录了逻辑块地址与物理块地址的对应关系。在依然又一个例子中,FTL表中记录逻辑块地址与物理块地址的映射关系,和/或逻辑页地址与物理页地址的映射关系。A table structure that stores mapping information from a logical address to a physical address is called an FTL table. FTL tables are important metadata in solid state storage devices. The FTL table records the address mapping relationship in the storage device in units of data pages. The FTL table includes entries (or entries) of multiple FTL tables. In one example, a correspondence between a logical page address and a physical page is recorded in an entry of each FTL table. In another example, a correspondence between consecutive logical page addresses and consecutive multiple physical pages is recorded in an entry of each FTL table. In still another embodiment, a correspondence between a logical block address and a physical block address is recorded in an entry of each FTL table. In still another example, the FTL table records the mapping relationship between logical block addresses and physical block addresses, and/or the mapping relationship between logical page addresses and physical page addresses.
在去分配命令中,描述了逻辑地址范围。在执行了去分配命令后,可以有不同的效果。例如,(1)执行去分配命令后,在读取去分配命令所指示的逻辑地址范围时,所得到的是确定的(执行对该逻辑地址范围的其他写入操作之前);(2)执行去分配命令后,在读取去分配命令所指示的逻辑地址范围时,所得到的结果是全0(执行对该逻辑地址范围的其他写入操作之前);(3)执行去分配命令后,在读取去分配命令所指示的逻辑地址范围时,所得到的结果可以是任意值(执行对该逻辑地址范围的其他写入操作之前)。在去分配命令或者其他命令中可设置或选择去分配命令的执行效果。通过使用去分配命令,主机能够告知固态硬盘哪些逻辑地址空间不再存储有效数据,从而固态硬盘在回收存储空间时,不必搬移已经失效的数据。 In the de-allocation command, a logical address range is described. After performing the de-allocation command, there can be different effects. For example, (1) after executing the de-allocation command, when reading the logical address range indicated by the de-allocation command, what is obtained is determined (before performing other write operations on the logical address range); (2) execution After the command is allocated, when the logical address range indicated by the allocation command is read, the result is all 0 (before performing other write operations on the logical address range); (3) after executing the deal allocation command, When reading the range of logical addresses indicated by the de-allocation command, the result obtained can be any value (before performing other write operations on the logical address range). In the de-allocation command or other commands, you can set or select to assign the execution effect of the command. By using the Disassign command, the host can tell the SSD which logical address space no longer stores valid data, so that the SSD does not have to move the expired data when reclaiming storage space.
在固态硬盘中,有多种执行去分配命令的方法。为执行去分配操作,将FTL表中,由去分配命令所描述的逻辑地址范围所指示的FTL表项设置为特殊标记(例如,0)。例如,去分配命令指示的逻辑地址范围包括0-7与100-103。为执行该去分配命令,将FTL表中记录了逻辑地址0-7以及100-103的条目的内容设置为0。从而接下来要读取逻辑地址LBA 0-7或LBA 100-103中的一个或多个时,在FTL表中查询到这些逻辑地址对应的物理地址为0(含义为特殊标记),从而以符合去分配命令的指定效果的结果(例如,全0)作为对读命令的响应。可以理解的是,去分配命令所指示的逻辑地址范围可以与FTL表的表项的具有不同的单位大小。例如,去分配命令中,一个逻辑地址对应512字节的存储空间,而在FTL表中,一个表项对应4KB(千字节)的存储空间。In SSDs, there are several ways to perform a command to assign. To perform the de-allocation operation, the FTL entry indicated by the logical address range described by the de-allocation command in the FTL table is set to a special flag (for example, 0). For example, the logical address range indicated by the de-allocation command includes 0-7 and 100-103. To execute the de-allocation command, the contents of the entries in the FTL table in which logical addresses 0-7 and 100-103 are recorded are set to 0. Therefore, when one or more of the logical addresses LBA 0-7 or LBA 100-103 are to be read, the physical address corresponding to the logical addresses in the FTL table is 0 (meaning a special mark), thereby conforming The result of assigning the specified effect of the command (for example, all 0s) is used as a response to the read command. It can be understood that the logical address range indicated by the de-allocation command may have a different unit size than the entry of the FTL table. For example, in the allocation command, one logical address corresponds to 512 bytes of storage space, and in the FTL table, one entry corresponds to 4 KB (kilobytes) of storage space.
在根据本申请的实施例中,以物理块、大块或者物理块组为单位执行擦除或者垃圾回收操作,下文对以物理块为单位执行擦除或者垃圾回收操作,以及以大块为单位执行擦除或者垃圾回收操作相对应的处理去分配命令的方法进行详细描述,以物理块组为单位执行擦除或者垃圾回收操作相对应的处理去分配命令的方法可以参照二者内容获得,文中不再进行赘述。In the embodiment according to the present application, the erasing or garbage collection operation is performed in units of physical blocks, chunks, or physical block groups, and the erasing or garbage collection operation is performed in units of physical blocks, and in units of large blocks. The method of performing the erasing or garbage collection operation corresponding to the process of allocating the command is described in detail, and the method of performing the erasing or garbage collection operation corresponding to the physical block group to allocate the command can be obtained by referring to the contents of the two contents. No more details are given.
实施例二 Embodiment 2
在本实施例中,存储设备中以物理块为单位执行擦除或垃圾回收操作。在本实施例中,每个FTL表的表项中记录了一个逻辑页地址与一个物理页的对应关系。在固态硬盘中,维护FTL表、有效页表以及有效页计数表。其中,图2为本实施例中的处理去分配命令前的FTL表的示意图,FTL表指示逻辑页地址与物理页地址的对应关系。图3为本实施例中的处理去分配命令前的有效页表的示意图(图3中仅示出与图2中的FTL表相关的物理块的有效页表),有效页表记录对应物理块中存储的对应于逻辑页的数据的状态。图4为本实施例中的处理去分配命令前的有效页计数表的示意图,在有效页计数表中记录了各个物理块中处于有效状态的物理页的数量。需要说明的是,图3示出的有效页表中由横线所标注的有效比特指示了图2中示出的逻辑地址LBA0-LBA7对应的物理页,未标注横线的其他有效比特指示了其他逻辑地址对应的物理页,而无效比特所对应的物理页没有被任何逻辑地址所引用。在图3的例子中,用位图作为数据结构来指示物理块的各个物理页的有效性,应当理解,也可以使用多种其他数据结构。In the present embodiment, the erasing or garbage collection operation is performed in units of physical blocks in the storage device. In this embodiment, a correspondence between a logical page address and a physical page is recorded in an entry of each FTL table. In the SSD, the FTL table, the valid page table, and the valid page count table are maintained. 2 is a schematic diagram of an FTL table before processing a deallocation command in the embodiment, where the FTL table indicates a correspondence between a logical page address and a physical page address. 3 is a schematic diagram of a valid page table before processing a deallocation command in the embodiment (only the valid page table of the physical block associated with the FTL table in FIG. 2 is shown in FIG. 3), and the valid page table records the corresponding physical block. The state of the data stored in the corresponding logical page. 4 is a schematic diagram of a valid page count table before processing a deallocation command in the embodiment, in which the number of physical pages in a valid state in each physical block is recorded in the effective page count table. It should be noted that the valid bits indicated by the horizontal lines in the valid page table shown in FIG. 3 indicate the physical pages corresponding to the logical addresses LBA0-LBA7 shown in FIG. 2, and other valid bits not marked with horizontal lines indicate The physical page corresponding to the other logical address, and the physical page corresponding to the invalid bit is not referenced by any logical address. In the example of FIG. 3, bitmaps are used as data structures to indicate the validity of individual physical pages of a physical block, it being understood that a variety of other data structures can be used as well.
参看图2,以物理块1为例,其物理地址为“PBA 1-4”的物理页中存储了逻辑地址为“LBA 0”的数据,因而在图3所示的物理块1的有效页表中,物理地址为“PBA 1-4”的物理页的状态为有效(图3中,在第2行第1列的位置用“1”指示)。而图2所示的物理块1的物理地址为“PBA 1-0”的物理页没有被任何逻辑地址所引用,因而在图3所示的物理块1的有效页表中,物理地址为“PBA 1-0”的物理页的状态为无效(图3中,在第1行第1列的位置用“0”指示)。其他类似,此处不再一一描述。与之对应地,图4中的有效页计数表指示物理块0中当前有5个物理页有效,物理块1中当前有9个物理页有效,物理块2中当前有0个物理页有效,物理块3中当前有11个物理页有效。Referring to FIG. 2, taking physical block 1 as an example, a physical page whose physical address is "PBA 1-4" stores data having a logical address of "LBA 0", and thus a valid page of physical block 1 shown in FIG. In the table, the state of the physical page whose physical address is "PBA 1-4" is valid (in FIG. 3, the position in the second row and the first column is indicated by "1"). The physical page of physical block 1 shown in FIG. 2 whose physical address is "PBA 1-0" is not referred to by any logical address, and thus the physical address of the physical page 1 shown in FIG. 3 is " The state of the physical page of PBA 1-0" is invalid (in FIG. 3, the position of the first column and the first column is indicated by "0"). Other similar, not described here one by one. Correspondingly, the valid page count table in FIG. 4 indicates that there are currently 5 physical pages in physical block 0, 9 physical pages in physical block 1 are currently valid, and 0 physical pages in physical block 2 are currently valid. There are currently 11 physical pages in physical block 3 that are valid.
本实施例中,可以根据逻辑页对应的存储空间和物理页的存储空间的关系,确定在有效页表中,每个比特用于指示有效性的物理存储区域。 In this embodiment, according to the relationship between the storage space corresponding to the logical page and the storage space of the physical page, each bit in the valid page table is used to indicate a valid physical storage area.
在一个例子中,逻辑页对应的存储空间和物理页的存储空间相同,则在有效页表中,用1比特来指示对应的一个物理页的状态,以减少对内存空间的占用。例如,FTL表中的逻辑页对应4KB存储空间,而物理页的存储空间也为4KB(还包括附加的带外存储空间),在此情况下,有效页表中,每个比特指示一个物理页的状态。In one example, the storage space corresponding to the logical page is the same as the storage space of the physical page. In the valid page table, 1 bit is used to indicate the state of the corresponding physical page to reduce the occupation of the memory space. For example, a logical page in an FTL table corresponds to 4 KB of storage space, and a physical page has a storage space of 4 KB (including additional out-of-band storage space). In this case, each bit in the valid page table indicates a physical page. status.
在另一个例子中,逻辑页对应的存储空间和物理页的存储空间不相同,例如物理页的存储空间可容纳多个逻辑页,逻辑页对应4KB的存储空间,而物理页的存储空间能够容纳多个逻辑页(例如4个),在此情况下,有效页表中,每个比特指示同逻辑地址相对应的物理存储区域的有效性。例如,若物理块1包括512个物理页,那么物理块1的有效页表中包括2048个比特。类似地,有效页计数表中记录物理块中当前存储的为FTL表中的逻辑地址所引用的4KB存储空间的数量。例如,若物理块1包括512个16KB大小物理页,而在FTL表中有9个LBA所对应的物理地址属于物理块1,那么物理块1的有效页计数为9。In another example, the storage space corresponding to the logical page is different from the storage space of the physical page. For example, the storage space of the physical page can accommodate multiple logical pages, the logical page corresponds to 4 KB of storage space, and the storage space of the physical page can accommodate Multiple logical pages (eg, four), in this case, in the valid page table, each bit indicates the validity of the physical storage area corresponding to the logical address. For example, if physical block 1 includes 512 physical pages, then the effective page table of physical block 1 includes 2048 bits. Similarly, the effective page count table records the number of 4 KB of memory space currently stored in the physical block that is referenced by the logical address in the FTL table. For example, if physical block 1 includes 512 16KB physical pages, and the physical address corresponding to 9 LBAs in the FTL table belongs to physical block 1, the effective page count of physical block 1 is 9.
图5为本实施例提供的处理去分配命令的方法的流程图,如图5所示,本实施例提供的处理去分配命令的方法包括:响应于收到去分配命令,获取去分配命令指示的(一个或多个)逻辑地址范围(例如,LBA0-LBA3)。FIG. 5 is a flowchart of a method for processing a deallocation command according to the embodiment. As shown in FIG. 5, the method for processing a deallocation command according to the embodiment includes: obtaining a deallocation command indication in response to receiving a deallocation command. The logical address range(s) (for example, LBA0-LBA3).
将(一个或多个)逻辑地址(例如,LBA0-LBA3)对应的FTL表的表项(也参看图2)加锁,以避免垃圾回收(GC,Garbage Collection)或其他任务会同时访问FTL表的这些表项,避免引起错误。当然,加锁并不是必需的,如果不存在多个任务同时访问FTL表的同一表项的可能,则即使不加锁,也不会引起错误。Lock the entry of the FTL table corresponding to the logical address (for example, LBA0-LBA3) (see also Figure 2) to avoid garbage collection (GC, Garbage Collection) or other tasks accessing the FTL table at the same time. These entries are avoided to cause errors. Of course, locking is not required. If there is no possibility that multiple tasks access the same entry of the FTL table at the same time, no error will be caused even if the lock is not locked.
将(一个或多个)逻辑地址(例如,LBA0-LBA3)对应的FTL表的表项清零,或者将FTL表的表项设置为指定值。此时,零或其他指定值作为物理地址,指示读取该物理地址将获取到为执行去分配命令所指定的值(例如,全0的值或者全为指定值的值)。Clear the entry of the FTL table corresponding to the logical address (for example, LBA0-LBA3), or set the entry of the FTL table to the specified value. At this time, zero or other specified value is taken as the physical address, indicating that reading the physical address will acquire the value specified for executing the de-allocation command (for example, a value of all 0s or a value of all specified values).
作为一种可选的方式,当去分配命令指示的(一个或多个)逻辑地址范围为LBA0-LBA3时,在完成对关联于逻辑地址LBA0-LBA3的FTL表表项的清零后,即可向主机反馈去分配命令处理完成。As an optional manner, when the logical address range(s) indicated by the de-allocation command is LBA0-LBA3, after the FTL table entry associated with the logical addresses LBA0-LBA3 is cleared, Feedback can be sent to the host to allocate command processing.
将加锁的FTL表的表项解锁,从而允许其他任务访问FTL表的这些表项。The entries of the locked FTL table are unlocked, allowing other tasks to access these entries of the FTL table.
作为另一种可选的方式,根据FTL表的表项的更新,相应更新同被更新的FTL表的表项的物理地址对应的物理块的有效页表。例如,图6为本实施例中的处理去分配命令后的FTL表的示意图。而图2展示的是处理去分配命令前的FTL表。参看图6,响应于LBA0-LBA3对应的FTL表的表项被清零,物理地址PBA 1-4、PBA 3-6、PBA 1-9与PBA 1-10不再存储有效数据。图7为本实施例中的处理去分配命令后的有效页表的示意图。而图3展示的是处理去分配命令前的有效页表。相应地,如图7所示,物理块1的有效页表中,物理块1的地址为PBA1-4、PBA1-9与PBA1-10的物理页变为无效(例如,对应的比特被设置为0),而物理块3的有效页表中,物理块3的地址为PBA3-6的物理页变为无效。As another alternative manner, according to the update of the entry of the FTL table, the valid page table of the physical block corresponding to the physical address of the entry of the updated FTL table is updated correspondingly. For example, FIG. 6 is a schematic diagram of an FTL table after processing a deallocation command in the embodiment. Figure 2 shows the FTL table before processing the allocation command. Referring to FIG. 6, in response to the entry of the FTL table corresponding to LBA0-LBA3 being cleared, physical addresses PBA 1-4, PBA 3-6, PBA 1-9, and PBA 1-10 no longer store valid data. FIG. 7 is a schematic diagram of a valid page table after processing a deallocation command in the embodiment. Figure 3 shows the valid page table before processing the assignment command. Accordingly, as shown in FIG. 7, in the valid page table of the physical block 1, the physical page of the physical block 1 having the addresses PBA1-4, PBA1-9, and PBA1-10 becomes invalid (for example, the corresponding bit is set to 0), and in the valid page table of physical block 3, the physical page of physical block 3 whose address is PBA3-6 becomes invalid.
由于物理块中的有效页发生变化,相应更新有效页计数表。例如,图8为本实施例中的处理去分配命令后的有效页计数表的示意图。而图4为本实施例中的处理去分配命令前的有效页计数表的示意图。如图8所示,响应于LBA0-LBA3对应的FTL表的表项被清零,物理 块1的有效页计数从9变为6,而物理块3的有效页计数从11变为10。有效页计数可用于指示垃圾回收操作的优先级。例如,在执行垃圾回收操作时,优先回收有效页计数低的物理块。进一步地,对有效页计数为0的物理块,可立即执行擦除操作以回收存储空间。作为另一个例子,响应于对有效页计数表的更新,还更新有效页数量被更新的物理块的用于垃圾回收的优先级。从而在执行垃圾回收操作时,依照物理块的垃圾回收优先级来选择要被回收的物理块。其中,有效页数量越少的物理块,垃圾回收优先级越高,越先被回收。为维护有效页计数表,有效页计数表可以为数组、线性表、链表等多种数据结构。可选地,在有效页计数表更新完成后,向主机反馈去分配命令处理完成。Since the valid page in the physical block changes, the valid page count table is updated accordingly. For example, FIG. 8 is a schematic diagram of a valid page count table after processing a deallocation command in the embodiment. 4 is a schematic diagram of a valid page count table before the process of allocating a command in the embodiment. As shown in FIG. 8, the entry of the FTL table corresponding to LBA0-LBA3 is cleared, and the physical The effective page count of block 1 changes from 9 to 6, and the effective page count of physical block 3 changes from 11 to 10. A valid page count can be used to indicate the priority of the garbage collection operation. For example, when performing a garbage collection operation, the physical block with a low effective page count is preferentially reclaimed. Further, for a physical block whose valid page count is 0, an erase operation can be performed immediately to reclaim the storage space. As another example, in response to an update to the valid page count table, the priority of the physical block for which the number of valid pages is updated is also updated for garbage collection. Therefore, when performing the garbage collection operation, the physical block to be recycled is selected according to the garbage collection priority of the physical block. Among them, the physical block with the smaller number of effective pages, the higher the garbage collection priority, the first to be recycled. In order to maintain a valid page count table, the valid page count table can be a plurality of data structures such as an array, a linear table, and a linked list. Optionally, after the update of the valid page count table is completed, the feedback processing to the host is completed.
在使用上述处理去分配命令的方法对去分配命令处理完成后,向去分配命令所指示的逻辑地址范围写入数据前,如图9所示,响应于收到读命令,查询FTL表获得要读取的逻辑地址对应的物理地址,若物理地址为零,以全0作为对读命令的响应。此时,当主机读取应用了去分配命令的地址时,将得到预定的结果,例如是全0。当然,也可用其他方式向主机指示所读取的逻辑地址被去分配,例如,不向主机提供读取的数据,而以状态信息向主机告知所读取的逻辑地址无效、非法或处于一种或多种去分配状态。进一步地,主机的驱动程序基于存储设备告知的状态信息,生成提供给读取这些地址的应用的读取结果或数据。After the processing of the de-allocation command is completed using the above-described processing to allocate the command, before the data is written to the logical address range indicated by the de-allocation command, as shown in FIG. 9, in response to receiving the read command, the FTL table is obtained. The physical address corresponding to the read logical address. If the physical address is zero, all 0s are used as responses to the read command. At this time, when the host reads the address to which the assignment command is applied, a predetermined result is obtained, for example, all zeros. Of course, the host can also be indicated to the host by other means that the read logical address is de-allocated, for example, the read data is not provided to the host, and the status information is used to inform the host that the read logical address is invalid, illegal or in a kind of Or multiple to assign status. Further, the driver of the host generates a read result or data provided to the application that reads the addresses based on the status information notified by the storage device.
在上述处理去分配命令的方法中,若去分配命令指示了大量的逻辑地址范围时(例如,LBA 10000-LBA 20000),对多个FTL表表项的清零是耗时的,因此,可以通过多种方式加快对FTL表表项的更新操作。例如,每次更新多个FTL表表项,并且在1个CPU更新多个FTL表表项期间,阻止其他CPU访问被更新的FTL表表项,或使其他CPU不要尝试访问被更新的FTL表表项。作为另一个例子,使用DMA操作来更新存储多个FTL表表项的内存空间。在依然另一个例子中,每次更新存储空间连续的FTL表表项,并且在更新存储空间连续的FTL表表项期间,阻止其他访问FTL表表项的操作,以减少对内存的随机访问,以加快对FTL表表项的更新操作。In the above method of processing the allocation command, if the allocation command indicates a large number of logical address ranges (for example, LBA 10000-LBA 20000), clearing multiple FTL table entries is time consuming, and therefore, Speed up the update of FTL table entries in a variety of ways. For example, each time multiple FTL table entries are updated, and during the update of multiple FTL table entries by one CPU, other CPUs are prevented from accessing the updated FTL table entries, or other CPUs are not allowed to try to access the updated FTL table. Entry. As another example, a DMA operation is used to update the memory space in which multiple FTL table entries are stored. In still another example, each time the FTL table entry of the storage space is updated, and during the update of the FTL table entry of the storage space, other operations of accessing the FTL table entry are blocked to reduce random access to the memory. To speed up the update of FTL table entries.
示例性地,本实施例中的FTL表、有效页表与有效页计数表均可存储在DRAM中。Exemplarily, the FTL table, the valid page table, and the valid page count table in this embodiment may be stored in the DRAM.
实施例三 Embodiment 3
实施例三中,为高效处理去分配命令,还维护去分配表。进一步地,还将去分配表写入NVM,从而在异常掉电后重新启动时,能够通过去分配表记录的信息获得正确的FTL表。In the third embodiment, the command is allocated for efficient processing, and the allocation table is also maintained. Further, the de-allocation table is also written to the NVM, so that when the device is restarted after an abnormal power failure, the correct FTL table can be obtained by de-allocating the information recorded in the table.
图10和图11为去分配表的示意图,其中,图10为本申请实施例中处理去分配命令前的去分配表的示意图;图11为本申请实施例中处理去分配命令后的去分配表的示意图。如图10和图11所示,去分配表中,存储对应于FTL表中的每个逻辑地址是否被分配的信息。作为举例,在去分配表中为FTL表的每个逻辑地址提供1比特的存储空间。10 and FIG. 11 are schematic diagrams of a de-allocation table, where FIG. 10 is a schematic diagram of a de-allocation table before processing a de-allocation command in the embodiment of the present application; FIG. 11 is a de-allocation after processing a de-allocation command in the embodiment of the present application. Schematic diagram of the table. As shown in FIG. 10 and FIG. 11, in the deallocation table, information corresponding to whether or not each logical address in the FTL table is allocated is stored. By way of example, one bit of storage space is provided for each logical address of the FTL table in the de-allocation table.
如图11所示,当逻辑地址已经被分配(即在FTL表中该逻辑地址具有有效的物理地址),在去分配表中,将该逻辑地址标记为“被分配”(例如,将对应的1比特存储空间设置为0);当逻辑地址未被分配或者已经应用了去分配命令时,该逻辑地址在去分配表中被标记为“去分配”(例如,将对应的1比特存储空间设置为1)。As shown in FIG. 11, when a logical address has been allocated (ie, the logical address has a valid physical address in the FTL table), in the de-allocation table, the logical address is marked as "assigned" (eg, corresponding) The 1-bit memory space is set to 0); when the logical address is not allocated or the de-allocation command has been applied, the logical address is marked as "de-allocated" in the de-allocation table (for example, the corresponding 1-bit memory space is set) Is 1).
示例性地,在与图2所示的处理去分配命令前的FTL表对应的图10所示的去分配表中, FTL表中逻辑地址LBA 0-LBA 7都被分配了有效的物理地址,因而在如图10所示的去分配表中,LBA 0-LBA 7都被标记为“被分配”(对应的1比特存储空间均设置为0)。响应于收到去分配命令,对LBA 0–LBA 3的逻辑地址范围执行去分配命令的过程中,如图11所示,去分配表中LBA 0-LBA 3都被标记为“去分配”(对应的1比特存储空间均设置为1),而去分配表中LBA 4-LBA 7依然被标记为“被分配”(对应的1比特存储空间均设置为0)。在如图6所示的处理去分配命令后的FTL表中,对应逻辑地址LBA 0-LBA 3的表项的物理地址被设置为0。与之对应地,相应地修改有效页表与有效页计数表。参照图3和图7可知,物理块0与物理块1的有效页表也做了相应更新,类似地,参照图4和图8可知,有效页计数表也做了相应更新。Illustratively, in the de-allocation table shown in FIG. 10 corresponding to the FTL table before the process de-allocation command shown in FIG. 2, The logical addresses LBA 0-LBA 7 in the FTL table are all assigned valid physical addresses, so in the de-allocation table shown in FIG. 10, LBA 0-LBA 7 is marked as "assigned" (corresponding 1 bit) The storage space is set to 0). In response to receiving the de-allocation command, during the execution of the de-allocation command for the logical address range of LBA 0 - LBA 3, as shown in FIG. 11, the LBA 0-LBA 3 in the de-allocation table is marked as "de-allocation" ( The corresponding 1-bit memory space is set to 1), and the LBA 4-LBA 7 in the de-allocation table is still marked as "assigned" (the corresponding 1-bit memory space is set to 0). In the FTL table after processing the deallocation command as shown in FIG. 6, the physical address of the entry corresponding to the logical address LBA 0-LBA 3 is set to zero. Correspondingly, the valid page table and the valid page count table are modified accordingly. Referring to FIG. 3 and FIG. 7, the effective page table of physical block 0 and physical block 1 is also updated accordingly. Similarly, referring to FIG. 4 and FIG. 8, the effective page count table is also updated accordingly.
示例性地,本实施例中的去分配表存储在DRAM中。可选地,通过DMA操作更新DRAM中的去分配表。Illustratively, the de-allocation table in this embodiment is stored in the DRAM. Optionally, the de-allocation table in the DRAM is updated by a DMA operation.
图12A为本申请实施例三中处理去分配命令的方法的流程图。响应于收到去分配命令(参看图12A中1210),获取去分配命令所指示的逻辑地址范围(参看图12A中1212),例如,要对LBA 0–LBA 3的逻辑地址范围执行去分配。根据去分配命令所指示的逻辑地址范围,更新去分配表(参看图10与图11)的表项(参看图12A中1214),例如将图11所示的去分配表中与逻辑地址LBA 0-LBA 3对应的表项标记为“去分配”(具有1值)。在更新了去分配表后,即可向主机指示去分配命令执行完成。从而在实施例三中,去分配命令的执行速度得到了极大的提升。FIG. 12A is a flowchart of a method for processing a deallocation command according to Embodiment 3 of the present application. In response to receiving the de-allocation command (see 1210 in FIG. 12A), the logical address range indicated by the de-allocation command is acquired (see 1212 in FIG. 12A), for example, de-allocation is performed on the logical address range of LBA 0 - LBA 3. Updating the entries of the de-allocation table (see FIG. 10 and FIG. 11) according to the logical address range indicated by the de-allocation command (see FIG. 12A and FIG. 11), for example, the de-allocation table shown in FIG. 11 and the logical address LBA 0 - The entry corresponding to LBA 3 is marked as "de-allocated" (having a value of 1). After updating the de-allocation table, the host can be instructed to allocate the command execution completion. Therefore, in the third embodiment, the execution speed of the de-allocation command is greatly improved.
接下来,依据去分配命令所指示的逻辑地址范围,更新FTL表的表项,例如,将去分配命令所指示的一个或多个逻辑地址对应的FTL表项清零,或设置为指定值(参看图12A中1218)。可选地,在更新FTL表前,还对要更新的一个或多个逻辑地址对应的FTL表的表项加锁(参看图12A中1216),从而避免FTL表项被更新期间,其他任务读取这些FTL表项。以及在更新FTL表后,还对被更新的一个或多个逻辑地址对应的FTL表的表项解锁(参看图12A中1220)。Next, the FTL table entry is updated according to the logical address range indicated by the de-allocation command, for example, the FTL entry corresponding to the one or more logical addresses indicated by the de-allocation command is cleared, or set to a specified value ( See 1218 in Figure 12A. Optionally, before updating the FTL table, the entry of the FTL table corresponding to the one or more logical addresses to be updated is also locked (refer to 1216 in FIG. 12A), so as to prevent other tasks from being read during the update of the FTL entry. Take these FTL entries. And after updating the FTL table, the entries of the FTL table corresponding to the updated one or more logical addresses are also unlocked (refer to 1220 in FIG. 12A).
相应地,还更新同被更新的FTL表的表项的物理地址对应的物理块的有效页表(参看图7以及图12A中1222)与有效页计数表(参看图8以及图12A中1224)。Accordingly, the valid page table of the physical block corresponding to the physical address of the entry of the updated FTL table (see FIG. 7 and 1222 in FIG. 12A) and the valid page count table (see FIG. 8 and 1224 in FIG. 12A) are also updated. .
图12B为本申请实施例三中响应读命令的方法的流程图。在实施例三中,参看图12A,当去分配表更新完成后,即向主机告知去分配命令执行完成。此后主机读取被去分配的逻辑地址时,应当收到诸如全0的指定指示。在图12B中,响应于收到读命令(参看图12B中1230),查询去分配表(参看图11),判断读命令所读取的逻辑地址是否被去分配(参看图12B中1232)。若去分配表指示所读取的逻辑地址处于去分配状态,则以全0或者其他指定的指示作为对读命令的响应(参看图12B中1234)。只有当区分配表指示所读取的逻辑地址已被分配时,才查询FTL表获得要读取的逻辑地址对应的物理地址(参看图12B中1236),并从获得的物理地址读取数据作为对读命令的响应(参看图12B中1238)。FIG. 12B is a flowchart of a method for responding to a read command in Embodiment 3 of the present application. In the third embodiment, referring to FIG. 12A, when the de-allocation table update is completed, the host is informed that the de-allocation command execution is completed. After the host reads the assigned logical address, it should receive a specified indication such as all 0s. In Fig. 12B, in response to receiving the read command (see 1230 in Fig. 12B), the de-allocation table (see Fig. 11) is queried to determine whether the logical address read by the read command is de-allocated (see 1232 in Fig. 12B). If the de-allocation table indicates that the read logical address is in the de-allocation state, then all 0s or other specified indications are used as responses to the read command (see 1234 in Figure 12B). Only when the area allocation table indicates that the read logical address has been allocated, the FTL table is queried to obtain the physical address corresponding to the logical address to be read (see 1236 in FIG. 12B), and the data is read from the obtained physical address as Response to a read command (see 1238 in Figure 12B).
可选地,查询去分配表将增加读操作的延迟,对于访问已被分配的逻辑地址的读命令,查询去分配表是没有积极意义的。为此,还记录固态存储设备正在执行去分配命令的状态。 响应于收到去分配命令(参看图12A中1210),标记存储设备正在执行去分配命令。在此情况下,若收到读命令,则首先查询去分配表(参看图12B中1232)。而当去分配命令执行完成后,例如在图12A所示的步骤1218或步骤1220执行完成后,标记存储设备已经完成对去分配命令的执行。在此情况下,若收到读命令,则不必执行图12B中步骤1232,而直接执行图12B中步骤1236。Alternatively, querying the allocation table will increase the latency of the read operation. For a read command that accesses the logical address that has been allocated, it is not meaningful to query the allocation table. To this end, the state in which the solid state storage device is performing the allocation command is also recorded. In response to receiving the de-allocation command (see 1210 in Figure 12A), the tag storage device is executing a de-allocation command. In this case, if a read command is received, the de-allocation table is first queried (see 1232 in Fig. 12B). When the execution of the de-allocation command is completed, for example, after the execution of step 1218 or step 1220 shown in FIG. 12A is completed, the tag storage device has completed execution of the de-allocation command. In this case, if a read command is received, step 1232 in Fig. 12B is not necessarily performed, and step 1236 in Fig. 12B is directly executed.
图12C为本申请实施例三中响应写命令的方法的流程图。对于未被写入数据的固态存储设备,其去分配表中指示所有的逻辑地址均处于去分配状态。响应于逻辑地址被写入数据,去分配表与被写入数据的逻辑地址对应的表项被修改为已分配状态。而响应于执行去分配命令,被去分配的逻辑地址在去分配表中的表项被再次修改为去分配状态。参看图12C,当收到写命令(参看图12C中1240),为写命令分配物理地址,并用写命令所指示的逻辑地址与分配的物理地址更新FTL表(参看图12C中1242)。向被分配的物理地址写入数据,并向主机反馈写命令处理完成(参看图12C中1244)。可选地,为降低写命令处理延迟,在步骤1242之后,在将数据写入物理地址之前,即向主机反馈写命令处理完成。还更新有效页表与有效页计数表(参看图12C中1246),以作为物理块被写入数据的响应。还更新去分配表,将被写入的逻辑地址在去分配表中的表项设置为已分配(参看图12C中1248)。图12C中,步骤1244、步骤1246与步骤1248的顺序可以调整,也可以并行或同时被执行。优选地,步骤1244、步骤1246与步骤1248发生在步骤1242之后。FIG. 12C is a flowchart of a method for responding to a write command in Embodiment 3 of the present application. For a solid-state storage device that has not been written with data, its de-allocation table indicates that all logical addresses are in a de-allocation state. In response to the logical address being written to the data, the table corresponding to the logical address of the de-allocation table and the data to be written is modified to the allocated state. And in response to executing the de-allocation command, the de-allocated logical address in the de-allocation table is modified again to the de-allocation state. Referring to Fig. 12C, when a write command is received (see 1240 in Fig. 12C), a physical address is assigned to the write command, and the FTL table is updated with the logical address indicated by the write command and the assigned physical address (see 1242 in Fig. 12C). The data is written to the assigned physical address and the write command processing is completed to the host (see 1244 in Fig. 12C). Optionally, to reduce the write command processing delay, after step 1242, the write command processing is completed to the host before the data is written to the physical address. The valid page table and valid page count table (see 1246 in Figure 12C) are also updated to be a response to the physical block being written to the data. The de-allocation table is also updated, and the entry of the logical address to be written in the de-allocation table is set to be allocated (see 1248 in Fig. 12C). In Figure 12C, the order of step 1244, step 1246, and step 1248 may be adjusted, or may be performed in parallel or simultaneously. Preferably, step 1244, step 1246, and step 1248 occur after step 1242.
实施例四 Embodiment 4
在本实施例中,存储设备中以大块为单位执行擦除或者垃圾回收操作。图13为大块的示意图,作为举例,如图13所示,在每16个逻辑单元(LUN)上构造大块。每个大块包括16个物理块,来自16个逻辑单元(LUN)的每一个。在图13的例子中,大块0包括来自16个逻辑单元(LUN)的每个的物理块0,大块1包括来自每个逻辑单元(LUN)的物理块1。In the present embodiment, the erasing or garbage collection operation is performed in units of large blocks in the storage device. FIG. 13 is a schematic diagram of a large block. As an example, as shown in FIG. 13, a large block is constructed on every 16 logical units (LUNs). Each chunk consists of 16 physical blocks from each of the 16 logical units (LUNs). In the example of FIG. 13, chunk 0 includes physical block 0 from each of 16 logical units (LUNs), and chunk 1 includes physical block 1 from each logical unit (LUN).
在本实施例中,每个FTL表的表项中记录了一个逻辑地址与一个大块中的物理单元的对应关系。示例性地,在FTL表中,每个逻辑地址对应4KB的存储空间,而NVM中的每个物理页包括4个物理单元,每个物理单元容纳对应1个逻辑地址的数据(可选地,还包括诸如校验数据的带外数据)。图14为本实施例中的处理去分配命令前的FTL表的示意图,参看图14,FTL表中记录的PBA 0-4指示大块0的地址为4的物理单元,PBA 1-6指示大块1的地址为6的物理单元,FTL表中记录的PBA0-9指示大块0的地址为9的物理单元,而PBA0-15指示大块0的地址为15的物理单元。当然,也可以有多种其他方式来构造大块,此处不再一一进行赘述。In this embodiment, the correspondence between a logical address and a physical unit in a large block is recorded in an entry of each FTL table. Illustratively, in the FTL table, each logical address corresponds to 4 KB of storage space, and each physical page in the NVM includes 4 physical units, each of which holds data corresponding to 1 logical address (optionally, Also included is out-of-band data such as check data. FIG. 14 is a schematic diagram of the FTL table before processing the deallocation command in the embodiment. Referring to FIG. 14, the PBA 0-4 recorded in the FTL table indicates the physical unit of the address 0 of the large block 0, and the PBA 1-6 indicates the large The physical unit of block 1 has an address of 6, the PBA0-9 recorded in the FTL table indicates the physical unit whose address of the large block 0 is 9, and the PBA0-15 indicates the physical unit whose address of the large block 0 is 15. Of course, there are a variety of other ways to construct a large block, which will not be repeated here.
作为一种可选的方式,在大块中构造页条带,每个逻辑单元(LUN)内相同物理地址的物理页构成了“页条带”。如图13所示,物理页0-0、物理页0-1……与物理页0-x构成了页条带0。其中物理页0-0、物理页0-1……物理页0-14用于存储用户数据,而物理页0-15用于存储根据条带内的所有用户数据计算得到的校验数据。当然,用于存储校验数据的物理页可以位于页条带中的任意位置,以上只是举例而非限定。类似地,图13中,物理页2-0、物理页2-1……与物理页2-x构成了页条带2。 As an alternative, a page strip is constructed in chunks, and the physical pages of the same physical address within each logical unit (LUN) constitute a "page strip." As shown in FIG. 13, physical page 0-0, physical page 0-1, ... and physical page 0-x constitute a page strip 0. Among them, physical page 0-0, physical page 0-1... physical page 0-14 is used to store user data, and physical pages 0-15 are used to store check data calculated from all user data in the strip. Of course, the physical page used to store the verification data can be located anywhere in the page strip, which is by way of example and not limitation. Similarly, in FIG. 13, the physical page 2-0, the physical page 2-1, ... and the physical page 2-x constitute the page strip 2.
在本实施例中,为每个大块提供有效页表,用于记录对应大块中存储的对应于逻辑地址的数据(数据单元)的状态。图15为本实施例中处理去分配命令前的有效页表,需要说明的是,图15中,有效页表中由横线所标注的有效比特指示了图14的FTL表中逻辑地址In the present embodiment, a valid page table is provided for each large block for recording the state of data (data unit) corresponding to the logical address stored in the corresponding large block. 15 is a valid page table before processing the deallocation command in the embodiment. It should be noted that, in FIG. 15, the valid bits indicated by the horizontal lines in the valid page table indicate the logical addresses in the FTL table of FIG.
LBA0-LBA7对应的物理单元,未标注横线的其他有效比特指示了其他逻辑地址对应的物理单元,而无效比特所对应的物理单元没有被任何逻辑地址所引用。The physical unit corresponding to LBA0-LBA7, the other valid bits not marked with a horizontal line indicate the physical unit corresponding to other logical addresses, and the physical unit corresponding to the invalid bit is not referenced by any logical address.
参看图15,以大块0为例,其物理地址为“PBA 0-4”的物理单元中存储了逻辑地址为“LBA 0”的数据,因而在大块0的有效页表中,地址为“PBA 0-4”的物理单元的状态为有效(图15中,由有效页表(大块0)的第2行第1列的“1”指示)。而图15所示的大块0的地址为“PBA 0-0”的物理单元没有被任何逻辑地址所引用,因而在大块0的有效页表中,地址为“PBA 0-0”的物理单元的状态为无效(图15中,由有效页表(大块0)的第1行第1列的“0”指示)。其他类似,此处不再一一描述。可选地,在有效页表中,用1比特来指示对应的一个物理单元的状态,以减少对内存空间的占用。Referring to FIG. 15, taking the large block 0 as an example, the physical unit whose physical address is "PBA 0-4" stores the data whose logical address is "LBA 0", and thus in the valid page table of the large block 0, the address is The state of the physical unit of "PBA 0-4" is valid (in FIG. 15, indicated by "1" in the second row and first column of the valid page table (large block 0)). The physical unit of the block 0 whose address is "PBA 0-0" shown in FIG. 15 is not referred to by any logical address, and thus the physical address of the address "PBA 0-0" in the valid page table of the large block 0 The state of the cell is invalid (in FIG. 15, indicated by "0" of the first row and the first column of the valid page table (large block 0)). Other similar, not described here one by one. Optionally, in the valid page table, 1 bit is used to indicate the state of the corresponding one physical unit to reduce the occupation of the memory space.
图16为本实施例中处理去分配命令前的有效页计数表,在有效页计数表中记录了各个大块中处于有效状态的物理单元的数量。与之对应地,如图16所示,大块0中当前有9个物理单元有效,大块1中当前有11个物理单元有效,大块2中有0个物理单元有效,大块3中有11个物理单元有效。16 is a valid page count table before processing the deallocation command in the embodiment, in which the number of physical units in the active state in each large block is recorded in the valid page count table. Correspondingly, as shown in FIG. 16, there are currently 9 physical units in the large block 0, 11 physical units in the large block 1 are currently valid, and 0 physical units in the large block 2 are valid, and the large block 3 is in the middle. There are 11 physical units available.
图17为本实施例提供的处理去分配命令的方法的流程图,如图17所示,本实施例提供的处理去分配命令的方法包括:响应于收到去分配命令(参看图17中1710),获取去分配命令指示的(一个或多个)逻辑地址范围(例如,LBA0-LBA3)(参看图17中1720)。FIG. 17 is a flowchart of a method for processing a deallocation command according to the embodiment. As shown in FIG. 17, the method for processing a deallocation command according to this embodiment includes: responding to receiving a deallocation command (refer to 1710 in FIG. 17). And obtaining the logical address range(s) to which the command command is assigned (for example, LBA0-LBA3) (refer to 1720 in FIG. 17).
将(一个或多个)逻辑地址(例如,LBA0-LBA3)对应的FTL表的表项(参看图14)加锁(参看图17中1730),以避免垃圾回收(GC,Garbage Collection)或其他任务会同时访问FTL表的这些表项,避免引起错误。当然,加锁并不是必需的,如果不存在多个任务同时访问FTL表的同一表项的可能,则即使不加锁,也不会引起错误。Lock the entry of the FTL table (see Figure 14) corresponding to the logical address (for example, LBA0-LBA3) (see 1730 in Figure 17) to avoid garbage collection (GC, Garbage Collection) or other The task will access these entries in the FTL table at the same time to avoid causing errors. Of course, locking is not required. If there is no possibility that multiple tasks access the same entry of the FTL table at the same time, no error will be caused even if the lock is not locked.
将(一个或多个)逻辑地址(例如,LBA0-LBA3)对应的FTL表的表项清零,或者将FTL表的表项设置为指定值(参看图17中1740)。此时,零或其他指定值作为物理地址,指示读取该物理地址将获取到为执行去分配命令所指定的值(例如,全0的值或者全为指定值的值)。The entry of the FTL table corresponding to the logical address(s) (for example, LBA0-LBA3) is cleared, or the entry of the FTL table is set to a specified value (refer to 1740 in FIG. 17). At this time, zero or other specified value is taken as the physical address, indicating that reading the physical address will acquire the value specified for executing the de-allocation command (for example, a value of all 0s or a value of all specified values).
作为一种可选的方式,当去分配命令指示的(一个或多个)逻辑地址范围为LBA0-LBA3时,在完成对关联于逻辑地址LBA0-LBA3的FTL表表项的清零后,即可向主机反馈去分配命令处理完成。As an optional manner, when the logical address range(s) indicated by the de-allocation command is LBA0-LBA3, after the FTL table entry associated with the logical addresses LBA0-LBA3 is cleared, Feedback can be sent to the host to allocate command processing.
将加锁的FTL表的表项解锁(参看图17中1750),从而允许其他任务访问FTL表的这些表项。The entries of the locked FTL table are unlocked (see 1750 in Figure 17), allowing other tasks to access these entries of the FTL table.
作为另一种可选的方式,根据FTL表的表项的更新,相应更新同被更新的FTL表的表项的物理地址对应的大块的有效页表(参看图17中1760)。例如,图18为本实施例中的处理去分配命令后的FTL表的示意图。而图14为本实施例中的处理去分配命令前的FTL表的示意图。参看图18,响应于LBA0-LBA3对应的FTL表的表项被清零,物理地址PBA 0-4、PBA 1-6、PBA 0-9与PBA 0-10不再存储有效数据。相应地,图19为本实施例中的处理去分配命 令后的有效页表的示意图。而图15为本实施例中的处理去分配命令前的有效页表的示意图。如图19所示,大块0的有效页表中,大块0的物理地址为PBA 0-4、PBA 0-9与PBA0-10的物理单元变为无效(例如,对应的比特被设置为0),而大块1的有效页表中,大块1的地址为PBA 1-6的物理单元变为无效。As another alternative manner, according to the update of the entry of the FTL table, the valid page table of the chunk corresponding to the physical address of the entry of the updated FTL table is updated correspondingly (refer to 1760 in FIG. 17). For example, FIG. 18 is a schematic diagram of an FTL table after processing a deallocation command in the embodiment. 14 is a schematic diagram of the FTL table before the process of assigning a command in the embodiment. Referring to FIG. 18, in response to the entry of the FTL table corresponding to LBA0-LBA3 being cleared, the physical addresses PBA 0-4, PBA 1-6, PBA 0-9, and PBA 0-10 no longer store valid data. Accordingly, FIG. 19 is a process of assigning a life in the embodiment. A schematic diagram of a valid page table after the order. FIG. 15 is a schematic diagram of a valid page table before the process of allocating a command in the embodiment. As shown in FIG. 19, in the valid page table of the chunk 0, the physical unit of the chunk 0 is PBA 0-4, and the physical units of PBA 0-9 and PBA0-10 become invalid (for example, the corresponding bit is set to 0), and in the valid page table of the chunk 1, the physical unit of the chunk 1 whose address is PBA 1-6 becomes invalid.
由于大块中的有效物理单元发生变化,相应更新有效页计数表(参看图17中1770)。例如,响应于LBA0-LBA3对应的FTL表的表项被清零,图20为本实施例中的处理去分配命令后的有效页计数表的示意图。而图16为本实施例中的处理去分配命令前的有效页计数表的示意图。如图20所示,大块0的有效页计数从9变为6,而大块1的有效页计数从11变为10。有效页计数可用于指示垃圾回收操作的优先级。例如,在执行垃圾回收操作时,优先回收有效页计数低的大块。进一步地,对有效页计数为0的大块,可立即执行擦除操作以回收存储空间。作为另一个例子,响应于对有效页计数表的更新,还更新有效页数量被更新的大块的用于垃圾回收的优先级(参看图17中1780),从而在执行垃圾回收操作时,依照大块的垃圾回收优先级来选择要被回收的大块。其中,有效页数量越少的大块,垃圾回收优先级越高,越先被回收。为维护有效页计数表,有效页计数表可以为数组、线性表、链表等多种数据结构。可选地,在有效页计数表更新完成后,向主机反馈去分配命令处理完成。Since the effective physical unit in the chunk changes, the valid page count table is updated accordingly (see 1770 in Figure 17). For example, in response to the entry of the FTL table corresponding to the LBA0-LBA3 being cleared, FIG. 20 is a schematic diagram of the valid page count table after the process of allocating the command in the embodiment. 16 is a schematic diagram of a valid page count table before the process of allocating a command in the embodiment. As shown in FIG. 20, the effective page count of chunk 0 changes from 9 to 6, and the effective page count of chunk 1 changes from 11 to 10. A valid page count can be used to indicate the priority of the garbage collection operation. For example, when performing a garbage collection operation, a large chunk with a low effective page count is preferentially reclaimed. Further, for a large block whose effective page count is 0, an erase operation can be performed immediately to reclaim the storage space. As another example, in response to an update to the valid page count table, the priority of the bulk of the valid page number being updated for garbage collection is also updated (refer to 1780 in FIG. 17), thereby performing the garbage collection operation according to Large chunks of garbage collection priority to select the chunks to be recycled. Among them, the smaller the number of valid pages, the higher the garbage collection priority, the first to be recycled. In order to maintain a valid page count table, the valid page count table can be a plurality of data structures such as an array, a linear table, and a linked list. Optionally, after the update of the valid page count table is completed, the feedback processing to the host is completed.
在使用根据本申请实施例四提供的处理去分配命令的方法对去分配命令处理完成后,向去分配命令所指示的逻辑地址范围写入数据前,响应于收到读命令,查询FTL表获得要读取的逻辑地址对应的物理地址,若物理地址为零,以全0作为对读命令的响应。此时,当主机读取处理去分配命令时对应的地址时,将得到预定的结果,例如是全0。当然,也可用其他方式向主机指示所读取的逻辑地址被去分配,例如,不向主机提供读取的数据,而以状态信息向主机告知所读取的逻辑地址无效、非法或处于一种或多种去分配状态。进一步地,主机的驱动程序基于存储设备告知的状态信息,生成提供给读取这些地址的应用的读取结果或数据。After the de-allocation command processing is completed by using the processing de-allocation command according to the fourth embodiment of the present application, before the data is written to the logical address range indicated by the de-allocation command, the FTL table is obtained in response to receiving the read command. The physical address corresponding to the logical address to be read. If the physical address is zero, all 0s are used as responses to the read command. At this time, when the host reads the corresponding address when processing the command to allocate, the predetermined result will be obtained, for example, all 0s. Of course, the host can also be indicated to the host by other means that the read logical address is de-allocated, for example, the read data is not provided to the host, and the status information is used to inform the host that the read logical address is invalid, illegal or in a kind of Or multiple to assign status. Further, the driver of the host generates a read result or data provided to the application that reads the addresses based on the status information notified by the storage device.
在根据本申请实施例四提供的处理去分配命令的方法中,若去分配命令指示了大量的逻辑地址范围时(例如,LBA 10000-LBA 20000),对多个FTL表表项的清零是耗时的。可以通过多种方式加快对FTL表表项的更新操作。例如,每次更新多个FTL表表项,并且在1个CPU更新多个FTL表表项期间,阻止其他CPU访问被更新的FTL表表项,或使其他CPU不要尝试访问被更新的FTL表表项。作为另一个例子,使用DMA操作来更新存储多个FTL表表项的内存空间。在依然另一个例子中,每次更新存储空间连续的FTL表的表项,并且在更新存储空间连续的FTL表表项期间,阻止其他访问FTL表表项的操作,以减少对内存的随机访问,以加快对FTL表表项的更新操作。In the method for processing a deal allocation command according to Embodiment 4 of the present application, if the allocation command indicates a large number of logical address ranges (for example, LBA 10000-LBA 20000), the clearing of multiple FTL table entries is Time consuming. There are several ways to speed up the update of FTL table entries. For example, each time multiple FTL table entries are updated, and during the update of multiple FTL table entries by one CPU, other CPUs are prevented from accessing the updated FTL table entries, or other CPUs are not allowed to try to access the updated FTL table. Entry. As another example, a DMA operation is used to update the memory space in which multiple FTL table entries are stored. In still another example, the entries of the FTL table in the storage space are updated each time, and the operations of accessing the FTL table entries are blocked during the update of the FTL table entries in the storage space to reduce random access to the memory. To speed up the update of FTL table entries.
示例性地,本实施例中的FTL表、有效页表与有效页计数表均可存储在DRAM中。Exemplarily, the FTL table, the valid page table, and the valid page count table in this embodiment may be stored in the DRAM.
实施例五 Embodiment 5
实施例三中,为高效处理去分配命令,还维护去分配表。进一步地,还将去分配表写入NVM,从而在异常掉电后重新启动时,能够通过去分配表记录的信息获得正确的FTL表。In the third embodiment, the command is allocated for efficient processing, and the allocation table is also maintained. Further, the de-allocation table is also written to the NVM, so that when the device is restarted after an abnormal power failure, the correct FTL table can be obtained by de-allocating the information recorded in the table.
在实施例五中,使用图10和图11示出的去分配表。去分配表中,存储对应于FTL表中 的每个逻辑地址是否被分配的信息。作为举例,在去分配表中为FTL表的每个逻辑地址提供1比特的存储空间。In the fifth embodiment, the de-allocation table shown in Figs. 10 and 11 is used. In the allocation table, the storage corresponds to the FTL table. Whether each logical address is assigned information. By way of example, one bit of storage space is provided for each logical address of the FTL table in the de-allocation table.
图21为本申请实施例五中处理去分配命令的方法的流程图。响应于收到去分配命令(参看图21中2110),获取去分配命令所指示的(一个或多个)逻辑地址范围(参看图21中2112),例如,要对LBA 0–LBA 3的逻辑地址范围执行去分配。根据去分配命令所指示的逻辑地址范围,更新去分配表(参看图10与图11)的表项(参看图21中2114),例如将图11所示的去分配表中与逻辑地址LBA 0-LBA 3对应的表项标记为“去分配”(具有1值)。在更新了去分配表后,即可向主机指示去分配命令执行完成。从而在实施例五中,去分配命令的执行速度得到了极大的提升。FIG. 21 is a flowchart of a method for processing a deallocation command according to Embodiment 5 of the present application. In response to receiving the de-allocation command (see 2110 in FIG. 21), the logical address range(s) indicated by the de-allocation command is obtained (see 2112 in FIG. 21), for example, the logic to be used for LBA 0 - LBA 3. The address range is executed to be assigned. Updating the entries of the de-allocation table (refer to FIG. 10 and FIG. 11) according to the logical address range indicated by the de-allocation command (refer to FIG. 21 and FIG. 11), for example, the de-allocation table shown in FIG. 11 and the logical address LBA 0 - The entry corresponding to LBA 3 is marked as "de-allocated" (having a value of 1). After updating the de-allocation table, the host can be instructed to allocate the command execution completion. Therefore, in the fifth embodiment, the execution speed of the de-allocation command is greatly improved.
接下来,依据去分配命令所指示的逻辑地址范围,更新FTL表的表项,例如,将去分配命令所指示的一个或多个逻辑地址对应的FTL表项清零,或设置为指定值(参看图21中2118)。可选地,在更新FTL表前,还对要更新的一个或多个逻辑地址对应的FTL表的表项加锁(参看图21中2116),从而避免FTL表项被更新期间,其他任务读取这些FTL表项。以及在更新FTL表后,还对被更新的一个或多个逻辑地址对应的FTL表的表项解锁(参看图21中2120)。Next, the FTL table entry is updated according to the logical address range indicated by the de-allocation command, for example, the FTL entry corresponding to the one or more logical addresses indicated by the de-allocation command is cleared, or set to a specified value ( See 2118 in Figure 21). Optionally, before updating the FTL table, the entry of the FTL table corresponding to the one or more logical addresses to be updated is also locked (refer to 2116 in FIG. 21), so as to prevent other tasks from being read during the update of the FTL entry. Take these FTL entries. And after updating the FTL table, the entries of the FTL table corresponding to the updated one or more logical addresses are also unlocked (refer to 2120 in FIG. 21).
相应地,还更新同被更新的FTL表的表项的物理地址对应的大块块的有效页表(参看图7以及图21中2122)与有效页计数表(参看图8以及图21中2124)。Accordingly, the valid page table of the large block corresponding to the physical address of the entry of the updated FTL table (see 2122 in FIG. 7 and FIG. 21) and the valid page count table are also updated (see FIG. 8 and FIG. 21, 2124). ).
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。 The foregoing is only a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application. It should be covered by the scope of protection of this application. Therefore, the scope of protection of the present application should be determined by the scope of the claims.

Claims (17)

  1. 一种处理去分配命令的方法,其特征在于,包括:A method for processing a deal allocation command, comprising:
    根据去分配命令获取去分配命令指示的逻辑地址范围;Obtaining a logical address range indicated by the de-allocation command according to the de-allocation command;
    更新FTL表,将去分配命令指示的逻辑地址范围对应的FTL表的表项设为第一指定值;Update the FTL table, and set the entry of the FTL table corresponding to the logical address range indicated by the allocation command to the first specified value;
    指示去分配命令执行完成。Indicates that the assignment command execution is complete.
  2. 根据权利要求1所述的处理去分配命令的方法,其特征在于,还包括:The method of processing a deallocation command according to claim 1, further comprising:
    更新有效数据单元表,有效数据单元表用于记录存储设备的各物理数据单元的数据的状态;Updating a valid data unit table, the valid data unit table is used to record the status of data of each physical data unit of the storage device;
    更新有效数据单元计数表,其中,有效数据单元计数表用于记录物理块、大块或物理块组中处于有效状态的物理数据单元的数量。The valid data unit count table is updated, wherein the valid data unit count table is used to record the number of physical data units in a physical block, a large block, or a physical block group that are in a valid state.
  3. 根据权利要求2所述的处理去分配命令的方法,其特征在于,还包括:The method for processing a deallocation command according to claim 2, further comprising:
    依据有效数据单元计数表,更新物理块、大块或物理块组的第一优先级,该第一优先级为用于执行垃圾回收操作的优先级;Updating a first priority of a physical block, a large block, or a physical block group according to a valid data unit count table, the first priority being a priority for performing a garbage collection operation;
    依据第一优先级执行垃圾回收操作。Perform garbage collection operations based on the first priority.
  4. 根据权利要求2或3所述的处理去分配命令的方法,其特征在于,A method of processing a deallocation command according to claim 2 or 3, characterized in that
    在更新有效数据单元表之后,指示去分配命令处理完成;或者,After updating the valid data unit table, indicating that the allocation command processing is completed; or,
    在更新有效数据单元计数表之后,指示去分配命令处理完成。After updating the valid data unit count table, the instruction to allocate the command processing is completed.
  5. 根据权利要求1~4任一项所述的处理去分配命令的方法,还包括:The method for processing a deallocation command according to any one of claims 1 to 4, further comprising:
    响应于收到读命令,查询FTL表获得要读取的逻辑地址对应的物理地址,若物理地址为指示去分配状态的第一指定值,以第二指定值作为对读命令的响应。In response to receiving the read command, the FTL table is queried to obtain a physical address corresponding to the logical address to be read, and if the physical address is the first specified value indicating the de-allocation state, the second specified value is used as the response to the read command.
  6. 根据权利要求1~4任一项所述的处理去分配命令的方法,还包括:The method for processing a deallocation command according to any one of claims 1 to 4, further comprising:
    响应于收到读命令,查询FTL表获得要读取的逻辑地址对应的物理地址,若物理地址为指示去分配状态的第一指定值,以状态信息向主机告知所读取的逻辑地址无效、非法或处于一种或多种去分配状态。In response to receiving the read command, querying the FTL table to obtain a physical address corresponding to the logical address to be read, and if the physical address is the first specified value indicating the status of the allocation, the state information is notified to the host that the read logical address is invalid, Illegal or in one or more de-allocation states.
  7. 一种处理去分配命令的方法,其特征在于,包括:A method for processing a deal allocation command, comprising:
    根据去分配命令获取去分配命令指示的逻辑地址范围;Obtaining a logical address range indicated by the de-allocation command according to the de-allocation command;
    更新去分配表,将去分配命令指示的逻辑地址范围对应的去分配表的表项设置为第一指定值;其中去分配表用于记录FTL表中的逻辑地址是否被分配的信息;Updating the allocation table, setting an entry of the de-allocation table corresponding to the logical address range indicated by the allocation command to a first specified value; wherein the de-allocation table is used to record information about whether the logical address in the FTL table is allocated;
    指示去分配命令执行完成。Indicates that the assignment command execution is complete.
  8. 根据权利要求7所述的去分配方法,其特征在于,还包括:The de-allocation method according to claim 7, further comprising:
    更新FTL表,将去分配命令指示的逻辑地址范围对应的FTL表的表项设为第一指定值。The FTL table is updated, and the entry of the FTL table corresponding to the logical address range indicated by the allocation command is set to the first specified value.
  9. 根据权利要求7-8之一所述的方法,其特征在于,还包括:The method according to any one of claims 7-8, further comprising:
    更新有效数据单元表,有效数据单元表用于记录存储设备的各物理数据单元的数据的状态;Updating a valid data unit table, the valid data unit table is used to record the status of data of each physical data unit of the storage device;
    更新有效数据单元计数表,其中,有效数据单元计数表用于记录物理块、大块或物理块组中处于有效状态的物理数据单元的数量。The valid data unit count table is updated, wherein the valid data unit count table is used to record the number of physical data units in a physical block, a large block, or a physical block group that are in a valid state.
  10. 根据权利要求9所述的方法,其特征在于,还包括:The method of claim 9 further comprising:
    依据有效数据单元计数表,更新物理块、大块或物理块组的第一优先级,该第一优先级为用于执行垃圾回收操作的优先级;Updating a first priority of a physical block, a large block, or a physical block group according to a valid data unit count table, the first priority being a priority for performing a garbage collection operation;
    依据第一优先级执行垃圾回收操作。Perform garbage collection operations based on the first priority.
  11. 根据权利要求8~10任一项所述的方法,其特征在于,A method according to any one of claims 8 to 10, characterized in that
    更新FTL表期间,阻止其他组件访问正在被更新的FTL表的表项,或者, 使其他组件不访问正在被更新的FTL表的表项。During the update of the FTL table, other components are prevented from accessing the entries of the FTL table being updated, or, Causes other components not to access the entries of the FTL table being updated.
  12. 根据权利要求7~11任一项所述的方法,其特征在于,还包括:The method according to any one of claims 7 to 11, further comprising:
    响应于收到读命令,通过去分配表判断所述读命令所读取的逻辑地址是否被分配,其中,若所读取的逻辑地址未被分配,则以第二指定值作为对读命令的响应,若所读取的逻辑单元地址被分配,则查询FTL表获得要读取的逻辑地址对应的物理地址,从物理地址读取数据作为对读命令的响应。Determining, by the de-allocation table, whether the logical address read by the read command is allocated, in response to receiving the read command, wherein if the read logical address is not allocated, the second specified value is used as the read command In response, if the read logical unit address is allocated, the FTL table is queried to obtain the physical address corresponding to the logical address to be read, and the data is read from the physical address as a response to the read command.
  13. 根据权利要求7~11任一项所述的方法,其特征在于,还包括:The method according to any one of claims 7 to 11, further comprising:
    响应于收到读命令,通过去分配表判断所述读命令所读取的逻辑地址是否被分配,其中,若所读取的逻辑地址未被分配,以状态信息向主机告知所读取的逻辑地址无效、非法或处于一种或多种去分配状态。In response to receiving the read command, determining, by the de-allocation table, whether the logical address read by the read command is allocated, wherein if the read logical address is not allocated, the status information is used to inform the host of the read logic. The address is invalid, illegal, or in one or more de-allocation states.
  14. 根据权利要求13所述的方法,其特征在于,还包括:The method of claim 13 further comprising:
    主机的驱动程序基于被告知的状态信息,生成提供给读取所述逻辑地址的应用的读取结果或者数据。The driver of the host generates a read result or data provided to the application that reads the logical address based on the notified status information.
  15. 根据权利要求7-14任一项所述的方法,其特征在于,还包括:The method according to any one of claims 7-14, further comprising:
    响应于收到写命令,为写命令分配物理地址,根据所分配的物理地址更新FTL表以及去分配表。In response to receiving the write command, a physical address is assigned to the write command, and the FTL table and the deallocation table are updated based on the assigned physical address.
  16. 一种存储设备,其特征在于,包括获取模块、更新模块和指示模块,其中,获取模块用于根据去分配命令获取去分配命令指示的逻辑地址范围;更新模块用于更新FTL表,将去分配命令指示的逻辑地址范围对应的FTL表的表项设为第一指定值;指示模块用于指示去分配命令执行完成。A storage device, comprising: an obtaining module, an updating module, and an indicating module, wherein the obtaining module is configured to obtain a logical address range indicated by the de-allocation command according to the de-allocation command; the updating module is configured to update the FTL table, and the allocation module is to be allocated The entry of the FTL table corresponding to the logical address range indicated by the command is set to a first specified value; the indication module is configured to indicate that the execution of the de-allocation command is completed.
  17. 一种存储设备,其特征在于,包括控制部件、接口、DRAM和一个或多个NVM,其中,DRAM中存储有FTL表,接口用于与控制部件交换数据,控制部件响应于收到去分配命令,根据去分配命令获取去分配命令指示的逻辑地址范围,并更新FTL表,将去分配命令指示的逻辑地址范围对应的FTL表的表项设为第一指定值,并指示去分配命令执行完成。 A storage device, comprising: a control component, an interface, a DRAM, and one or more NVMs, wherein the DRAM stores an FTL table, the interface is for exchanging data with the control component, and the control component is responsive to receiving the de-allocation command And obtaining the logical address range indicated by the de-allocation command according to the de-allocation command, and updating the FTL table, setting the entry of the FTL table corresponding to the logical address range indicated by the de-allocation command to the first specified value, and instructing to complete the execution of the allocation command .
PCT/CN2017/100317 2016-09-05 2017-09-04 Method for processing de-allocation command, and storage device WO2018041258A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201610803054.0A CN107797938B (en) 2016-09-05 2016-09-05 Method for accelerating de-allocation command processing and storage device
CN201610804881.1A CN107797934B (en) 2016-09-05 2016-09-05 Method for processing de-allocation command and storage device
CN201610803054.0 2016-09-05
CN201610804881.1 2016-09-05

Publications (1)

Publication Number Publication Date
WO2018041258A1 true WO2018041258A1 (en) 2018-03-08

Family

ID=61301397

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/100317 WO2018041258A1 (en) 2016-09-05 2017-09-04 Method for processing de-allocation command, and storage device

Country Status (1)

Country Link
WO (1) WO2018041258A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110955613A (en) * 2018-09-26 2020-04-03 北京忆恒创源科技有限公司 Intelligent data streaming and flow tracking for storage devices
CN113721838A (en) * 2021-07-22 2021-11-30 成都忆芯科技有限公司 Writing and reading data method for storage device, storage controller and DMA engine

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102855193A (en) * 2011-06-03 2013-01-02 苹果公司 Mount-time unmapping of unused logical addresses in non-volatile memory systems
CN103019971A (en) * 2012-11-25 2013-04-03 向志华 Method of quickly responding to trim command, SSD (Solid State Disk) controller and system
CN104346287A (en) * 2013-08-09 2015-02-11 Lsi公司 Trim mechanism using multi-level mapping in a solid-state media
WO2016094032A1 (en) * 2014-12-12 2016-06-16 Intel Corporation Accelerated data recovery in a storage system
CN105760311A (en) * 2016-02-17 2016-07-13 珠海全志科技股份有限公司 Trim command response method and system and operation system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102855193A (en) * 2011-06-03 2013-01-02 苹果公司 Mount-time unmapping of unused logical addresses in non-volatile memory systems
CN103019971A (en) * 2012-11-25 2013-04-03 向志华 Method of quickly responding to trim command, SSD (Solid State Disk) controller and system
CN104346287A (en) * 2013-08-09 2015-02-11 Lsi公司 Trim mechanism using multi-level mapping in a solid-state media
WO2016094032A1 (en) * 2014-12-12 2016-06-16 Intel Corporation Accelerated data recovery in a storage system
CN105760311A (en) * 2016-02-17 2016-07-13 珠海全志科技股份有限公司 Trim command response method and system and operation system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110955613A (en) * 2018-09-26 2020-04-03 北京忆恒创源科技有限公司 Intelligent data streaming and flow tracking for storage devices
CN113721838A (en) * 2021-07-22 2021-11-30 成都忆芯科技有限公司 Writing and reading data method for storage device, storage controller and DMA engine
CN113721838B (en) * 2021-07-22 2023-12-19 成都忆芯科技有限公司 Write, read data method for memory device, memory controller, and DMA engine

Similar Documents

Publication Publication Date Title
TWI704487B (en) Data storage device and operating method thereof
CN109086219B (en) De-allocation command processing method and storage device thereof
US8321639B2 (en) Command tracking for direct access block storage devices
KR102533072B1 (en) Memory system and operation method for determining availability based on block status
CN110928807B (en) Apparatus and method for checking valid data in a memory system
CN107797934B (en) Method for processing de-allocation command and storage device
US20220327049A1 (en) Method and storage device for parallelly processing the deallocation command
US20110271037A1 (en) Storage device performing data invalidation operation and data invalidation method thereof
CN107797938B (en) Method for accelerating de-allocation command processing and storage device
US20200110555A1 (en) Write control method, associated data storage device and controller thereof
US10459803B2 (en) Method for management tables recovery
US10049042B2 (en) Storage device, semiconductor memory device, and method for controlling same
CN110806837A (en) Data processing system and method of operation thereof
JP2021533467A (en) Logical vs. physical table fragment
CN109840048B (en) Storage command processing method and storage device thereof
WO2018041258A1 (en) Method for processing de-allocation command, and storage device
KR102425470B1 (en) Data storage device and operating method thereof
CN110865945B (en) Extended address space for memory devices
WO2019148757A1 (en) Non-volatile random access memory and method for providing same
CN110968527A (en) FTL provided caching
TWI724483B (en) Data storage device and control method for non-volatile memory
TWI697778B (en) A data storage device and a data processing method
KR20210142863A (en) Apparatus and method for increasing operation efficiency in a memory system
CN109840219B (en) Address translation system and method for mass solid state storage device
CN110580228A (en) De-allocation command processing method and storage device thereof

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: 17845560

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17845560

Country of ref document: EP

Kind code of ref document: A1