Virtual parity data cache for storage devices

Through the virtual check data cache method, the use of check data cache in solid-state storage devices is optimized, solving the problem of check data cache capacity limitation, achieving write support for more page stripes and improving storage efficiency.

CN111367825BActive Publication Date: 2024-09-03MEMBLAZE TECH BEIJING
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN201811602676.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-12-26
Publication Date
2024-09-03
Estimated Expiration
2038-12-26

AI Technical Summary

Technical Problem

The check data cache capacity of the check data generation unit in solid-state storage devices is limited by the chip area of ​​the control component and cannot effectively support a variety of IO commands, resulting in the inability to meet the writing requirements for more page strips and increasing chip costs. .

Method used

Adopting the virtual verification data cache method, by allocating and managing virtual verification data cache units, utilizing the transfer between the external data cache and the verification data cache, optimizing the use of the verification data cache, ensuring that the limited verification data cache capacity More virtual check data cache units are provided below.

Benefits of technology

Without significantly increasing the cost of the control component chip, it provides more virtual check data cache units, supports more page strips to write data, and improves the storage efficiency of solid-state storage devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111367825B
    Figure CN111367825B
Patent Text Reader

Abstract

The present application discloses a method for providing a virtual verification data cache, which relates to the technical field of storage devices and solves the technical problem that the verification data cache is limited by the area of ​​the chip of the control component. The method for providing a virtual verification data cache of the present application includes: obtaining a request for allocating a unit of the virtual verification data cache; allocating the index of the first unit of the available virtual verification data cache from the virtual verification data cache table; allocating the first unit of the verification data cache from the verification data cache; updating the virtual verification data cache table, recording the first unit index of the allocated virtual verification data cache and the index of the first unit of the verification data cache; responding to the request for allocating a unit of the virtual verification data cache with the first unit index of the virtual verification data cache.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to storage technology, and in particular to a virtual verification data cache for a storage device. Background Art

[0002] Figure 1 The block diagram of the solid-state storage device is shown. The solid-state storage device 102 is coupled to the host to provide storage capacity 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 connecting 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, Fiber Channel, wireless communication network, etc. The host can be an information processing device that can communicate with the storage device in the above manner, such as 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 a DRAM (Dynamic Random Access Memory) 110 .

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

[0004] The interface 103 may be adapted to exchange data with the host via, 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 leveling, bad block management, etc. The control component 104 can be implemented in a variety of 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, in which software is executed to manipulate the hardware of the control component 104 to process IO (Input / Output) commands. The control component 104 can also be coupled to the DRAM 110 and can access the data of the DRAM 110. The data of the FTL table and / or cached IO commands can be stored in the DRAM.

[0006] The control component 104 includes a flash memory interface controller (or referred to as a media interface, a media interface controller, or a flash memory channel controller), which is coupled to the NVM chip 105 and issues commands to the NVM chip 105 in a manner that complies with the interface protocol of the NVM chip 105 to operate the NVM chip 105, and receives command execution results output from the NVM chip 105. Known NVM chip interface protocols include "Toggle", "ONFI", and the like.

[0007] In the storage device, the FTL (Flash Translation Layer) is used to maintain the mapping information from the logical address to the physical address. The logical address constitutes the storage space of the solid-state storage device perceived by the upper-layer software such as the operating system. The physical address is the address used to access the physical storage unit of the solid-state storage device. In the related art, the address mapping can also be implemented using the intermediate address form. For example, the logical address is mapped to the intermediate address, and then the intermediate address is further mapped to the physical address. In these cases, the read / write command received by the storage device indicates the logical address.

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

[0009] Some storage devices' FTLs are provided by the host to which the storage device is coupled, with the host's memory storing the FTL table and the host's CPU executing software to provide the FTL. Other storage management devices provided by some storage management devices between the host and the storage device provide the FTL. In these cases, the read / write commands received by the storage device indicate physical addresses.

[0010] The command 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 change the form of the command received from the interface 103 (for example, split the command according to the size of the logical address space corresponding to the FTL entry) and process the changed form of the command.

[0011] The storage device includes multiple NVM chips. Each NVM chip includes one or more dies (DIEs) or logic units (LUNs). The dies or logic units can respond to read and write operations in parallel. Multiple read, write or erase operations on the same die or logic 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 a physical block for the large block. As an example, a large block is constructed on every 16 logical units (LUNs). Each large block includes 16 physical blocks from each of the 16 logical units (LUNs). Figure 2 In the example of FIG. 1 , chunk 0 includes physical chunk 0 from each of the 16 logical units (LUNs), and chunk 1 includes physical chunk 1 from each logical unit (LUN). There are many other ways to structure chunks.

[0013] As an optional way, page stripes are constructed in large blocks, and physical pages with the same physical address in each logical unit (LUN) constitute a "page stripe". Figure 2 In , physical page P0-0, physical page P0-1 ... and physical page P0-x constitute page stripe 0, wherein physical page P0-0, physical page 0-1 ... physical page P0-14 are used to store user data, and physical page P0-x is used to store check data calculated based on all user data in the stripe. Similarly, Figure 2 In FIG. 2 , physical page P2-0, physical page P2-1, ... and physical page P2-x constitute page stripe 2. Optionally, the physical page for storing the check data may be located at any position in the page stripe.

[0014] To write data to a page stripe, the control unit (104) of the solid-state storage device (see Figure 1 ) provides a verification data generation unit. Taking the calculation of verification data by XOR operation as an example, for N+1

[0015] A page stripe of (N=15) physical pages calculates XOR (e.g., (P0-0) XOR (P0-1) XOR (P0-2) XOR ... XOR (P0-(N-1))) for the user data of N physical pages, and writes the calculation result to the physical page (e.g., P0-x) storing the check data for the page stripe. In addition to the XOR operation, error correction codes such as BCH code and RS code are also used to generate the check data.

