Virtual Check Data Cache of Storage Device

By introducing a virtual verification data cache mechanism, the cache unit status is dynamically managed, which solves the problem of inefficiency of storage devices in writing command processing, and realizes efficient verification data calculation and storage, which improves the overall performance of storage devices.

CN111752866BActive Publication Date: 2025-07-08MEMBLAZE TECH BEIJING
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201910246121.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-03-28
Publication Date
2025-07-08
Estimated Expiration
2039-03-28

AI Technical Summary

Technical Problem

In the prior art, when processing write commands, the storage device lacks an effective virtual verification data cache mechanism, resulting in inefficient data processing and inability to efficiently calculate and store verification data.

Method used

The virtual verification data cache mechanism is adopted, and the status of the virtual verification data cache table and the verification data cache table is dynamically managed by combining the virtual verification data cache unit and the verification data cache unit, optimize the allocation and use of data cache, and ensure efficient processing of write commands.

Benefits of technology

It improves the efficiency of the storage device when processing write commands, ensures accurate calculation and storage of verification data, and improves the overall performance of the storage device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111752866B_ABST
    Figure CN111752866B_ABST
Patent Text Reader

Abstract

The present application discloses a method for providing a virtual verification data cache. The method for providing a virtual verification data cache of the present application includes: obtaining a request from a unit that allocates a virtual verification data cache; obtaining a first unit of available virtual verification data cache; obtaining a first unit of available verification data cache, and recording the association relationship between the obtained first unit of virtual verification data cache and the first unit of verification data cache; and responding to the request from the unit that allocates a virtual verification data cache with the first unit of virtual verification data cache and / or the first unit of verification data cache.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to storage technologies, and in particular, to a virtual check data cache for storage devices. Background Art

[0002] Figure 1 A block diagram of a solid-state storage device is shown. The solid-state storage device 102 is coupled to a host to provide storage capabilities for the host. The host and the solid-state storage device 102 can be coupled in a variety of ways, including but not limited to coupling the host and the solid-state storage device 102 through, 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), NVMe (NVM Express), Ethernet, Fibre Channel, a wireless communication network, etc. The host can be an information processing device capable of communicating with the storage device through the above-mentioned methods. For example, a personal computer, a tablet computer, a server, a portable computer, a network switch, a router, a cellular phone, a personal digital assistant, etc. The storage device 102 includes an interface 103, a control component 104, one or more NVM chips 105, and DRAM (Dynamic Random Access Memory) 110.

[0003] Common NVMs include NAND flash memory, phase change memory, FeRAM (Ferroelectric RAM), MRAM (Magnetic Random Access Memory), RRAM (Resistive Random Access Memory), XPoint memory, etc.

[0004] The interface 103 can be adapted to exchange data with the host through, for example, SATA, IDE, USB, PCIE, NVMe, SAS, Ethernet, Fibre Channel, etc.

[0005] The control component 104 is used to control data transmission between the interface 103, the NVM chip 105, and the DRAM 110, and is also used for storage management, mapping of host logical addresses to flash physical addresses, erase balancing, bad block management, etc. The control component 104 can be implemented in multiple ways such as software, hardware, firmware, or a combination thereof. For example, the control component 104 can be in the form of an FPGA (Field-programmable gate array), an ASIC (Application Specific Integrated Circuit), or a combination thereof. The control component 104 can also include a processor or a controller, and software is executed in the processor or controller to manipulate the hardware of the control component 104 to process IO (Input / Output) commands. The control component 104 is also coupled to the DRAM 110 and can access the data in the DRAM 110. The FTL table and / or the data of the cached IO commands can be stored in the DRAM.

