Method and device for optimizing power-on speed of data storage device
By splitting the L2Ptable and using supercapacitors and SmartL2P firmware management modules, the problem of a long recovery time for large-capacity Flash storage devices after power failure is solved, rapid power-on recognition is achieved, and compatibility issues with the fast power-on host are solved.
Patent Information
- Application Number
- CN202310500737.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-06
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2043-05-06
AI Technical Summary
Large-capacity Flash storage devices need longer to restore L2Ptable after a sudden power outage, resulting in compatibility issues with the host of the fast power-on identification device.
By dividing the L2Ptable into multiple sections, and setting up supercapacitors and SmartL2P firmware management modules, the sectiontable information is saved when powered off, and quickly restore a small part of the L2Ptable when powered on again to meet the host identification requirements.
It realizes rapid recovery of L2Ptable, solves compatibility problems, and significantly accelerates the power-on speed of data storage devices.
Smart Images

Figure CN116736958B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field related to data storage, and in particular to a method and device for optimizing the power-on speed of a data storage device. Background Art
[0002] With the rapid development of information and the explosive growth of data, users have an increasingly obvious demand for large-capacity data storage devices. As storage devices using NandFlash as storage media have various advantages, the application of Flash storage devices is becoming more and more widespread.
[0003] Since a large-capacity storage device requires a larger L2P (Logical address to Physical address) table to maintain data security, it takes longer to restore the entire L2P table when the storage device suddenly loses power. With the widespread use of large-capacity Flash storage devices, there may be various compatibility issues for some hosts that only accept fast power-on recognition devices. Summary of the invention
[0004] In order to solve the problems mentioned above, the present invention provides a method and device for optimizing the power-on speed of a data storage device. By redesigning the management of L2Ptable and setting a supercapacitor and a SmartL2P firmware management module, a small part of the L2Ptable can be quickly restored when the storage device is powered on to meet the requirements of rapid host identification and solve possible compatibility problems.
[0005] The technical solution is as follows:
[0006] A method for optimizing the power-on speed of a data storage device, characterized in that the method comprises the following steps:
[0007] Step 1: Divide the entire L2Ptable into N sectiontables from logicstartaddress to logicendaddress, where N is a natural number.
[0008] Step 2: Set the corresponding DT (Dirty Table) table for each sectiontable. When a logicaddress changes, add a DTentry to the Flash array in the DTtable corresponding to the sectiontable where it is located.
[0009] Step 3: a super capacitor is arranged in the data storage device, and when a power failure occurs suddenly, the super capacitor provides a short-term power supply for the data storage device;
[0010] Step 4: Set a SmartL2P firmware management module, the SmartL2P firmware management module is used to obtain the logicaddress that needs to be read each time the host is powered on, and obtain corresponding p sectiontable information according to the logicaddress, where p is a natural number;
[0011] Step 5: When the storage device suddenly loses power, during the short power supply time provided by the super capacitor, the SmartL2P firmware management module saves the corresponding p sectiontables to the Flash array according to the p sectiontable information in step 4;
[0012] Step 6: When powered on, read the p section tables in step 5 from the Flash array, restore the corresponding complete L2P table, and complete the host power-on recognition response to the data storage device.
[0013] Furthermore, the method also includes step 7, after power-on, continuing to restore the corresponding complete L2Ptable by reading other sectiontables and DTtable respectively.
[0014] Furthermore, in step 1, each sectiontable has a fixed logicstartaddress and logicendaddress, where value is the physical address corresponding to each logicaddress.
[0015] Furthermore, in step 2, when a DTtable space is full, the corresponding complete sectiontable is saved to the Flash array and the DTtable is erased at the same time.
[0016] Furthermore, in step 4, the SmartL2P firmware management module records the logicaddress set that the host needs to read each time it powers on, obtains the intersection of the logicaddress set that the host needs to read each time it powers on through the records of k power-ons, and obtains corresponding p sectiontable information based on the logicaddress in the intersection; k is a natural number.
[0017] Furthermore, in step 6, it is first determined whether the logicaddresses that the powered-on host needs to read are all in the p sectiontables. If the partial logicaddresses read by the host are not in the p sectiontables, the sectiontable and DTtable corresponding to the above partial logic address are read from the Flash array at the same time to restore the corresponding complete L2P.
[0018] The present invention also provides a data storage device, which includes a controller, a memory and a Flash array, and is characterized in that: the device also includes a super capacitor and a SmartL2P firmware management module.
[0019] The beneficial effects of the present invention are:
[0020] The present invention sets a supercapacitor to provide a short-term power supply to the data storage device when the power is suddenly cut off, sets a SmartL2P firmware management module to obtain the logicaddress that needs to be read by the host each time it is powered on, and obtains the corresponding sectiontable information through the logicaddress, so that the corresponding sectiontable can be saved to the Flash array when the power is suddenly cut off, and then the corresponding sectiontable is read from the Flash array when the power is restored, and a small part of the complete L2Ptable is quickly restored to meet the requirement of rapid host recognition, thereby solving possible compatibility problems and speeding up the power-on speed of the data storage device. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It is a schematic diagram of the structure of sectiontable and DTtable in the present invention;
[0022] Figure 2 Schematic diagram of the L2Ptable storage process in the present invention;
[0023] Figure 3 Schematic diagram of the workflow of the SmartL2P firmware management module in the present invention;
[0024] Figure 4 This is a schematic diagram of the power-on process in the present invention;
[0025] Figure 5 It is a schematic diagram of the structure of the data storage device in the present invention. DETAILED DESCRIPTION
[0026] The present invention will be further described below in conjunction with the embodiments.
[0027] The following examples are used to illustrate the present invention, but they cannot be used to limit the scope of protection of the present invention. The conditions in the examples can be further adjusted according to specific conditions. Simple improvements to the method of the present invention under the premise of the concept of the present invention belong to the scope of protection claimed in the present invention.
[0028] Example 1
[0029] A method for optimizing the power-on speed of a data storage device, characterized in that the method comprises the following steps:
[0030] Step 1: Figure 1 As described above, the entire L2Ptable is divided into N sectiontables from logicstartaddress to logicend address, where N is a natural number, 1<M<N; each sectiontable has a fixed logicstartaddress and logicendaddress, where value is the physicaladdress corresponding to each logic address.
[0031] Step 2: Since each sectiontable is large, the controller will not save each complete sectiontable to the Flash array in real time for performance reasons. Therefore, the controller will also set up a corresponding DT (DirtyTable) table for each sectiontable. Each time, only a small DTentry needs to be saved in the DTtable. In this way, when the controller restores the complete L2P of the sectiontable, it needs to restore both the sectiontable and the DTtable. Figure 2 As described above, when a logicaddress changes, a DTentry is added to the Flash array in the DTtable corresponding to the sectiontable where it is located; when a DTtable is full, the corresponding complete sectiontable is saved to the Flash array and the DTtable is erased at the same time.
[0032] Step 3: A super capacitor is provided in the data storage device, and the super capacitor provides a short-term power supply for the data storage device when a power failure occurs suddenly.
[0033] Step 4: Set a SmartL2P firmware management module, where the SmartL2P firmware management module is used to obtain a logicaddress that needs to be read each time the host is powered on, and obtain corresponding p sectiontable information according to the logicaddress, where p is a natural number.
[0034] Step 5: When the storage device suddenly loses power, within the short power supply time provided by the super capacitor, the SmartL2P firmware management module saves the corresponding p sectiontable information to the Flash array according to the p sectiontable information in Step 4.
[0035] Step 6: When powered on, read the p sectiontable in Step 5 from the Flash array, restore the corresponding complete L2Ptable, and complete the recognition response of the host power-on to the data storage device.
[0036] Step 7: After power-on, continue to restore the corresponding complete L2Ptable by reading other sectiontable and DTtable respectively.
[0037] According to the prior art, when powered on, it takes time to restore N incomplete section L2P, that is, the time to restore sectiontable and DTtable simultaneously: N*T1 (T1 represents the restoration time of incomplete section); according to the method of the present invention, when powered on, it only takes time to restore M complete section L2P, that is, only the time to restore p sectiontable: p*T2 (T2 represents the restoration time of complete section); in the above actual tests, p is much smaller than N, with an order of magnitude difference; at the same time, T2 < T1, so the present invention can greatly accelerate the power-on time.
[0038] Embodiment 2
[0039] A method for optimizing the power-on speed of a data storage device, characterized in that the method includes the following steps:
[0040] Step 1: As Figure 1 described, the entire L2Ptable is divided into N sectiontable from logicstartaddress to logicend address, where N is a natural number; each sectiontable has a fixed logicstartaddress and logicendaddress, and the value is the physicaladdress corresponding to each logicaddress.
[0041] Step 2: As Figure 1 and Figure 2As described above, a corresponding DT (DirtyTable) table is set for each sectiontable. When a logicaddress changes, a DTentry is added to the Flash array in the DTtable corresponding to the section table where it is located; when a DTtable space is full, the corresponding complete sectiontable is saved to the Flash array and the DT table is erased at the same time.
[0042] Step 3: A super capacitor is provided in the data storage device, and the super capacitor provides a short-term power supply for the data storage device when a power failure occurs suddenly.
[0043] Step 4: Since the host only reads the data corresponding to a small part of the logicaddress set during each power-on process, and there may be some differences in the logicaddress set read each time the power is turned on, a SmartL2P firmware management module is set, such as Figure 4 The SmartL2P firmware management module records the logicaddress set that the host needs to read each time it powers on, obtains the intersection of the logicaddress set that the host needs to read each time it powers on through the records of k power-ons, and obtains corresponding p sectiontable information according to the logic address in the intersection; p is a natural number, and k is a natural number.
[0044] Step 5: When the storage device suddenly loses power, during the short power supply time provided by the super capacitor, the SmartL2P firmware management module saves the corresponding p sectiontables to the Flash array according to the p sectiontable information in step 4;
[0045] Step 6: Figure 5 As shown, when powered on, first determine whether the logic addresses that the powered-on host needs to read are all in the p sectiontables. If so, read the p sectiontables in step 5 from the Flash array, restore the corresponding complete L2Ptable, and complete the host's power-on recognition response to the data storage device.
[0046] If the partial logicaddress read by the host is not in the p sectiontables, first read the p sectiontables in step 5 from the Flash array, restore the corresponding complete L2Ptable, and then read the section table and DTtable corresponding to the above partial logicaddress from the Flash array at the same time, restore the corresponding complete L2P, and complete the host's power-on recognition response to the data storage device.
[0047] Step 7: After power-on, continue to restore the corresponding complete L2Ptable by reading other sectiontables and DTtable respectively.
[0048] Example 3
[0049] like Figure 5 As shown, the present invention also provides a data storage device, which includes a controller, a memory and a Flash array, and is characterized in that: the device also includes a super capacitor and a SmartL2P firmware management module.
[0050] The controller is used to execute each step of the above method; the memory is used to store L2Ptable; the Flash array is used to store DTtable and sectiontable; the supercapacitor is used to provide a short power supply to the data storage device in case of a sudden power failure; the SmartL2P firmware management module is used to obtain the logicaddress that needs to be read every time the host is powered on, and obtain the corresponding sectiontable information through the logic address, so that the corresponding section table can be saved to the Flash array in case of a sudden power failure.
[0051] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the invention, and the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. A method for optimizing the power-on speed of a data storage device, characterized in that: The method comprises the following steps: Step 1: Divide the entire L2P table into N section tables from logic start address to logic end address, where N is a natural number. Step 2: Set the corresponding DT (Dirty Table) table for each section table. When a logic address changes, add a DT entry to the Flash array in the DT table corresponding to the section table. Step 3: a super capacitor is arranged in the data storage device, and when a power failure occurs suddenly, the super capacitor provides a short-term power supply for the data storage device; Step 4: Set a SmartL2P firmware management module, the SmartL2P firmware management module is used to obtain a logic address that needs to be read each time the host is powered on, and obtain corresponding p sectiontable information according to the logic address, where p is a natural number; In step 4, the SmartL2P firmware management module records the logic address set that the host needs to read each time it is powered on, obtains the intersection of the logic address set that the host needs to read each time it is powered on through the records of k power-ons, and obtains corresponding p section table information according to the logic address in the intersection; k is a natural number; Step 5: When the storage device suddenly loses power, the SmartL2P firmware management module saves the corresponding p section tables to the Flash array according to the p section table information in step 4 during the short power supply time provided by the super capacitor. Step 6: When powered on, read the p section tables in step 5 from the Flash array, restore the corresponding complete L2P table, and complete the host power-on recognition response to the data storage device; In step 6, first determine whether the logic addresses that the powered-on host needs to read are all in the p section tables. If the partial logic addresses read by the host are not in the p section tables, then read the section table and DT table corresponding to the partial logic addresses from the Flash array at the same time to restore the corresponding complete L2P.
2. A method for optimizing the power-on speed of a data storage device according to claim 1, characterized in that: The method further includes step 7, after power-on, continuing to restore the corresponding complete L2P table by reading other section tables and DT tables respectively.
3. The method for optimizing the power-on speed of a data storage device according to claim 1, characterized in that: In step 1, each section table has a fixed logic start address and logic end address, where value is the physical address corresponding to each logic address.
4. The method for optimizing the power-on speed of a data storage device according to claim 1, characterized in that: In step 2, when a DT table space is full, the corresponding complete section table is saved to the Flash array and the DT table is erased at the same time.
5. A data storage device according to any one of claims 1 to 4, comprising a controller, a memory and a Flash array, characterized in that: The device also includes a super capacitor and a SmartL2P firmware management module.