[0016] Optionally, a plurality of check data generation units (e.g., M) are provided in the control component (104) to simultaneously write data to the M page stripes. The check data generation unit includes a check data cache for storing 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 a Chinese patent application with application number 201710326110.0 and invention name as data organization of page stripes and method and device for writing data to page stripes. Summary of the invention

[0017] The check data cache capacity of the check data generation unit is limited by the area of ​​the chip providing the control component, and the diversity of the IO command applications that generate access to the storage device causes the control component to write data to more page stripes in parallel. For example, it is desired to mark data from different applications as different streams and write data from different streams to different page stripes. In turn, it is necessary to use more check data caches without significantly increasing the cost of the chip providing the control component.

[0018] 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, comprising: obtaining a request for allocating a unit of a virtual check data cache; allocating an index of a first unit of an available virtual check data cache from a virtual check data cache table; allocating a first unit of a check data cache from a check data cache; updating the virtual check data cache table, recording therein the allocated first unit index of the virtual check data cache and the index of the first unit of the check data cache; and responding to the request for allocating a unit of the virtual check data cache with the first unit index of the virtual check data cache.

[0019] According to the first method of providing a virtual verification data cache according to the first aspect of the present application, there is provided a second method of providing a virtual verification data cache according to the first aspect of the present application, obtaining a write command to write first data, obtaining an index of a first unit of the virtual verification data cache allocated for the first data; obtaining the first unit of the virtual verification data cache, using the first unit of the verification data cache to generate verification data for the data to be written by the write command, and storing the generated verification data in the first unit of the verification data cache; and writing the first data into the NVM chip.

[0020] According to the second method of providing a virtual verification data cache according to the first aspect of the present application, a third method of providing a virtual verification data cache according to the first aspect of the present application is provided, and also includes: writing the verification data of the first unit of the verification data cache into the NVM chip.

[0021] According to the third method of providing virtual verification data cache according to the first aspect of the present application, there is provided a method of providing virtual verification data cache according to the fourth method of providing virtual verification data cache according to the first aspect of the present application, the method also includes: after the first page stripe is fully written, releasing the unit of the virtual verification data cache allocated to the first page stripe.

[0022] According to one of the first to fourth methods of providing a virtual check data cache of the first aspect of the present application, there is provided a method of providing a virtual check data cache according to the fifth method of providing a virtual check data cache of the first aspect of the present application, in response to the check data cache having no allocable check data cache unit, selecting a second unit of the check data cache; moving data in the second unit of the check data cache to the second unit of the external data cache; recording the index of the first unit of the virtual check data cache and the index of the second unit of the check data cache in a virtual check data cache table in association; and responding to a request for a unit of the virtual check data cache with the first virtual check data cache ID.

[0023] According to the fifth method of the first aspect of the present application, a method of providing a virtual verification data cache is provided, and according to the sixth method of the first aspect of the present application, it also includes: updating the virtual verification data cache table to record the index of the second unit of the virtual verification data cache and the index of the second unit of the external data cache in association.

[0024] According to the fifth or sixth method of the first aspect of the present application, a method of providing a virtual verification data cache is provided according to the seventh method of the first aspect of the present application, and a verification data cache unit that has not been used recently of the verification data cache is selected, or a verification data cache with the lowest frequency of use is selected as the second unit of the verification data cache.

[0025] According to one of the methods for providing a virtual verification data cache from the first to the seventh aspects of the first aspect of the present application, there is provided a method for providing a virtual verification data cache according to the eighth aspect of the first aspect of the present application, further comprising: obtaining a request for using a second unit of the virtual verification data cache; querying a virtual verification data cache table with an index of the second unit of the virtual verification data cache, wherein the virtual verification data cache table records the index of the second unit of the virtual verification data cache and the index of the second unit of the verification data cache in association with each other; and responding to a request for using the second unit of the virtual verification data cache with an index of the second unit of the virtual verification data cache.

[0026] According to the eighth aspect of the first aspect of the present application, a method for virtual verification data cache is provided. According to the ninth aspect of the first aspect of the present application, a method for virtual verification data cache is provided. If the index of a unit not of the verification data cache is recorded in the virtual verification data cache table in association with the index of the second unit of the virtual verification data cache, the third unit of the verification data cache is selected; the data in the third unit of the verification data cache is moved to the third unit of the external data cache; the data of the second unit of the external data cache is moved to the third unit of the verification data cache; the index of the second unit of the virtual verification data cache and the index of the third unit of the verification data cache are recorded in association in the virtual verification data cache table; and a request to use the second unit of the virtual verification data cache is responded to with the index of the second unit of the virtual verification data cache.

[0027] According to the ninth method of the first aspect of the present application, a method for virtual verification data caching is provided, and according to the tenth method of the first aspect of the present application, a third unit of the external data cache is associated with the third unit of the virtual verification data cache, and the index of the third unit of the virtual verification data cache recorded in the virtual verification data cache table is associated with the index of the third unit of the verification data cache.

[0028] According to the ninth or tenth method of the first aspect of the present application, a method of providing a virtual verification data cache is provided. According to the eleventh method of the first aspect of the present application, a second unit of the external data cache is associated with the second unit of the virtual verification data cache.

[0029] According to one of the methods for providing a virtual check data cache according to the ninth to eleventh aspects of the first aspect of the present application, there is provided a method for providing a virtual check data cache according to the twelfth aspect of the first aspect of the present application. In response to moving data in the third unit of the check data cache to the third unit of the external data cache, the virtual check data cache table is also updated to record the index of the second unit of the virtual check data cache and the index of the second unit of the external data cache in association.