[0006] The control component 104 includes a flash interface controller (or referred to as a media interface, media interface controller, 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 that conforms to the interface protocol of the NVM chip 105 to operate the NVM chip 105 and receives the command execution results output from the NVM chip 105. Known NVM chip interface protocols include "Toggle", "ONFI", etc.

[0007] In a storage device, an FTL (Flash Translation Layer) is used to maintain the mapping information from logical addresses to physical addresses. Logical addresses constitute the storage space of the solid-state storage device perceived by upper-layer software such as the operating system. Physical addresses are the addresses used to access the physical storage units of the solid-state storage device. In related technologies, address mapping can also be implemented using an intermediate address form. For example, a logical address is mapped to an intermediate address, and then the intermediate address is further mapped to a physical address. In these cases, the read / write commands received by the storage device indicate logical addresses.

[0008] The table structure that stores the mapping information from logical addresses to physical addresses is called the FTL table. The FTL table is important metadata in a solid-state storage device. Usually, the entries of the FTL table record the address mapping relationship in units of data pages in the storage device.

[0009] The FTL of some storage devices is provided by the host to which the storage device is coupled. The host's memory stores the FTL table, and the host's CPU executes software to provide the FTL. There are also some storage management devices disposed between the host and the storage device that provide the FTL. In these cases, the read / write commands received by the storage device indicate physical addresses.

[0010] The commands provided by the host to the storage device may access the logical address space corresponding to one or more entries of the FTL table. And the control component may transform the commands received from interface 103 (for example, split the commands according to the size of the logical address space corresponding to the FTL entries), and process the transformed commands.

[0011] The storage device includes a plurality of NVM chips. Each NVM chip includes one or more dies or logical units (LUNs, Logic UNits). The dies or logical units can respond to read / write operations in parallel. Multiple read, write, or erase operations on the same die or logical unit are executed sequentially.

[0012] Figure 2 A schematic diagram of a large block is shown. The large block includes physical blocks from each of a plurality of logical units. Preferably, each logical unit provides one physical block for the large block. By way of example, a large block is constructed on every 16 logical units (LUNs). Each large block includes 16 physical blocks, one from each of the 16 logical units (LUNs). In Figure 2 the example, large block 0 includes physical block 0 from each of the 16 logical units (LUNs), and large block 1 includes physical block 1 from each logical unit (LUN). There can also be many other ways to construct the large block.

[0013] As an alternative, page stripes are constructed in the large block, and the physical pages with the same physical address within each logical unit (LUN) form a "page stripe". Figure 2 In, physical pages P0-0, physical pages P0-1... and physical page P0-x form page stripe 0, where physical pages P0-0, physical page P0-1... physical page P0-14 are used to store user data, and physical page P0-x is used to store parity data calculated based on all the user data within the stripe. Similarly, Figure 2 in, physical pages P2-0, physical pages P2-1... and physical page P2-x form page stripe 2. Optionally, the physical page for storing parity data can be located at any position within the page stripe.

[0014] To write data to the page stripe, the control component (104) of the solid-state storage device (see Figure 1)A check data generation unit is provided. Taking the calculation of check data using the exclusive OR operation as an example, for a page strip including N + 1 (N = 15) physical pages, the exclusive OR of the user data of N physical pages is calculated (for example, (P0-0) XOR (P0-1) XOR (P0-2) XOR... XOR (P0-(N-1))), and the calculation result is written into the physical page (for example, P0-x) that stores the check data for the page strip. Optionally, multiple check data generation units (for example, M) are provided in the control component (104) to write data to M page strips simultaneously. The check data generation unit includes a check data cache for storing the intermediate results or final results of the check data calculation process. A check data calculator (i.e., a check data generation unit) is provided in the Chinese patent application with the application number 201710326110.0 and the invention title of "Data Organization of Page Strip and Method and Apparatus for Writing Data to Page Strip". Summary of the Invention

[0015] According to a first aspect of the present application, a first method for providing a virtual check data cache according to the first aspect of the present application is provided, including: obtaining a request for a unit that allocates a virtual check data cache; obtaining a first unit of an available virtual check data cache; obtaining a first unit of an available check data cache, and recording the association relationship between the first unit of the obtained virtual check data cache and the first unit of the check data cache; and responding to the request for the unit that allocates the virtual check data cache with the first unit of the virtual check data cache and / or the first unit of the check data cache.

[0016] According to the first method for providing a virtual check data cache according to the first aspect of the present application, a second method for providing a virtual check data cache according to the first aspect of the present application is provided, using a virtual check data cache table to record the association relationship between the units of the virtual check data cache and the units of the check data cache; the virtual check data cache table includes multiple entries, and each entry is associated with recording the status of the unit of the virtual check data cache with each index identifier of the virtual check data cache and the index or external data cache unit of the associated check data cache unit.

[0017] According to the first or second method for providing a virtual check data cache according to the first aspect of the present application, a third method for providing a virtual check data cache according to the first aspect of the present application is provided, where the unit status of the virtual check data cache includes unallocated, allocated and in use, and / or allocated and suspended; the virtual check cache in the unallocated state can be allocated to process write commands; the virtual check cache in the allocated and in use or allocated and suspended state cannot be allocated again to process write commands.

[0018] One of the methods for providing virtual verification data caching according to the first to third aspects of the present application provides a method for providing virtual verification data caching according to the fourth aspect of the first aspect of the present application. A unit of available verification data caching is obtained through a verification data caching table, where the verification data caching table records whether each unit of the verification data caching has an associated unit of virtual verification data caching.

[0019] One of the methods for providing virtual verification data caching according to the first to fourth aspects of the first aspect of the present application provides a method for providing virtual verification data caching according to the fifth aspect of the first aspect of the present application. It further includes, in response to there being no available unit of verification data caching, moving the data of the second unit of the used verification data caching to an external data caching, so that the second unit of the verification data caching becomes available.

[0020] According to the method for providing virtual verification data caching according to the third aspect of the first aspect of the present application, a method for providing virtual verification data caching according to the sixth aspect of the first aspect of the present application is provided. It further includes, in response to the virtual verification data caching table indicating that the first unit of the virtual verification data caching is in an allocated and pending state, also obtaining a third unit of available verification data caching, moving the data of its corresponding external data caching unit to the third unit of the available verification data caching, and providing the index of the first unit of the virtual verification data caching and / or the index of the third unit of the verification data caching to a verification data calculation request unit.

[0021] According to the method for providing virtual verification data caching according to the sixth aspect of the first aspect of the present application, a method for providing virtual verification data caching according to the seventh aspect of the first aspect of the present application is provided. It further updates the virtual verification data caching table to record that the first unit of the virtual verification data caching is in an allocated and in-use state and is associated with the index of the third unit of the available verification data caching.

[0022] One of the methods for providing virtual verification data caching according to the first to seventh aspects of the first aspect of the present application provides a method for providing virtual verification data caching according to the eighth aspect of the first aspect of the present application. It further includes requesting to use the index of the first unit of the virtual verification data caching or the index of the first unit of the verification data caching to calculate verification data.

[0023] According to the method for providing virtual verification data caching according to the eighth aspect of the first aspect of the present application, a method for providing virtual verification data caching according to the ninth aspect of the first aspect of the present application is provided. It further includes obtaining data to be written, using the first unit of the verification data caching to calculate verification data for the data to be written, and writing the data to be written to a storage medium.

[0024] A method for providing virtual check data caching according to the eighth aspect of the present application provides a method for providing virtual check data caching according to the tenth aspect of the first aspect of the present application. Using the index of the first unit of the virtual check data cache, obtain the index of the first unit of the check data cache associated with the index of the first unit of the virtual check data cache from the virtual check data cache table.

[0025] A method for providing virtual check data caching according to the tenth aspect of the first aspect of the present application provides a method for providing virtual check data caching according to the eleventh aspect of the first aspect of the present application. It further includes that if the virtual check data cache table indicates that the first unit of the virtual check data cache is in an allocated and pending state, also obtain the fourth unit of the available check data cache, move the data of the external data cache unit corresponding to the first unit of the virtual check data cache to the fourth unit of the check data cache, and request to use the index of the fourth unit of the check data cache to calculate the check data.

[0026] A method for providing virtual check data caching according to one of the eighth to eleventh aspects of the first aspect of the present application provides a method for providing virtual check data caching according to the twelfth aspect of the first aspect of the present application. In response to obtaining a data transfer request message, transfer data between the unit of the check data cache and the external data cache.

[0027] A method for providing virtual check data caching according to one of the eighth to eleventh aspects of the first aspect of the present application provides a method for providing virtual check data caching according to the thirteenth aspect of the first aspect of the present application. In response to obtaining a request for calculating check data, use the unit of the check data cache to calculate the check data for the data to be written.

[0028] A method for providing virtual check data caching according to one of the first to thirteenth aspects of the first aspect of the present application provides a method for providing virtual check data caching according to the fourteenth aspect of the first aspect of the present application. The request for allocating the unit of the virtual check data cache also indicates a stream ID, and the stream ID identifies the stream of the multi-stream storage device.

[0029] A method for providing virtual check data caching according to the fourteenth aspect of the first aspect of the present application provides a method for providing virtual check data caching according to the fifteenth aspect of the first aspect of the present application. The entry of the virtual check data cache table records the stream ID in association with the index of the unit of the virtual check data cache to indicate the index of the unit of one or more virtual check caches for each stream.

[0030] According to the fourteenth or fifteenth aspect of the present application, a method for providing a virtual check data cache is provided. According to the sixteenth aspect of the first aspect of the present application, a method for providing a virtual check data cache is provided. When obtaining the index of the unit of the available virtual check data cache, the request for allocating the unit of the virtual check data cache with the same flow ID is allocated the same index of the unit of the virtual check data cache.

[0031] According to one of the methods for providing a virtual check data cache according to the fourteenth to sixteenth aspects of the first aspect of the present application, a method for providing a virtual check data cache according to the seventeenth aspect of the first aspect of the present application is provided. When allocating the index of the unit of the virtual check data cache for the request for allocating the unit of the virtual check data cache with a flow ID, the index of the allocated unit of the virtual check data cache is also recorded in the virtual check data cache table in association with the flow ID.

[0032] According to one of the methods for providing a virtual check data cache according to the fourteenth to seventeenth aspects of the first aspect of the present application, a method for providing a virtual check data cache according to the eighteenth aspect of the first aspect of the present application is provided. The relationship between the flow ID and the index of the unit of the virtual check data cache is one-to-N, where N is an integer greater than 1.

[0033] According to one of the methods for providing a virtual check data cache according to the fourteenth to eighteenth aspects of the first aspect of the present application, a method for providing a virtual check data cache according to the nineteenth aspect of the first aspect of the present application is provided. Obtain the index of the unit of the associated check data cache and the flow ID from the received message, and obtain the data to be written with the same flow ID. Use the unit of the check data cache to calculate the check data for the data to be written with the flow ID.

[0034] According to one of the methods for providing a virtual check data cache according to the fourteenth to nineteenth aspects of the first aspect of the present application, a method for providing a virtual check data cache according to the twentieth aspect of the first aspect of the present application is provided. The request for allocating the unit of the virtual check data cache generated for each write command includes the flow ID associated with the write command. Obtain the index of the unit of the available virtual check data cache corresponding to the flow ID and / or the index of the available unit of the check data cache in response to the request for allocating the unit of the virtual check data cache.

[0035] According to one of the methods for providing a virtual check data cache according to the fourteenth to twentieth aspects of the first aspect of the present application, a method for providing a virtual check data cache according to the twenty-first aspect of the first aspect of the present application is provided. The request for allocating the unit of the virtual check data cache generated for each write command further includes the context of the write command.

[0036] According to the twenty-first method for providing virtual check data caching of the first aspect of the present application, a method for providing virtual check data caching according to the twenty-second of the first aspect of the present application is provided. The check data caching unit corresponding to the index of the virtual check data caching unit is used to calculate the check data for the data corresponding to the write command, where the virtual check data caching unit and the write command are associated with the same stream ID.

[0037] According to one of the methods for providing virtual check data caching from the first to the twenty-second of the first aspect of the present application, a method for providing virtual check data caching according to the twenty-third of the first aspect of the present application is provided. A stream ID mapping table is also maintained, and the corresponding relationship between the stream ID and the index of the virtual check data caching unit is recorded in the stream ID mapping table in an associated manner.

[0038] According to the method for providing virtual check data caching of the twenty-third of the first aspect of the present application, a method for providing virtual check data caching according to the twenty-fourth of the first aspect of the present application is provided. In the stream ID mapping table, one stream ID is associated with the index of one or more virtual check data caching units.

[0039] According to the method for providing virtual check data caching of the twenty-third or twenty-fourth of the first aspect of the present application, a method for providing virtual check data caching according to the twenty-fifth of the first aspect of the present application is provided. The stream ID mapping table is accessed to identify the index of the virtual check data caching unit associated with the stream ID of the write command, and the check data caching unit corresponding to the index of the virtual check data caching unit is used to calculate the check data for the data corresponding to the write command.

[0040] According to the method for providing virtual check data caching of the twenty-fifth of the first aspect of the present application, a method for providing virtual check data caching according to the twenty-sixth of the first aspect of the present application is provided. If the stream ID of the write command is not recorded in the stream ID mapping table, an available index of the virtual check data caching unit is also specified for the stream ID and recorded in the stream ID mapping table.

[0041] According to one of the methods for providing virtual check data caching from the twenty-third to the twenty-sixth of the first aspect of the present application, a method for providing virtual check data caching according to the twenty-seventh of the first aspect of the present application is provided. The data to be written with the same stream ID is calculated for check data using one or more check data caching units associated with the same stream ID.

[0042] One of the methods for providing virtual check data caching according to the first to twenty-seventh aspects of the present application provides a method for providing virtual check data caching according to the twenty-eighth aspect of the first aspect of the present application. If a stream ID is obtained from a request of a unit for allocating virtual check data caching, and if there is an index of a unit of virtual check data caching that is already associated with the stream ID and is in an allocated and in-use state, then the index of the unit of virtual check data caching is preferentially selected to respond to the request message; or an index of a unit of virtual check data caching that is not associated with the stream ID is selected.

[0043] One of the methods for providing virtual check data caching according to the first to twenty-seventh aspects of the first aspect of the present application provides a method for providing virtual check data caching according to the twenty-ninth aspect of the first aspect of the present application. If there is no index of a unit of virtual check data caching that is already associated with the stream ID in a request of a unit for allocating virtual check data caching, then an index of a unit of virtual check data caching in an unallocated state is preferentially allocated for it, or an index of a unit of virtual check data caching that is not associated with the stream ID is allocated for it.

[0044] The method for providing virtual check data caching according to the twenty-eighth or twenty-ninth aspect of the first aspect of the present application provides a method for providing virtual check data caching according to the thirtieth aspect of the first aspect of the present application. An index of a unit of check data caching and a write command context are obtained from a received message, and the unit of check data caching is used to calculate check data for data to be written by the write command.

[0045] One of the methods for providing virtual check data caching according to the twenty-eighth to thirty-first aspects of the first aspect of the present application provides a method for providing virtual check data caching according to the thirty-first aspect of the first aspect of the present application. In response to completing the calculation of check data for a corresponding page stripe using an index of a unit of virtual check data caching, the index of the unit of virtual check data caching is also released.

[0046] One of the methods for providing virtual check data caching according to the twenty-eighth to thirty-first aspects of the first aspect of the present application provides a method for providing virtual check data caching according to the thirty-second aspect of the first aspect of the present application. The virtual check data cache table is updated to record that the released unit of virtual check data caching is in an unused state.

[0047] One of the methods for providing virtual check data caching according to the first to thirty-second aspects of the first aspect of the present application provides a method for providing virtual check data caching according to the thirty-third aspect of the first aspect of the present application. A virtual check data cache table is provided for each stream ID.

[0048] One of the methods for providing virtual check data caching according to the first to thirty-third aspects of the present application provides a method for providing virtual check data caching according to the thirty-fourth aspect of the first aspect of the present application, and indexes of units for virtual check data caching are allocated for a stream ID in advance even if there is no write command to be processed yet.

[0049] One of the methods for providing virtual check data caching according to the thirty-third or thirty-fourth aspect of the first aspect of the present application provides a method for providing virtual check data caching according to the thirty-fifth aspect of the first aspect of the present application. The check data cache table includes multiple entries, and each entry is associated with recording the index of the unit of the check data cache, its status, and the index of the unit of the virtual check data cache.

[0050] The method for providing virtual check data caching according to the thirty-fifth aspect of the first aspect of the present application provides a method for providing virtual check data caching according to the thirty-sixth aspect of the first aspect of the present application. The status of the index of the unit of the check data cache includes occupied and unoccupied; for the index of the unit of the check data cache in the occupied state, the data of the check data cache unit corresponding to the index of the unit of the check data cache is moved to the external data cache to make the unit of the check data cache become unoccupied; the index of the unit of the check data cache in the unoccupied state can be allocated to respond to the write command.

[0051] The method for providing virtual check data caching according to the thirty-fifth or thirty-sixth aspect of the first aspect of the present application provides a method for providing virtual check data caching according to the thirty-seventh aspect of the first aspect of the present application. A second virtual check data cache table is also maintained to record the index of the unit of the check data cache or the index of the external data unit corresponding to the index of each unit of the virtual check data cache.

[0052] One of the methods for providing virtual check data caching according to the thirty-third to thirty-seventh aspects of the first aspect of the present application provides a method for providing virtual check data caching according to the thirty-eighth aspect of the first aspect of the present application. Obtain the index of the available unit of the check data cache and the write command context, obtain the index of the unit of the virtual check data cache corresponding to the stream ID in the received write command context, and calculate the check data for the write command context using the unit of the check data cache.

[0053] One of the methods for providing virtual check data caching according to the thirty-third to thirty-eighth aspects of the first aspect of the present application provides a method for providing virtual check data caching according to the thirty-ninth aspect of the first aspect of the present application. Statistically calculate the amount of data written using the index of each unit of the virtual check data cache to identify when the check data corresponding to the index of the unit of the virtual check data cache is calculated and completed.

[0054] One of the methods for providing virtual check data caching according to the thirty-third to thirty-ninth aspects of the first aspect of the present application provides a method for providing virtual check data caching according to the fortieth aspect of the first aspect of the present application, obtaining a stream ID from the acquired message, and allocating an index of a check data caching unit associated with the stream ID for the message.

[0055] One of the methods for providing virtual check data caching according to the thirty-third to fortieth aspects of the first aspect of the present application provides a method for providing virtual check data caching according to the forty-first aspect of the first aspect of the present application, by searching for an index of a virtual check data caching unit associated with the stream ID in the check data cache table, and providing the index of the check data caching unit associated with the index of the virtual check data caching unit together with the write command context to the check data calculation request unit.

[0056] One of the methods for providing virtual check data caching according to the thirty-third to fortieth aspects of the first aspect of the present application provides a method for providing virtual check data caching according to the forty-second aspect of the first aspect of the present application. In response to not finding an index of a virtual check data caching unit associated with the stream ID, an index of an unoccupied check data caching unit is obtained and provided to the check data calculation request unit.

[0057] According to the method for providing virtual check data caching according to the forty-second aspect of the first aspect of the present application, a method for providing virtual check data caching according to the forty-third aspect of the first aspect of the present application is provided. In response to not finding an index of an unoccupied check data caching unit, the data of the check data caching unit corresponding to the index of the check data caching unit is moved to an external data cache to make the check data caching unit become unoccupied.

[0058] One of the methods for providing virtual check data caching according to the forty-first to forty-third aspects of the first aspect of the present application provides a method for providing virtual check data caching according to the forty-fourth aspect of the first aspect of the present application. The check data calculation request unit obtains an index of a virtual check data caching unit corresponding to the stream ID of the received write command context according to the stream ID, and calculates check data for the write command context using the check data caching unit.

[0059] According to the second aspect of the present application, a method for processing a write command according to the first aspect of the second aspect of the present application is provided, including: obtaining a write command; according to the stream ID of the write command, obtaining an index of a check data caching unit associated with the stream ID; using the check data caching unit corresponding to the index of the check data caching unit to calculate check data for the data to be written in the write command; writing the data to be written and / or the check data in the check cache into a storage medium.

[0060] A method for processing a write command according to the second aspect of the present application provides a method for processing a write command according to the second aspect of the present application, binding the index of the unit caching virtual check data to the stream ID.

[0061] A method for processing a write command according to the first or second aspect of the present application provides a method for processing a write command according to the third aspect of the present application. By obtaining the index of the unit caching virtual check data associated with the stream ID, and obtaining the index of the unit caching check data associated with the index of the unit caching virtual check data, as the index of the unit caching check data associated with the stream ID.

[0062] A method for processing a write command according to the third aspect of the present application provides a method for processing a write command according to the fourth aspect of the present application. If there is no unit caching check data associated with the index of the unit caching virtual check data associated with the stream ID, obtain a unit caching check data in an unoccupied state, and use the index of the unit caching check data in the unoccupied state as the index of the unit caching check data associated with the stream ID.

[0063] A method for processing a write command according to the fourth aspect of the present application provides a method for processing a write command according to the fifth aspect of the present application. If there is no unit caching check data in an unoccupied state, move the data of the unit caching check data to an external data cache to make the unit caching check data become unoccupied.

[0064] A method for processing a write command according to the fourth aspect of the present application provides a method for processing a write command according to the sixth aspect of the present application. In response to allocating the index of the unit caching check data to the write command, the unit allocating the check data cache also updates the check data cache table to record therein that the index of the allocated unit caching check data is associated with the index of the unit caching virtual check data associated with the stream ID of the write command.

[0065] According to a third aspect of the present application, a method for processing a write command according to the first aspect of the third aspect of the present application is provided, including: obtaining a write command; according to the stream ID of the write command, obtaining the index of the unit caching virtual check data associated with the stream ID; obtaining an available unit caching check data; using the obtained unit caching check data to calculate check data for the data to be written by the write command; writing the data to be written and / or the check data in the check cache to a storage medium.

[0066] The method for processing a write command according to the first aspect of the present application provides a method for processing a write command according to the second aspect of the present application. The unit for obtaining the available check data cache is the check data cache unit associated with the index of the virtual check data cache unit.

[0067] The method for processing a write command according to the second aspect of the present application provides a method for processing a write command according to the third aspect of the present application. If there is no check data cache unit associated with the index of the virtual check data cache unit, a check data cache unit is also selected, and the check data associated with the index of the virtual check data cache unit is moved to the selected check data cache unit, so that the selected check data cache unit becomes an available check data cache unit.

[0068] One of the methods for processing a write command according to the first to third aspects of the third aspect of the present application provides a method for processing a write command according to the fourth aspect of the third aspect of the present application, further including: binding the index of the virtual check data cache unit to the stream ID.

[0069] One of the methods for processing a write command according to the first to fourth aspects of the third aspect of the present application provides a method for processing a write command according to the fifth aspect of the third aspect of the present application, further including: counting the data volume of the write command corresponding to the index of the virtual check data cache unit associated with the stream ID. If the data volume has reached the threshold, the index of the virtual check data cache unit associated with the stream ID is released.

[0070] According to the fourth aspect of the present application, there is provided an information processing device according to the first aspect of the present application, including a memory, a processor, and a program stored on the memory and executable on the processor. When the processor executes the program, it implements one of the methods for the information processing device according to the first aspect, the second aspect, or the third aspect of the present application described above. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments recorded in the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings.

[0072] Figure 1 A block diagram of a solid-state storage device is shown;

[0073] Figure 2 A schematic diagram of a large block is shown;

[0074] Figure 3Shows a block diagram of relevant parts of a storage device and a parity data cache according to an embodiment of the present application;

[0075] Figure 4 Shows a block diagram of relevant parts of a storage device and a parity data cache according to another embodiment of the present application;

[0076] Figure 5 Shows a block diagram of relevant parts of a storage device and a parity data cache according to another embodiment of the present application;

[0077] Figure 6 Shows a flowchart of using a parity data cache according to an embodiment of the present application;

[0078] Figure 7 Shows a block diagram of relevant parts of a storage device and a parity data cache according to still another embodiment of the present application;

[0079] Figure 8 Shows a block diagram of relevant parts of a storage device and a parity data cache according to yet another embodiment of the present application;

[0080] Figure 9 Shows a flowchart of using a parity data cache according to yet another embodiment of the present application. Detailed implementation manners

[0081] The following describes clearly and completely the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0082] Figure 3 Shows a block diagram of relevant parts of a storage device and a parity data cache according to an embodiment of the present application.

[0083] The control component of the storage device receives the IO commands sent by the host to the storage device. For write commands, the data corresponding to the write commands is written into the NVM chip through the media interface 380. After a series of processes on the write commands, the control component obtains the data to be written into the NVM chip and the address (physical address) indicating the storage location of the data in the NVM chip. It can be understood that the control component may split a single write command into multiple sub-write commands. For simplicity, write commands and sub-commands are collectively referred to as write commands.

[0084] To calculate the check data corresponding to the write command, it is necessary to obtain an available check data cache. The virtual check data request unit 310 requests the allocation of a virtual check data cache. The virtual check data request unit 310 generates a virtual check data cache request message and adds it to the message queue 312. Optionally, the generated virtual check data cache request message includes the context of the write command.

[0085] The virtual check data cache allocation unit 320 retrieves the message from the message queue 312 and accesses the virtual check data cache table 350 to obtain an available virtual check data cache. The virtual check data cache is identified by the virtual check data cache ID.

[0086] The virtual check data cache table 350 includes multiple entries. Each entry is associated with recording the status of one of the virtual check data caches identified by the virtual check data cache ID and the associated check data cache ID or external data cache unit. The status of the virtual check data cache indicates whether the corresponding virtual check cache (or virtual check cache ID) is available. The status of the virtual check cache includes unallocated, allocated and in use, and / or allocated and pending. The virtual check cache in the unused state can be allocated to process the write command. The virtual check cache in the allocated and in use or allocated and pending state cannot be allocated again to process the write command. The virtual check cache in the allocated and in use state is associated with the corresponding check data cache (identified by the check data cache ID), and the virtual check cache in the allocated and pending state is associated with the external data cache unit. The external data cache is, for example, a memory outside the control component and is used to temporarily store the data of the check data cache.