[0030] According to one of the methods for providing a virtual verification data cache in the eighth to twelfth aspects of the first aspect of the present application, there is provided a method for providing a virtual verification data cache in the thirteenth aspect of the first aspect of the present application, if the index of a unit other than the verification data cache is recorded in the virtual verification data cache table in association with the index of the second unit of the virtual verification data cache, a free fourth unit of the verification data cache is selected; data of the second unit of the external data cache is moved to the fourth unit of the verification data cache; the index of the second unit of the virtual verification data cache and the index of the fourth unit of the verification data cache are recorded in association in the virtual verification data cache table; and a request to use the second unit of the virtual verification data cache is responded to with the index of the second unit of the virtual verification data cache.

[0031] According to one of the first to thirteenth methods of providing virtual verification data cache in the first aspect of the present application, there is provided a method of providing virtual verification data cache in the fourteenth method of the first aspect of the present application, and the units of the virtual verification data cache correspond one-to-one to the page stripes to which data are being written.

[0032] According to the first method of providing a virtual check data cache according to the first aspect of the present application, there is provided a method of providing a virtual check data cache according to the fifteenth method of the first aspect of the present application, which also includes: in response to the check data cache having no allocable check data cache unit, selecting a second unit of the check data cache; instructing the check data generation unit to move the data in the second unit of the check data cache to the second unit of the external data cache; recording the index of the first unit of the virtual check data cache and the index of the second unit of the check data cache in a virtual check data cache table in association; and responding to a request for a unit of the virtual check data cache with the first virtual check data cache ID.

[0033] According to the fifteenth aspect of the first aspect of the present application, a method for virtual verification data caching is provided. According to the sixteenth aspect of the first aspect of the present application, a method for virtual verification data caching is provided, which also includes: obtaining a request for using the second unit of the virtual verification data cache; querying a virtual verification data cache table with the index of the second unit of the virtual verification data cache, wherein the virtual verification data cache table records the index of the second unit of the virtual verification data cache and the index of the second unit of the verification data cache in association; responding to the request for using the second unit of the virtual verification data cache with the index of the second unit of the virtual verification data cache.

[0034] According to the sixteenth aspect of the first aspect of the present application, a method for virtual verification data cache is provided. According to the seventeenth aspect of the first aspect of the present application, a method for virtual verification data cache is provided. If the index of a unit not of the verification data cache is recorded in the virtual verification data cache table in association with the index of the second unit of the virtual verification data cache, the third unit of the verification data cache is selected; the verification data generation unit is instructed to move the data in the third unit of the verification data cache to the third unit of the external data cache; the verification data generation unit is instructed to move the data of the second unit of the external data cache to the third unit of the verification data cache; the index of the second unit of the virtual verification data cache and the index of the third unit of the verification data cache are recorded in association in the virtual verification data cache table; and a request to use the second unit of the virtual verification data cache is responded to with the index of the second unit of the virtual verification data cache.

[0035] A method for providing a virtual check data cache is provided according to item 16 or 17 of the first aspect of the present application. A method for providing a virtual check data cache is provided according to item 18 of the first aspect of the present application. If the index of a unit not of the check data cache is recorded in the virtual check data cache table in association with the index of the second unit of the virtual check data cache, a free fourth unit of the check data cache is selected; the check data generation unit is instructed to move the data of the second unit of the external data cache to the fourth unit of the check data cache; the index of the second unit of the virtual check data cache and the index of the fourth unit of the check data cache are recorded in association in the virtual check data cache table; and a request to use the second unit of the virtual check data cache is responded to with the index of the second unit of the virtual check data cache.

[0036] According to the second aspect of the present application, a first solid-state storage device according to the second aspect of the present application is provided, which executes the method for providing virtual verification data cache according to the first aspect of the present application.

[0037] According to a third aspect of the present application, a program is provided comprising program code, which, when loaded into a storage device and executed on the storage device, causes the storage device to perform the method for providing a virtual verification data cache according to the first aspect of the present application.

[0038] The method of virtual verification data caching provided in the present application enables the verification data cache to be unrestricted by the area of ​​the control component chip when the verification data generation unit provides limited verification data cache, thereby providing a larger number of virtual verification data caches for processing IO commands. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0040] Figure 1 shows a block diagram of a solid-state storage device;

[0041] Figure 2 A schematic diagram of the bulk is shown;

[0042] Figure 3 A block diagram of providing a virtual check data cache according to an embodiment of the present application is shown;

[0043] Figure 4 A schematic diagram of providing a virtual verification data cache according to an embodiment of the present application is shown;

[0044] Figure 5A flowchart of providing a virtual check data cache according to an embodiment of the present application is shown;

[0045] Figure 6 A schematic diagram of providing a virtual verification data cache according to yet another embodiment of the present application is shown;

[0046] Figure 7 A schematic diagram of providing a virtual check data cache according to another embodiment of the present application is shown;

[0047] Figure 8 A flowchart of providing a virtual check data cache according to yet another embodiment of the present application is shown;

[0048] Fig. 9 A flowchart of providing a virtual verification data cache according to yet another embodiment of the present application is shown;

[0049] Fig.10 A flow mapping table according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0050] The following is a clear and complete description of the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0051] Figure 3 A block diagram of providing a virtual check data cache according to an embodiment of the present application is shown.

[0052] Control components (see also Figure 1 , the control component 103) includes a command processing unit 305, a virtual verification data generation unit 310, a verification data generation unit 320 and a medium interface 370. The command processing unit 305, the virtual verification data generation unit 310, the verification data generation unit 320 and the medium interface 370 can all be implemented by a CPU, dedicated hardware or a combination thereof. A virtual verification data cache table 350 is also maintained in the internal memory of the control component.