[0087] The check data generation unit 370 includes a check data cache 376. The check data cache 376 includes multiple units (378, 379). Each unit of the check data cache is identified by the check data cache ID. The check data generation unit 370 is capable of moving the data of the units of its check data cache 376 to the external data cache 340 and is also capable of moving the data of the units of the external data cache 340 to the check data cache 376.

[0088] It can be understood that the virtual check data cache table 350 can be stored in other data structures to record the virtual check data cache ID, its status, and its associated check data cache ID / external data cache unit. An available virtual check data cache ID pool can also be used to record the available virtual check data cache IDs.

[0089] The virtual check data cache allocation unit 320, in response to obtaining a virtual check data cache request message from the message queue 312, accesses the virtual check data cache table 350 to find an available virtual check data cache ID. The virtual check data cache allocation unit 320 also obtains an available check data cache ID (a unit representing an available check data cache), records the found available virtual check data cache ID and the obtained available check data cache ID in the virtual check data cache table 350, and updates the status of the available virtual check data cache ID to allocated and in use. The available virtual check cache ID is provided to the check data calculation request unit 360 as a processing result of the virtual check data cache request message. Optionally, the virtual check data cache allocation unit 320 also provides the obtained available check data cache ID together with the available virtual check cache ID to the check data calculation request unit 360. Thus, by using the virtual check cache ID, the check data generation process of the page strip is maintained, and the check data generation unit 370 is operated using the check data cache ID to calculate the check data.

[0090] Optionally, a check data cache table is also maintained, which records whether each unit of the check data cache has an associated virtual check data cache ID. A unit of the check data cache without an associated virtual check data cache ID is available. It can be understood that other data structures can be used to record the usage status of each unit of the data check cache, or the available check data cache ID can be obtained by excluding the units recorded in the virtual check data cache table 350 from all units of the check data cache.

[0091] In some cases, there are no available units in the check data cache. The virtual check data cache allocation unit 320 also moves the data of the used unit (e.g., unit 378) of the check data cache 376 to the external data cache 340, so that the check data cache unit 378 becomes available. Optionally, the virtual check data cache allocation unit 320 sends a data transfer request to the check data generation unit 370. In the data transfer request, the check data cache unit 378 to be transferred and the unit of the external data cache 340 as the data transfer destination are indicated. The index of the check data cache unit 378 is also updated to the unit of the external data cache 340 in the virtual check data cache table 350, and the status of the virtual check data cache ID associated with the check data cache unit 378 is updated to allocated and pending.

[0092] In an alternative embodiment, the virtual check data cache ID is indicated in the virtual check data cache request message retrieved from the message queue 312. The virtual check data cache allocation unit 320 obtains the check data cache ID corresponding to the virtual check data cache ID through the virtual check data cache table 350, and provides the virtual check data cache ID and / or the check data cache ID to the check data calculation request unit 360. If the virtual check data cache table 350 indicates that the virtual check data cache ID is in an allocated and pending state, an available check data cache unit is also obtained, the data of its corresponding external data cache unit is moved to the available check data cache unit, and the virtual check data cache ID and / or the check data cache ID is provided to the check data calculation request unit 360. In addition, the virtual check data cache table 350 is updated to record that the virtual check data cache ID is in an allocated and in-use state and is associated with the available check data cache unit.

[0093] The check data calculation request unit 360 uses the virtual check data cache ID or the check data cache ID to instruct the check data generation unit 370 to calculate the check data.

[0094] In one embodiment, the check data calculation request unit 360 uses the check data cache ID. The check data cache ID is added to the calculation check data request message and provided to the check data generation unit 370. The calculation check data request message also indicates the address of the data to be written. The check data generation unit 370 obtains the data to be written, calculates the check data for the data to be written using the check data cache unit indicated by the check data cache ID, and writes the data to be written to the NVM storage medium through the media interface 380.

[0095] In yet another embodiment, the check data calculation request unit 360 uses the virtual check data cache ID. The check data cache ID corresponding to the virtual check data cache ID is obtained from, for example, the virtual check data cache table 350, and the check data cache ID is added to the calculation check data request message and provided to the check data generation unit 370. If the virtual check data cache table 350 indicates that the virtual check data cache ID is in an allocated and pending state, an available check data cache unit is also obtained, the data of its corresponding external data cache unit is moved to the available check data cache unit, and the check data cache ID indicating the available check data cache unit is added to the calculation check data request message and provided to the check data generation unit 370. In addition, the virtual check data cache table 350 is updated to record that the virtual check data cache ID is in an allocated and in-use state and is associated with the check data cache ID.

[0096] Optionally, the verification data generation unit 370 includes message queues (372, 374). The message queue 372 is used to receive data transfer request messages, and the message queue 374 is used to receive calculation verification data requests. In response to obtaining a data transfer request message from the message queue 372, data is transferred between the units (378, 379) of the verification data cache and the external data cache 340. In response to obtaining a calculation verification data request from the message queue 374, the units of the verification data cache are used to calculate verification data for the data to be written.

[0097] Figure 4 FIG. shows a block diagram of relevant parts of a storage device and a verification data cache according to another embodiment of the present application.

[0098] Same as Figure 3 the embodiment of Figure 4 In the embodiment of, the virtual verification data cache request message generated by the virtual verification data request unit 410 also indicates a stream ID. The stream ID identifies the stream of the multi-stream storage device. Each entry of the virtual verification data cache table 450 also records the stream ID in association with the virtual verification data cache ID to indicate one or more virtual verification cache IDs for each stream.

[0099] According to Figure 4 the embodiment of, when the virtual verification data cache allocation unit 420 allocates a virtual verification data cache ID in response to a virtual verification data cache request message, it tries to allocate the same virtual verification data cache ID for the same stream ID. When allocating a virtual verification data cache ID in an unallocated state for a stream ID, the allocated virtual verification data cache ID is also recorded in the virtual verification data cache table 450 in association with the stream ID.

[0100] Optionally, the relationship between the stream ID and the virtual verification data cache ID is 1 to N, where N is an integer greater than 1. Thus, multiple virtual verification data cache IDs are allocated to the same stream.