[0053] The command processing unit 305 receives the IO command sent by the host to the storage device. For a write command, the data corresponding to the write command is written into the NVM chip through the medium interface 370.

[0054] According to an embodiment of the present application, the command processing unit 305 uses a virtual check data cache to write data to a page stripe. The capacity of the virtual check data cache that can be used by the command processing unit 305 is much larger than the capacity of the check data cache 328 owned by the check data generation unit 320. In the process of writing the data corresponding to the write command to the NVM chip through the media interface 370, the check data generation unit 320 performs, for example, an XOR operation on the data corresponding to the write command and the data of the specified cache unit of the check data cache 328, and the result of the XOR operation is used to update the specified cache unit. And the command processing unit 305 also instructs the data of the specified cache unit of the check data cache 328 to be written to the NVM chip through the media interface 370 as the check data of the page stripe.

[0055] The virtual verification data generation unit 310 manages the virtual verification data cache for the command processing unit 305, so that the command processing unit 305 does not need to worry about the difference in capacity between the virtual verification data cache and the verification data cache 328, and uses the verification data generation unit 320 to generate verification data for the unit of the virtual verification data cache used by the command processing unit 305.

[0056] The virtual verification data generation unit 310 stores data to be stored in the virtual verification data cache using the external data cache 340. The external data cache 340 is, for example, a memory external to the control component.

[0057] The virtual check data cache table 350 includes a plurality of entries, one or more of which record a virtual check data cache ID and a check data cache ID in association. The virtual check data cache ID represents a unit of the virtual check data cache, and the check data cache ID indexes a unit of the check data cache 328. Some virtual check data cache IDs have not yet been associated with a check data cache ID, and in the virtual check data cache table 350, these virtual check data cache IDs are associated with a special tag such as "(empty)".

[0058] One or more entries of the virtual check data cache table 350 record the virtual check data cache ID and the index of the unit of the external data cache 340 in association. Optionally, the virtual check data cache ID is associated with the unit of the specified external data cache 340, so that the unit of the external data cache 340 does not need to be allocated for the virtual check data cache ID.

[0059] The check data generation unit 320 can move the data of the cells in its check data cache 328 to the external data cache 340 , and can also move the data of the cells in the external data cache 340 to the check data cache 328 .

[0060] Figure 4 A schematic diagram of providing a virtual check data cache according to an embodiment of the present application is shown.