[0101] Furthermore, the message provided by the virtual verification data cache allocation unit 420 to the verification data calculation request unit 460 also indicates the stream ID. Thus, the verification data calculation request unit 460 can obtain the verification data cache ID and the stream ID from the message indicated by the virtual verification data cache allocation unit 420, and obtain the data to be written with the same stream ID, and instruct the verification data generation unit to use the verification data cache ID to calculate verification data for the data to be written with the stream ID.

[0102] And also put the data from the same stream into the same large block.

[0103] In one embodiment, the virtual check data request unit 410 allocates virtual check data caches for each write command request. The virtual check data cache request message generated by the virtual check data request unit 410 for each write command includes the stream ID associated with the write command.

[0104] The virtual check data cache allocation unit 420 obtains messages from the message queue 412, accesses the virtual check data cache table 450, and obtains the available virtual check data cache IDs corresponding to the stream ID and the IDs of the available check data caches.

[0105] Optionally, the message obtained by the virtual check data cache allocation unit 420 from the message queue 412 further includes the context of the write command, and the virtual check data cache allocation unit 420 provides the write command context, the stream ID, the available virtual check data cache IDs, and the IDs of the available check data caches to the check data calculation request unit 460 together. Thereby, the check data calculation request unit 460 obtains the data to be written in the write command according to the received write command context, and instructs the check data generation unit to calculate the check data for the data to be written using the check data cache ID specified in the message.

[0106] In yet another embodiment, the virtual check data request unit 410 requests to allocate virtual check data caches, and the allocated virtual check data caches will be used for a group of write commands. The virtual check data cache request message includes the stream ID associated with the group of write commands. Each write command is provided to the check data calculation request unit 460. The virtual check data cache allocation unit 420 obtains the available virtual check data cache IDs and the IDs of the available check data caches according to the stream ID, and provides the stream ID, the available virtual check data cache IDs, and the IDs of the available check data caches to the check data calculation request unit 460 together. Thereby, in response to receiving the write command and the available virtual check data cache IDs (and the IDs of the available check data caches), the check data calculation request unit 460 instructs the check data generation unit 370 to calculate the check data for the data corresponding to the write command using the check data cache unit corresponding to the virtual check data cache ID, where the virtual check data cache ID is associated with the same stream ID as the write command.

[0107] Figure 5 Shows a block diagram of a relevant part of a storage device and a check data cache according to another embodiment of the present application.

[0108] Figure 5 of the embodiment Figure 3 is the same as or substantially the same as that of the embodiment. Compared with the embodiment of Figure 3 the embodiment, according to Figure 5In an embodiment, a flow ID mapping table 464 is also maintained, in which the flow ID and the virtual check data cache ID are recorded in association. Optionally, in the flow ID mapping table 464, the flow ID is associated with one or more virtual check data cache IDs.

[0109] The check data calculation request unit 465 obtains the virtual check data cache ID provided by the virtual check data cache allocation unit 320 for it and optionally the physical check data cache ID. The check data calculation request unit 465 also obtains a write command carrying the flow ID from the message queue 462. The check data calculation request unit 465 accesses the flow ID mapping table 464, identifies the virtual check data cache ID associated with the flow ID of the write command, and instructs the check data generation unit 370 to calculate the check data for the data corresponding to the write command using the check data cache corresponding to the virtual check data cache ID. If there is no record of a certain flow ID of the write command obtained from the message queue 462 in the flow ID mapping table 464, an available virtual check data cache ID is also specified for the flow ID and recorded in the flow ID mapping table 464.

[0110] Thus, the check data calculation request unit 465 calculates the check data for the data to be written with the same flow ID using one or more check data cache units associated with the same flow ID.

[0111] Optionally, the available virtual check data cache IDs (and / or available check data cache IDs) are recorded in the flow ID mapping table 464. The check data calculation request unit 465 allocates an available virtual check data cache for the flow ID according to the flow ID indicated by the write command and records it in the flow ID mapping table 464. And when a write command with the flow ID is received again next time, according to the flow ID of the write command, it obtains the virtual check data cache ID (and / or available check data cache ID) associated with the same flow ID from the flow ID mapping table 464.

[0112] Figure 6 Shows a flowchart of using the check data cache according to an embodiment of the present application.

[0113] The virtual check data cache request unit applies to the virtual check data cache allocation unit for a virtual check data cache (610).

[0114] In one embodiment, the virtual check data cache request unit applies for a virtual check data cache for each write command. In another example, the virtual check data cache request unit applies for a virtual check data cache for a group of write commands. In still another example, the virtual check data cache request unit actively applies for a virtual check data cache without depending on the existence of the write command to be processed.

[0115] The virtual check data cache allocation unit allocates an available virtual check data cache ID (620) for the request in response to the request.

[0116] In one embodiment, the virtual check data cache allocation unit allocates a virtual check data cache ID in an unused state. In another embodiment, the virtual check data cache allocation is a virtual check data cache ID in an allocated and in-use state or an allocated and pending state. In still another embodiment, the virtual check data cache allocation unit selects which state of the virtual check data cache ID to allocate according to the indication of the received request. If the received request indicates to allocate a virtual check data cache in an unused state or a virtual check data cache ID in a used state. In yet another embodiment, the virtual check data cache allocation unit extracts the stream ID from the received request and allocates the virtual check data cache ID according to the stream ID.

[0117] The virtual check data cache allocation unit also obtains an available check data cache unit (indicated by the check data cache ID) (630).

[0118] If the virtual check data cache table records the check data cache ID corresponding to the virtual check data cache ID obtained in step 620, use this check data cache ID as the available check data cache unit. If the virtual check data cache table records an external data cache unit or an unused virtual check data cache ID corresponding to the virtual check data cache ID obtained in step 620, an available check data cache unit is also allocated. By way of example, the virtual check data cache allocation unit maintains the state of each check data cache unit to identify the available check data cache unit. If there is no available check data cache unit, one of the check data cache units is also selected, and the data therein is moved to the external data cache so that this check data cache unit becomes an available check data cache.

[0119] The virtual check data cache allocation unit provides the available virtual check data cache ID, the available check data cache ID, the stream ID, and / or the write command context to the check data calculation request unit.

[0120] The check data calculation request unit instructs the check data generation unit to calculate the check data for the data to be written by the write command using the check data cache corresponding to the check data cache ID, and initiates a programming operation (640).

[0121] In one embodiment, the verification data calculation request unit obtains the write command context and the verification data cache ID from the message provided by the virtual verification data cache allocation unit, and instructs the verification data generation unit to calculate the verification data for the data to be written by the write command using the verification data cache corresponding to the verification data cache ID. In another embodiment, the verification data calculation request unit obtains the verification data cache ID from the message provided by the virtual verification data cache allocation unit, and additionally receives the write command context, and instructs the verification data generation unit to calculate the verification data for the data to be written by the write command using the verification data cache corresponding to the verification data cache ID. In another embodiment, the verification data calculation request unit further obtains the stream ID associated with the virtual verification data cache ID from the message provided by the virtual verification data cache allocation unit, and the stream ID indicated according to the write command context, and instructs the verification data generation unit to use the verification data cache corresponding to the verification data cache ID having the same stream ID as the stream ID indicated by the write command to calculate the verification data for the data to be written by the write command.

[0122] The verification data generation unit calculates the verification data (650) for the data to be written indicated in the message using the verification data cache specified in the message according to the message provided by the verification data calculation request unit. And writes the data to be written or the verification data in the verification cache into the NVM storage medium (660) by using the media interface of the control component.

[0123] Figure 7 A block diagram of a relevant part of a storage device and a verification data cache according to still another embodiment of the present application is shown.

[0124] Same as Figure 3 the embodiment of Figure 7 In the embodiment of

[0125] The virtual verification data cache allocation unit 720 accesses the virtual verification data cache table 750 to obtain an available virtual verification data cache ID.

[0126] The virtual verification data cache table 750 includes multiple entries. Each entry also records a verification data cache ID or an index of an external data cache unit in association with a virtual verification data cache ID. If the entry of the virtual verification data cache table 750 records a verification data cache ID, it indicates that the virtual verification data cache ID of this entry is in an allocated and in-use state. If the entry of the virtual verification data cache table 750 records an index of an external data cache unit, it indicates that the virtual verification data cache ID of this entry is in an allocated and suspended state. If the entry of the virtual verification data cache table 750 records neither a verification data cache ID nor an index of an external data cache unit, it indicates that the virtual verification data cache ID of this entry is in an unallocated state.

[0127] If the available virtual verification data cache ID found is already associated with a verification data cache ID, the virtual verification data cache allocation unit 720 provides this virtual verification data cache ID and the verification data cache ID to the verification data calculation request unit 760 together. If the available virtual verification data cache ID found is not associated with a verification data cache ID, the virtual verification data cache allocation unit 720 provides this available virtual verification data cache ID to the verification data cache allocation unit 725 to obtain an available verification data cache ID.

[0128] The verification data cache allocation unit 725, for example, in response to a request for an available verification data cache ID, selects a unit of the verification data cache 776. As an example, the selected unit is 778. It moves the data of the unit 778 of the verification data cache 776 to the external data cache 740 to make the unit 778 of the verification data cache 776 available. It can send the received available virtual verification data cache ID and the verification data cache ID associated with the unit 778 of the verification data cache 776 to the verification data calculation request unit 760 together. It also updates the virtual verification data cache table 750 to record that the virtual verification cache ID originally associated with the unit 778 is now associated with the unit of the external data cache 740.

[0129] The verification data request unit 760 uses the verification data cache ID received from the virtual verification data cache allocation unit 720 or the verification data cache allocation unit 725 to instruct the verification data generation unit 770 to calculate verification data for the data to be written to the NVM storage medium.

[0130] Optionally, when the virtual verification data cache allocation unit 720 allocates a virtual verification data cache ID in response to a virtual verification data cache request message, it endeavors to allocate the same virtual verification data cache ID for virtual verification data cache request messages with the same stream ID. When allocating a virtual verification data cache ID in an unallocated state for a stream ID, the allocated virtual verification data cache ID is also recorded in the virtual verification data cache table 750 in association with the stream ID.

[0131] In one implementation, the virtual verification data request unit 710 requests a virtual verification data cache for each write command, generates a virtual verification data cache request message, and also indicates the stream ID corresponding to the write command in the virtual verification data cache request message. The request message also indicates the write command context. The virtual verification data cache allocation unit 720 obtains the stream ID from the received request message and selects a virtual verification data cache ID according to the stream ID (from the virtual verification data cache table 750). For example, if the stream ID S1 is obtained from the request message, if there is a virtual verification data cache ID that has been associated with the stream ID S1 and is in an allocated and in-use state, then this virtual verification data cache ID is preferentially selected to respond to the request message; or a virtual verification data cache ID associated with the stream ID S1 is selected. If there is no virtual verification data cache ID associated with the stream ID S1, then a virtual verification data cache ID in an unallocated state is preferentially allocated for it, or a virtual verification data cache ID not associated with the stream ID S1 is allocated for it.

[0132] The virtual verification data cache allocation unit 720 provides the obtained available virtual verification data cache ID and the verification data cache ID to the verification data calculation request unit 760, or requests the verification data cache allocation unit 725 to obtain an available verification data cache ID when there is no verification data cache ID.

[0133] The verification data calculation request unit 760 obtains the verification data cache ID and the write command context from the received message, and instructs the verification data generation unit 770 to calculate the verification data for the data to be written by the write command using the verification data cache ID.

[0134] Furthermore, in response to completing the calculation of the verification data for the corresponding page stripe using the virtual verification data cache ID, the virtual verification data cache request unit 710 also generates a message indicating the release of the virtual verification data cache ID and provides it to the virtual verification data cache allocation unit 720. Accordingly, the virtual verification data cache allocation unit 720 updates the virtual verification data cache table 750 to record that the released virtual verification data cache ID is in an unused state.

[0135] Figure 8Shows a block diagram of a relevant part of a storage device related to a parity data cache according to yet another embodiment of the present application.

[0136] According to Figure 8 the embodiment of, the virtual parity data cache allocation unit 820 allocates a virtual parity data cache ID to each stream and provides it to the parity data calculation request unit 860.

[0137] In one example, after the storage device is initialized, the virtual parity data cache allocation unit 820 establishes a binding relationship between the virtual parity data cache ID and the stream ID and records it in the virtual parity data cache table 850. The virtual parity data cache table 850 includes multiple entries, and each entry records the virtual parity data cache ID and the stream ID associated with it.

[0138] In yet another example, the virtual parity data cache allocation unit 820 maintains a dynamic association relationship between the virtual parity data cache ID and the stream ID. In response to a message for allocating a virtual parity data cache ID for a specified stream ID obtained from the message queue 812, an available virtual parity data cache ID is obtained and recorded in the virtual parity data cache table 850 in association with the stream ID. Affected by the message for releasing the virtual parity data cache ID obtained from the message queue 812, the association relationship between the virtual parity data cache ID and the stream ID recorded in the virtual parity data cache table 850 is cleared.

[0139] Optionally, in Figure 8 the implementation manner of, a virtual parity data cache table is provided for each stream ID. For example, the virtual parity data cache table 850 is for stream ID1, the virtual parity data cache table 852 is for stream ID2, and the virtual parity data cache table 854 is for stream ID3. If a message obtained from the message queue 812 specifies to allocate a virtual parity data cache ID for stream ID 1, the virtual parity data cache table 850 is accessed to obtain an available virtual parity data cache ID.

[0140] Allocating a virtual parity data cache ID for a stream ID may not depend on receiving a write command. Even if there is no pending write command, a virtual parity data cache ID is allocated for the stream ID for standby.

[0141] The write commands are provided to the parity data cache allocation unit 825 by the message queues (826, 827, 828). The messages in the message queues (826, 827, 828) indicate the context of the write commands, and the messages also indicate the stream ID associated with the write commands. Optionally, write commands with different stream IDs are provided to different message queues. For example, the write command with stream ID 1 is provided to the message queue 826, the write command with stream ID 2 is provided to the message queue 827, and the write command with stream ID 3 is provided to the message queue 828.

[0142] The verification data cache unit 825 obtains messages from the message queues (826, 827, 828) and assigns available verification data cache IDs thereto.

[0143] In one implementation, the verification data cache allocation unit 825 maintains a verification data cache table 862. The verification data cache table 826 includes a plurality of entries, and each entry is associated with a record of a verification data cache ID, its status, and a virtual verification data cache ID. The status of the verification data cache ID includes, for example, occupied and unoccupied. A verification data cache ID in the unoccupied state can be allocated in response to a write command. For a verification data cache ID in the occupied state, optionally, the data of the verification data cache unit corresponding to the verification data cache ID is moved to the external data cache 840 to make the verification data cache ID become unoccupied. And a second virtual verification data cache table 864 is also maintained to record the verification data cache ID or the index of the external data unit corresponding to each virtual verification data cache ID.