[0061] In order to write the data corresponding to the write command into the newly acquired page stripe of the NVM chip, the command processing unit 305 applies to the virtual check data generating unit 310 for the virtual check data cache unit ( Figure 4 In the process of writing data to a complete page stripe, the same unit of the virtual parity data cache is used, and the parity data generated for the page stripe is cached in the unit.

[0062] In response, the virtual check data generation unit 310 allocates an available virtual check data cache ID ( Figure 4 , indicated by “(2)”), for example, virtual check data cache ID 452. The allocated virtual check data cache ID 452 is an idle virtual check data cache ID, and is not associated with any unit of the external data cache 340, nor is it associated with a check data cache ID.

[0063] The virtual check data generation unit 310 also allocates the check data cache ID ( Figure 4 In an optional embodiment, the virtual check data generation unit 310 also maintains the status of each unit of the check data cache 328, so as to know which units of the check data cache 328 are available for allocation and which are not available.

[0064] The virtual verification data generation unit 310 updates the virtual verification data cache table 350, in which the allocated virtual verification data cache ID 452 and the verification data cache ID (indexed by unit 428) are recorded in association. Figure 4 , indicated by “(4)”).

[0065] Next, the virtual verification data generating unit 310 indicates the virtual verification data cache ID 452 to the command processing unit 305 in response to the request of the command processing unit 305 to apply for the virtual verification data cache unit ( Figure 4 , indicated by “(5)”).

[0066] The command processing unit 305 initiates a programming operation to the virtual verification data generation unit 310, and uses the virtual verification data cache ID 452 to write data to the page stripe ( Figure 4 , indicated by “(6)”).

[0067] In response, the virtual verification data generation unit 310 queries the unit 428 of the verification data cache 328 corresponding to the virtual verification data cache ID 452 from the virtual verification data cache table 350, and instructs the verification data generation unit 320 ( Figure 4 In the example, as indicated by “(7)”, the data to be written by the write command indicated by the command processing unit 305 is XORed with the data of unit 428 to generate verification data, and the generated verification data is stored in unit 428.

[0068] And write the data corresponding to the write command into the NVM chip through the media interface ( Figure 4 , indicated by “(8)”).

[0069] Optionally, the command processing unit 305, the virtual verification data generation unit 310, the verification data generation unit 320 and the medium interface each include a message queue to cache request messages from other units. Thus, each unit can process multiple messages in parallel. For example, the command processing unit 305 provides multiple request messages to the virtual verification data generation unit 310, and the virtual verification data generation unit 310 obtains and processes the messages to be processed from the message queue each time.

[0070] After the unit of the virtual check data cache has been allocated to the page stripe, the command processing unit 305 instructs the use of the same unit of the virtual check data cache for other data to be written to the page stripe. And after the complete page stripe is filled, the command processing unit 305 instructs the virtual check data generation unit 310 to release the unit of the virtual check data cache allocated to the page stripe, so that the unit can be allocated by the virtual check data generation unit 310 for use in writing data to other page stripes.

[0071] Figure 5 A flowchart for providing a virtual check data cache according to an embodiment of the present application is shown.

[0072] Command Processing Unit (see also Figure 3 The command processing unit 305 obtains the page stripe to be written in response to processing the write command (510). The unit (520) applies to the virtual check data generating unit for a virtual check data cache for the newly obtained page stripe.

[0073] The virtual check data generation unit obtains the virtual check data cache ID (recorded as virtual check data cache ID (SV)) that has not been allocated to the page stripe from the virtual check data cache table 350 (530). When obtaining the unit of the check data cache, the virtual check data generation unit finds that all the units of the check data cache 328 are occupied and there is no available unit. In this case, the virtual check data generation unit selects one of the units of the check data cache 328 as the unit to be replaced (540).

[0074] Optionally, the unit to be replaced (referred to as unit SP) is selected from each unit of the verification data cache 328 according to various strategies, such as selecting a unit that has not been used recently, selecting a unit that is not currently used, or selecting a unit that is least frequently used.

[0075] The virtual check data generation unit sends a message to the check data generation unit 320 to instruct it to move the data in the unit SP to the unit of the external data cache 340 corresponding to the virtual check data cache ID (SU), so that the unit SP becomes available (550). The virtual check data cache table 350 records the virtual check data cache ID (SU) corresponding to the check data cache ID indexing the unit SP.

[0076] The virtual check data generation unit records the virtual check data cache ID (SV) and the check data cache ID (560) indexing the unit SP in the virtual check data cache table 350. Also, the virtual check data cache ID (SU) is not associated with any unit of the check data cache, and / or the check data corresponding to the virtual check data cache ID (SU) is stored in a unit of the external cache 340 in the virtual check data cache table 350.

[0077] Next, the virtual check data generating unit indicates to the command processing unit that the unit applying for the virtual check data cache is successful, and provides the allocated virtual check data cache ID (SV) (570).

[0078] The command processing unit obtains the virtual check data cache ID (SV), and uses the virtual check data cache ID (SV) to initiate a programming operation (580) to the newly obtained page stripe, so as to write data (recorded as data D) to the page stripe.

[0079] The virtual verification data generation unit queries the virtual verification data cache table 350 according to the virtual verification data cache ID (SV) indicated by the command processing unit, obtains the verification data cache ID indexed by the unit SP, and instructs the verification data generation unit 320 to calculate the verification data for the data D using the unit SP (590), and writes the data D into the NVM chip through the medium interface (595).

[0080] In an optional embodiment, the command processing unit (see also Figure 3, the command processing unit 305) obtains the page stripe to which data is to be written in response to processing the write command. The page stripe is a page stripe to which data has been written but has not yet been fully written. The command processing unit obtains, for example, the virtual check data cache ID (SV) previously applied for the page stripe according to its own records, and requests the virtual check data generation unit to allocate a unit of the virtual check data cache. In response, the virtual data cache generation unit queries the virtual check data cache table 350 and finds that there is currently no check data cache ID corresponding to the virtual check data cache ID (SV). The virtual check data generation unit selects an available unit (referred to as unit S) of the check data cache 328, or a unit to be replaced (referred to as unit S), and updates the virtual check data cache table 350 to record the correspondence between the virtual check data cache ID (SV) and the check data cache ID indexing unit S. If unit S is a unit to be replaced, the virtual check data generation unit also moves the data of unit S to the external data cache 340. The virtual check data generation unit also instructs the check data generation unit to move its data from the unit of the external data cache corresponding to the virtual check data cache ID (SV) to the unit S of the check data cache 385. Next, the virtual check data generation unit indicates to the command processing unit that the virtual check data cache ID (SV) is available. The command processing unit writes data to the page stripe using the virtual check data cache ID (SV).

[0081] Figure 6 A schematic diagram of providing a virtual check data cache according to yet another embodiment of the present application is shown.

[0082] The command processing unit 305 instructs the virtual check data generation unit 310 to write the data corresponding to the write command (recorded as data D) into the page stripe of the NVM chip. For the page stripe to which data is written for the first time, the command processing unit 305 also instructs the virtual check data generation unit 310 to allocate a virtual check data cache ID. For the page stripe to which part of the data has been written, the command processing unit 305 instructs the virtual check data generation unit 310 to use the virtual check data cache ID corresponding to the page stripe.

[0083] The following description is made by taking the allocation of the virtual verification data cache ID by the virtual verification data generating unit 310 as an example.

[0084] In response, the virtual check data generation unit 310 allocates an available virtual check data cache ID ( Figure 6 , indicated by “(a)”), for example, virtual check data cache ID 652.

[0085] The virtual check data generation unit 310 also allocates the check data cache ID ( Figure 6 , indicated by “(b)”). The virtual check data generation unit 310 maintains the status of each unit of the check data cache 328, thereby knowing that the unit 628 of the check data cache 328 has been occupied.

[0086] Virtual check data generation unit 310 instructs check data generation unit 320 to move the data of unit 628 to external data cache 340 ( Figure 6 , indicated by "(c)"). For example, if the virtual check data cache table 350 records that the check data cache ID associated with the virtual check data cache ID (SU) indexes the unit 628, the data of the unit 628 is moved to the unit of the external data cache 340 corresponding to the virtual check data cache ID (SU). Still optionally, the virtual check data generation unit 310 also maintains a check data cache table, which records the virtual check data cache ID corresponding to each unit of the check data cache. For the unit 628 to be moved, the virtual check data cache ID corresponding to the unit 628 is obtained from the check data cache table, and then the unit of the external data cache 340 corresponding to the virtual check data cache ID is obtained.

[0087] The verification data generation unit 320 includes a message queue 324. The message that the virtual verification data generation unit 310 instructs the verification data generation unit 320 to move data is filled into the message queue 324. The message queue 324 includes multiple entries, so that the virtual verification data generation unit 310 can indicate multiple data moving messages to the verification data generation unit 320. The verification data generation unit 320 takes the message from the message queue and performs data moving or other operations according to the instructions of the message. Therefore, between the virtual verification data generation unit 310 and the verification data generation unit 320, messages corresponding to multiple write commands can be issued and / or processed in parallel.

[0088] In response to moving the data of unit 628 to the external data cache 340, the check data generation unit 320 indicates to the virtual check data generation unit that the data move is complete ( Figure 6 In response, the virtual check data generation unit 310 updates the virtual check data cache table 350, recording therein the virtual check data cache ID 652 corresponding to the check data cache ID of the indexed unit 628 ( Figure 6 (indicated by “(e)”).

[0089] And the virtual verification data generating unit 310 further records in the virtual verification data cache table that the verification data corresponding to the virtual verification data cache ID (SU) is stored in the external data cache 340 .

[0090] Next, the virtual verification data generation unit 310 instructs the verification data generation unit 320 to generate verification data ( Figure 6 , indicated by "(f)"), and writes data D into the NVM chip through the media interface ( Figure 6 Optionally, the message in which the virtual verification data generation unit 310 instructs the verification data generation unit 320 to generate verification data is also filled into the message queue 324.

[0091] Figure 7 A schematic diagram of providing a virtual check data cache according to another embodiment of the present application is shown.

[0092] The command processing unit 305 instructs the virtual check data generation unit 310 to write the data corresponding to the write command (recorded as data D) into the page stripe of the NVM chip. The page stripe is the page stripe that has been written with data. Therefore, the command processing unit 305 instructs the virtual check data generation unit 310 to use the virtual check data cache ID corresponding to the page stripe (752).

[0093] In response, the virtual check data generation unit 310 queries the virtual check data cache table 350 for the virtual check data cache ID (752) ( Figure 7 (indicated by “(i)”).

[0094] The virtual check data cache table 350 is queried to find that the virtual check data cache ID (752) has no corresponding check data cache ID. The virtual check data generation unit 310 also allocates the check data cache ID (752) of the unit 728 indexing the check data cache 328 from the check data cache 328. Figure 7 , indicated by “(ii)”). Optionally, if the virtual check data cache table 350 indicates that the virtual check data cache ID (752) has a corresponding check data cache ID, which indexes the unit 726, then the virtual check data generation unit 310 instructs the check data generation unit 320 to generate check data ( Figure 7 , indicated by "(viii)"), and writes data D into the NVM chip through the media interface ( Figure 7 (indicated by “(ix)”).

[0095] Return to view Figure 7 , the virtual verification data generation unit 310 maintains the status of each unit of the verification data cache 328, so as to know that the unit 728 of the verification data cache 328 has been occupied.

[0096] Virtual check data generation unit 310 instructs check data generation unit 320 to move the data of unit 728 to external data cache 340 ( Figure 7(indicated by “(iii)” in the

[0097] In response to moving the data of unit 728 to the external data cache 340, the check data generation unit 320 indicates to the virtual check data generation unit that the data move is complete ( Figure 7 The virtual verification data generation unit 310 updates the virtual verification data cache table 350, recording therein the virtual verification data cache ID 752 corresponding to the verification data cache ID of the indexed unit 728 ( Figure 6 (indicated by “(v)”).

[0098] Since the page stripe corresponding to the virtual check data cache ID 752 has been written with data, the intermediate result of the check data generated for the page stripe is stored in the data cache 340. Next, the virtual check data generation unit 310 instructs the check data generation unit 320 to move the data of the unit of the external data cache 340 indexed by the virtual check data cache ID 752 to the unit 728 of the assigned check data cache 328 ( Figure 7 In response to moving the data to unit 728, the verification data generation unit 320 indicates to the virtual verification data generation unit that the data move is complete ( Figure 7 (indicated by “(vii)”).

[0099] It can be understood that the update of the virtual verification data cache table 350 by the virtual verification data generation unit 310 ( Figure 6 , indicated by “(v)”) may occur before moving data from unit 728 to external data cache 340, or after moving data from external data unit 340 to unit 728.

[0100] Next, the virtual verification data generation unit 310 instructs the verification data generation unit 320 to generate verification data ( Figure 7 , indicated by "(viii)"), and writes data D into the NVM chip through the media interface ( Figure 7 (indicated by “(ix)”).

[0101] Figure 8 A flowchart of providing a virtual check data cache according to yet another embodiment of the present application is shown.

[0102] Command Processing Unit (see also Figure 3 , the command processing unit 305 obtains the page stripe to which data is to be written in response to processing the write command (810). The page stripe is a page stripe to which data has been written. Therefore, the command processing unit 305 instructs the virtual check data generation unit 310 to use the virtual check data cache ID corresponding to the page stripe (820).

[0103] The virtual verification data generation unit queries the virtual verification data cache table 350 for the virtual verification data cache ID (referred to as virtual verification data cache ID (SV)) (830). It is also learned from the virtual verification data cache table 350 that the current virtual verification data cache ID (SV) has no corresponding verification data cache ID.

[0104] The virtual verification data generation unit also finds that all cells of the verification data cache 328 are occupied and there are no available cells. In this case, the virtual verification data generation unit selects one of the cells in the verification data cache 328 (referred to as cell SP) as the cell to be replaced (840).

[0105] The virtual check data generation unit sends a message to the check data generation unit 320 to instruct it to move the data in the unit SP to the unit of the external data cache 340 corresponding to the virtual check data cache ID (SU), so that the unit S becomes available (850). The virtual check data cache table 350 records the virtual check data cache ID (SU) corresponding to the check data cache ID indexing the unit SP.

[0106] The message sent by the virtual check data generation unit to the check data generation unit 320 also instructs it to move the data of the unit of the external data cache 340 corresponding to the virtual check data cache ID (SV) to the unit SP (860), so that the unit SP becomes available to continue calculating the check data for the page stripe corresponding to the virtual check data cache ID (SV).

[0107] The virtual check data generation unit records the virtual check data cache ID (SV) in association with the check data cache ID (870) indexing the unit SP in the virtual check data cache table 350, and records in the virtual check data cache table 350 any unit in which the virtual check data cache ID (SU) is not associated with the check data cache.

[0108] Next, the virtual check data generating unit indicates to the command processing unit that the unit applying for the virtual check data cache is successful, and provides the allocated virtual check data cache ID (SV) (880).

[0109] The command processing unit obtains an indication that the virtual parity data cache ID (SV) is available, and uses the virtual parity data cache ID (SV) to initiate a programming operation to the page stripe to write data (recorded as data D) to the page stripe (890).

[0110] The virtual verification data generation unit queries the virtual verification data cache table 350 according to the virtual verification data cache ID (SV) indicated by the command processing unit, obtains the verification data cache ID indexed by the unit SP (892), and instructs the verification data generation unit 320 to calculate the verification data for the data D using the unit SP (894), and writes the data D to the NVM chip through the medium interface (896).

[0111] Fig. 9 A flowchart for providing a virtual check data cache according to yet another embodiment of the present application is shown.

[0112] Command Processing Unit (see also Figure 3 , the command processing unit 305 obtains the page stripe to which data is to be written in response to processing the write command (910). The page stripe is a page stripe to which data has been written. The command processing unit 305 instructs the virtual check data generation unit 310 to write data to the page stripe using the virtual check data cache ID (920) corresponding to the page stripe (930).

[0113] In accordance with Fig. 9 In an embodiment of the present invention, the command processing unit indicates to the virtual verification data generation unit the virtual verification data cache ID (denoted as SV), the page stripe and data to be written (denoted as data D), without requiring the virtual verification data generation unit to provide the result obtained by the virtual verification data cache unit.

[0114] In response, the virtual data cache generation unit queries the virtual verification data cache table 350 (940) and finds that there is currently no verification data cache ID corresponding to the virtual verification data cache ID (SV).

[0115] The virtual verification data generation unit also finds that all cells of the verification data cache 328 are occupied and there are no available cells. In this case, the virtual verification data generation unit selects one of the cells in the verification data cache 328 (referred to as cell SP) as the cell to be replaced (950).

[0116] The virtual check data generation unit sends a message to the check data generation unit 320 to instruct it to move the data in the unit SP to the unit of the external data cache 340 corresponding to the virtual check data cache ID (SU), so that the unit S becomes available (960). The virtual check data cache table 350 records the virtual check data cache ID (SU) corresponding to the check data cache ID indexing the unit SP.

[0117] The message sent by the virtual check data generation unit to the check data generation unit 320 also instructs it to move the data of the unit of the external data cache 340 corresponding to the virtual check data cache ID (SV) to the unit SP (970), so that the unit SP becomes available to continue calculating the check data for the page stripe corresponding to the virtual check data cache ID (SV).

[0118] The virtual check data generation unit records the virtual check data cache ID (SV) in association with the check data cache ID (980) indexing the unit SP in the virtual check data cache table 350, and records in the virtual check data cache table 350 that the virtual check data cache ID (SU) is not associated with any unit of the check data cache.

[0119] Next, the virtual verification data generation unit queries the virtual verification data cache table 350 according to the virtual verification data cache ID (SV), obtains the verification data cache ID indexing the unit SP (990), and initiates a programming operation on the data D using the unit SP of the verification data cache (990).

[0120] The verification data generation unit 320 calculates verification data for the data D using the unit SP (992), and writes the data D to the NVM chip through the media interface (994).

[0121] Fig.10 A flow mapping table according to an embodiment of the present application is shown.

[0122] The flow mapping table includes multiple entries, each of which records a virtual verification data cache ID group consisting of a flow ID and one or more virtual verification data cache IDs in association. The flow ID identifies or indexes the flow. The write command received by the command processing unit carries the flow ID or generates the flow ID for the write command.

[0123] The virtual verification data cache ID corresponds to the page stripe. The command processing unit uses the stream mapping table to map the stream ID of the write command to the virtual verification data cache ID selected from the corresponding virtual verification data cache ID group, and then maps the data corresponding to the write command to the page stripe corresponding to the virtual verification data cache ID. In this way, a page stripe is selected for the data corresponding to the write command according to the stream ID of the write command, and the data of the write command with the same stream ID is written to the same page stripe. Optionally, in the stream mapping table, each page stripe corresponding to each virtual verification data cache ID belonging to the same virtual verification data cache ID group comes from the same large block.

[0124] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they are aware of the basic creative concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application. Obviously, those skilled in the art may make various changes and modifications 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 equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for providing virtual verification data cache, characterized in that: include: Obtain a request for a unit to allocate a virtual check data cache; Allocating an index of a first cell of an available virtual check data cache from a virtual check data cache table; allocating a first unit of a check data cache from the check data cache; Updating the virtual verification data cache table, recording therein the first unit index of the allocated virtual verification data cache and the first unit index of the verification data cache; responding to a request to allocate a cell of a virtual check data cache with a first cell index of the virtual check data cache; Obtain a write command to write the first data, and obtain an index of a first unit of a virtual verification data cache allocated for the first data; Acquire a first unit of a virtual verification data cache, use the first unit of the verification data cache to generate verification data for data to be written by a write command, and store the generated verification data in the first unit of the verification data cache; The first data is written into the NVM chip.

2. The method according to claim 1, characterized in that Also includes: The verification data of the first unit of the verification data cache is written into the NVM chip.

3. The method according to claim 2, characterized in that Also includes: After the first page stripe is fully written, the units of the virtual check data cache allocated for the first page stripe are released.

4. The method according to any one of claims 1 to 3, characterized in that In response to the check data cache not having an allocatable check data cache unit, selecting a second unit of the check data cache; Moving the data in the second unit of the verification data cache to the second unit of the external data cache; Recording the index of the first unit of the virtual verification data cache and the index of the second unit of the verification data cache in association in the virtual verification data cache table; as well as The first virtual check data cache ID is used to respond to the request of the unit applying for the virtual check data cache.

5. The method according to claim 4, characterized in that Also includes: The virtual verification data cache table is updated to record the index of the second unit of the virtual verification data cache and the index of the second unit of the external data cache in association with each other.

6. The method according to claim 4, characterized in that A recently unused verification data cache unit of the verification data cache is selected, or a verification data cache unit with the lowest frequency of use is selected as the second unit of the verification data cache.

7. The method according to any one of claims 1 to 3, characterized in that: Also includes: Obtain a request for a second unit using a virtual check data cache; Using the index of the second unit of the virtual verification data cache to query the virtual verification data cache table, the virtual verification data cache table records the index of the second unit of the virtual verification data cache and the index of the second unit of the verification data cache in association; The request to use the second unit of the virtual parity data cache is responded to with the second unit index of the virtual parity data cache.

8. The method according to claim 7, characterized in that If the index of the unit of the virtual verification data cache recorded in the virtual verification data cache table in association with the index of the second unit of the virtual verification data cache is not the index of the unit of the verification data cache, selecting the third unit of the verification data cache; Move the data in the third unit of the verification data cache to the third unit of the external data cache; Move the data of the second unit of the external data cache to the third unit of the verification data cache; Recording the index of the second unit of the virtual verification data cache and the index of the third unit of the verification data cache in association in the virtual verification data cache table; as well as The request to use the second unit of the virtual parity data cache is responded to with the second unit index of the virtual parity data cache.

9. The method according to claim 8, characterized in that The third unit of the external data cache is associated with the third unit of the virtual verification data cache, and the virtual verification data cache table associates the index of the third unit of the virtual verification data cache and the index of the third unit of the verification data cache.

10. The method according to claim 8, characterized in that The second unit of the external data cache is associated with the second unit of the virtual parity data cache.

11. The method according to claim 8, characterized in that In response to moving the data in the third unit of the check data cache to the third unit of the external data cache, the virtual check data cache table is also updated to record the index of the second unit of the virtual check data cache and the index of the second unit of the external data cache in association.

12. The method according to claim 7, characterized in that If the index of the unit of the virtual verification data cache recorded in the virtual verification data cache table in association with the index of the second unit of the virtual verification data cache is not the index of the unit of the verification data cache, selecting an idle fourth unit of the verification data cache; Move the data of the second unit of the external data cache to the fourth unit of the verification data cache; Recording the index of the second unit of the virtual verification data cache and the index of the fourth unit of the verification data cache in association in the virtual verification data cache table; as well as The request to use the second unit of the virtual parity data cache is responded to with the second unit index of the virtual parity data cache.

13. The method according to any one of claims 1 to 3, characterized in that: The units of the virtual check data cache correspond one-to-one with the page stripes to which data is being written.

14. The method according to any one of claims 1 to 3, characterized in that: Also includes: In response to the check data cache not having an allocatable check data cache unit, selecting a second unit of the check data cache; Instructing the verification data generation unit to move the data in the second unit of the verification data cache to the second unit of the external data cache; Recording the index of the first unit of the virtual verification data cache and the index of the second unit of the verification data cache in association in the virtual verification data cache table; as well as The first virtual check data cache ID is used to respond to the request of the unit applying for the virtual check data cache.

15. The method according to claim 14, characterized in that Also includes: Obtain a request for a second unit using a virtual check data cache; Using the index of the second unit of the virtual verification data cache to query the virtual verification data cache table, the virtual verification data cache table records the index of the second unit of the virtual verification data cache and the index of the second unit of the verification data cache in association; The request to use the second unit of the virtual parity data cache is responded to with the second unit index of the virtual parity data cache.

16. The method according to claim 15, characterized in that If the index of the unit of the verification data cache recorded in the virtual verification data cache table in association with the index of the second unit of the virtual verification data cache is not the index of the unit of the verification data cache, select the third unit of the verification data cache; instruct the verification data generation unit to move the data in the third unit of the verification data cache to the third unit of the external data cache; instruct the verification data generation unit to move the data of the second unit of the external data cache to the third unit of the verification data cache; record the index of the second unit of the virtual verification data cache and the index of the third unit of the verification data cache in association in the virtual verification data cache table; and respond to a request to use the second unit of the virtual verification data cache with the index of the second unit of the virtual verification data cache.

17. The method according to claim 15, characterized in that If the index of the unit recorded in the virtual check data cache table in association with the index of the second unit of the virtual check data cache is not the index of the unit of the check data cache, select the free fourth unit of the check data cache; instruct the check data generation unit to move the data of the second unit of the external data cache to the fourth unit of the check data cache; record the index of the second unit of the virtual check data cache and the index of the fourth unit of the check data cache in association in the virtual check data cache table; and respond to the request to use the second unit of the virtual check data cache with the index of the second unit of the virtual check data cache.

18. 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, the method for a storage device according to any one of claims 1 to 17 is implemented.

Citation Information

Patent Citations

  • Page strip data organization, and method and device for writing data into page strip

    CN108877862A

  • Data cloud storage method

    CN104765574A

  • Distributed data storage method and system based on erasure code

    CN105791353A

  • IO command processing method and medium interface controller

    CN108153482A