[0144] The verification data cache allocation unit 825 provides an available verification data cache ID and a write command context to the verification data calculation request unit 860. The verification data calculation request unit 860 obtains the virtual verification data cache ID corresponding to the stream ID according to the stream ID of the received write command context, and instructs the verification data generation unit 870 to calculate the verification data for the write command context using the verification data cache ID. It also counts the amount of data written using each virtual verification data cache ID to identify when the verification data corresponding to the virtual verification data cache ID is calculated.

[0145] Optionally or further, the message obtained from the message queues (826, 827, 828) also indicates a stream ID, such as stream ID 1. The check data cache allocation unit 825 allocates a check data cache ID associated with stream ID 1 for this message. By looking up the virtual check data cache ID associated with stream ID 1 in the check data cache table 862, and providing the check data cache ID associated with this virtual check data cache ID together with the write command context to the check data calculation request unit 860. If the virtual check data cache ID associated with stream ID 1 cannot be found, then obtain an unoccupied check data cache ID and provide it to the check data calculation request unit 860. If an unoccupied check data cache ID cannot be found either, then move the data of the check data cache unit corresponding to the check data cache ID to the external data cache 840 to make this check data cache ID unoccupied. The check data calculation request unit 860 obtains the virtual check data cache ID corresponding to the stream ID according to the stream ID of the received write command context, and instructs the check data generation unit 870 to calculate the check data for this write command context using this check data cache ID.

[0146] Figure 9 Shows a flowchart of using a check data cache according to yet another embodiment of the present application.

[0147] The virtual check data cache allocation unit binds the virtual check data cache ID to the stream ID (910). Thus, write commands with the same stream ID are processed using the same virtual check data cache ID.

[0148] In one example, after the storage device is initialized, the virtual check data cache allocation unit establishes a binding relationship between the virtual check data cache ID and the stream ID, and records it in the virtual check data cache table. In another example, the virtual check data cache allocation unit maintains a dynamic association relationship between the virtual check data cache ID and the stream ID.

[0149] The check data cache allocation unit receives a write command, and the write command indicates a stream ID (920). The check data cache allocation unit obtains a check data cache ID (924) associated with the stream ID indicated by the write command. For example, finding a virtual check data cache ID associated with the stream ID indicated by the write command, and allocating the check data cache ID associated with the virtual check data cache ID in the check data cache table (862) to the write command. If the virtual check data cache ID associated with the stream ID indicated by the write command is not recorded in the check data cache table (862), obtain an unoccupied check data cache ID and allocate it to the write command. If an unoccupied check data cache ID cannot be found either, move the data in the check data cache unit corresponding to the check data cache ID to the external data cache to make the check data cache ID unoccupied (922). In response to allocating the check data cache ID to the write command, also update the check data cache table (862) to record in it that the allocated check data cache ID is associated with the virtual check data cache ID associated with the stream ID of the write command.

[0150] The virtual check data cache allocation unit provides the binding relationship between the virtual check data cache ID and the stream ID to the check data calculation request unit. The check data cache allocation unit provides the check data cache ID indicating the allocated check data cache unit to the check data calculation request unit.

[0151] The check data request unit instructs the check data generation unit to calculate the check data for the data to be written by the write command using the check data cache corresponding to the check data cache ID, and initiates a programming operation (930). Also, count the data volume of the check data that has been calculated using each virtual check data cache ID to identify when the check data corresponding to the virtual check data cache ID is calculated.

[0152] The check data generation unit calculates the check data for the data to be written indicated in the message using the check data cache unit specified in the message according to the message provided by the check data calculation request unit (940). And write the data to be written or the check data in the check cache into the NVM storage medium using the media interface of the control component (950).

[0153] Although the preferred embodiments of the present application have been described, additional changes and modifications can be made to these embodiments by those skilled in the art once they learn the basic creative concept. Therefore, the appended claims are intended to be construed to include the preferred embodiments as well as all changes and modifications that fall within the scope of the present application. Obviously, those skilled in the art can make various changes and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.

Claims

1. A method for providing virtual verification data caching, characterized in that, Including: Obtaining a request for a unit that allocates a virtual check data cache; Obtaining a first unit of the available virtual check data cache; Obtaining a first unit of the available check data cache, and recording the association relationship between the obtained first unit of the virtual check data cache and the first unit of the check data cache; Responding to the request for the unit that allocates the virtual check data cache with the first unit of the virtual check data cache and / or the first unit of the check data cache; Wherein, the unit state of the virtual check data cache includes unallocated, allocated and in use and / or allocated and pending; the virtual check cache in the unallocated state can be allocated to process write commands; the virtual check cache in the allocated and in use or allocated and pending state cannot be allocated again to process write commands; Wherein, it further includes that in response to the virtual check data cache table indicating that the first unit of the virtual check data cache is in the allocated and pending state, further obtaining a third unit of the available check data cache, moving the data of its corresponding external data cache unit to the third unit of the available check data cache, and providing the index of the first unit of the virtual check data cache and / or the index of the third unit of the check data cache to the check data calculation request unit.

2. The method according to claim 1, wherein Using a virtual check data cache table to record the association relationship between the unit of the virtual check data cache and the unit of the check data cache; the virtual check data cache table includes multiple entries, and each entry is associated with recording the state of the unit of the virtual check data cache identified by each index of the virtual check data cache and the index of the unit of the check data cache or the external data cache unit associated with it.

3. The method according to claim 1 or 2, characterized in that, It further includes requesting to calculate check data using the index of the first unit of the virtual check data cache or the index of the first unit of the check data cache.

4. The method according to claim 3, characterized in that, It further includes obtaining the data to be written, calculating check data for the data to be written using the first unit of the check data cache, and writing the data to be written to the storage medium.

5. The method according to claim 1, wherein The request for the unit that allocates the virtual check data cache also indicates a stream ID, and the stream ID identifies the stream of the multi-stream storage device.

6. The method according to claim 5, wherein The entry of the virtual check data cache table is associated with the index of the unit of the virtual check data cache to record the stream ID, so as to indicate the index of one or more units of the virtual check cache used for each stream.

7. The method according to claim 5, characterized in that, When obtaining the index of the unit of the available virtual check data cache, allocate the same index of the unit of the virtual check data cache for the requests for the units that allocate the virtual check data cache with the same stream ID.

8. The method according to claim 5, characterized in that Obtaining the index of the associated unit of the check data cache and the stream ID from the received message, and obtaining the data to be written with the same stream ID, and calculating check data for the data to be written with the same stream ID using the unit of the check data cache.

9. The method according to claim 5, wherein The request for the unit that allocates the virtual check data cache generated for each write command includes the stream ID associated with the write command, and obtaining the index of the unit of the available virtual check data cache corresponding to the stream ID and / or the index of the available unit of the check data cache to respond to the request for the unit that allocates the virtual check data cache.

10. An information processing device, comprising a memory, a processor, and a program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method for an information processing device according to any one of claims 1 to 9 above.

Citation Information

Patent Citations

  • Method and apparatus for organizing page strip data and writing data to page strips

    CN108877862B

  • Virtual storage

    US20170371782A1