Method and device for improving write performance of qlc solid state disk, hard disk and medium
Patent Information
- Application Number
- CN202610852384.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-12
- Publication Date
- 2026-08-21
AI Technical Summary
[0005]本发明实施例提供了一种提升QLC固态硬盘写性能的方法、装置、硬盘及介质,旨在解决现有QLC固态硬盘写性能较低的问题
[0010]本发明实施例提供了一种提升QLC固态硬盘写性能的方法、装置、硬盘及介质。其中,所述方法包括:接收用户数据并写入SLC缓存块;当所述SLC缓存块中的数据量达到QLC一次编程所需预设阈值时,从所述SLC缓存块中读取待搬移的所述用户数据,执行QLC一次编程操作,生成对应的元数据并写入当前分配的元数据缓存;将所述元数据缓存中的元数据写入预先分配的临时SLC块中;
Smart Images

Figure CN122614293A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of solid-state drive technology, and in particular to a method, apparatus, hard drive, and medium for improving the write performance of a QLC solid-state drive. Background Technology
[0002] With the continuous development of flash memory technology, QLC (Quad-Level Cell) NAND flash memory has been widely used in solid-state drives (SSDs) due to its higher storage density and lower cost. Each QLC flash memory cell can store 4 bits of data, corresponding to 16 different voltage states. However, because QLC flash memory has a large number of voltage states and requires high programming precision, directly programming all 16 voltage states at once can easily lead to write errors. Therefore, existing technologies typically employ a two-stage programming approach to write QLC data: first, a single programming operation is performed to write data to the memory cell with lower precision; then, a second programming operation is performed to further refine the voltage states based on the first programming operation, ultimately achieving precise programming for all 16 voltage states.
[0003] In the two programming processes, after the first programming is completed, metadata information needs to be generated and temporarily stored. This metadata is used to identify the location, status, and other information of user data for use in the second programming. In existing technologies, to reduce the RAM space occupied by metadata, it is usually stored in the SSD's RAM in a compressed format and then decompressed for use during the second programming. However, the above-mentioned existing technical solutions have the following drawbacks, resulting in low write performance of QLC SSDs: First, the compression and decompression operations of metadata increase write latency. In the two programming processes of completing one layer, multiple metadata compression and decompression operations are required. These operations consume a lot of CPU processing time, directly increasing QLC write latency and reducing write throughput.
[0004] Second, metadata occupies a large amount of RAM, limiting concurrent write capabilities. Even when stored in a compressed format, metadata still requires a significant amount of RAM. For SSD controllers with limited RAM resources, this reduces the RAM available for data caching and other operations, thus limiting the SSD's concurrent write capabilities and impacting overall write performance. Third, excessive CPU load affects write scheduling efficiency. Frequent metadata compression and decompression operations keep the CPU load at a consistently high level, affecting the SSD controller's efficiency in scheduling write tasks and further reducing the write performance of QLC SSDs. Summary of the Invention
[0005] This invention provides a method, apparatus, hard drive, and medium for improving the write performance of QLC solid-state drives, aiming to solve the problem of low write performance of existing QLC solid-state drives.
[0006] In a first aspect, embodiments of the present invention provide a method for improving the write performance of a QLC solid-state drive, comprising: Receive user data and write it to the SLC cache block; When the amount of data in the SLC cache block reaches the preset threshold required for QLC one-time programming, the user data to be moved is read from the SLC cache block, the QLC one-time programming operation is performed, the corresponding metadata is generated and written to the currently allocated metadata cache; Write the metadata in the metadata cache into a pre-allocated temporary SLC block; When the secondary programming trigger condition is met, the corresponding metadata is read from the temporary SLC block, and the corresponding user data is read from the SLC cache block; Based on the read metadata and user data, perform QLC secondary programming operations to complete the migration of the user data to the QLC storage area.
[0007] Secondly, embodiments of the present invention also provide an apparatus for improving the write performance of a QLC solid-state drive, comprising: The receiving unit is used to receive user data and write it into the SLC buffer block; The read generation unit is used to read the user data to be moved from the SLC cache block when the amount of data in the SLC cache block reaches the preset threshold required for QLC one-time programming, perform the QLC one-time programming operation, generate the corresponding metadata and write it into the currently allocated metadata cache. A writing unit is used to write the metadata in the metadata cache into a pre-allocated temporary SLC block; The reading unit is used to read the corresponding metadata from the temporary SLC block and the corresponding user data from the SLC cache block when the secondary programming trigger condition is met. The execution unit is used to perform QLC secondary programming operations based on the read metadata and user data, and to complete the transfer of the user data to the QLC storage area.
[0008] Thirdly, embodiments of the present invention also provide a QLC solid-state drive, the QLC solid-state drive including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the above-described method.
[0009] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the above-described method.
[0010] This invention provides a method, apparatus, hard drive, and medium for improving the write performance of a QLC solid-state drive (SSD). The method includes: receiving user data and writing it to an SLC cache block; when the amount of data in the SLC cache block reaches a preset threshold required for a QLC one-time programming operation, reading the user data to be moved from the SLC cache block, performing a QLC one-time programming operation, generating corresponding metadata, and writing it to a currently allocated metadata cache; and writing the metadata from the metadata cache into a pre-allocated temporary SLC block. When the secondary programming trigger condition is met, the corresponding metadata is read from the temporary SLC block, and the corresponding user data is read from the SLC cache block. Based on the read metadata and user data, a QLC secondary programming operation is performed to complete the migration of the user data to the QLC storage area. The technical solution of this embodiment of the invention avoids metadata compression and decompression operations by writing the metadata required for QLC secondary programming into a pre-allocated temporary SLC block, instead of storing it in RAM in a compressed format. This reduces CPU load, write latency, and RAM usage, effectively improving QLC write performance. Attached Figure Description
[0011] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a flowchart illustrating a method for improving the write performance of a QLC solid-state drive according to an embodiment of the present invention; Figure 2 This is a schematic diagram of a sub-process of a method for improving the write performance of a QLC solid-state drive according to an embodiment of the present invention; Figure 3 This is a schematic diagram comparing the space occupied by QLC secondary programming and metadata according to an embodiment of the present invention; Figure 4 A schematic block diagram of an apparatus for improving the write performance of a QLC solid-state drive, provided in an embodiment of the present invention; Figure 5 This is a schematic block diagram of a QLC solid-state drive provided in an embodiment of the present invention. Detailed Implementation
[0013] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0014] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0015] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0016] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0017] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."
[0018] Currently, in the field of solid-state drive (SSD) technology, existing QLC SSDs have relatively low write performance. To address this issue, this invention proposes a method to improve the write performance of QLC SSDs. This method writes the metadata required for QLC secondary programming into pre-allocated temporary SLC blocks, rather than storing it in RAM in a compressed format. This avoids metadata compression and decompression operations, reduces CPU load, decreases write latency and RAM usage, and effectively improves QLC write performance. The invention will be described in detail below through specific embodiments.
[0019] Please see Figure 1 , Figure 1 This is a flowchart illustrating a method for improving the write performance of a QLC solid-state drive according to an embodiment of the present invention. Figure 1 As shown, the method includes the following steps S110-S150.
[0020] S110: Receive user data and write it to the SLC cache block.
[0021] In this embodiment of the invention, user data sent by the host is received and sequentially written into the SLC cache block in the solid-state drive for temporary storage. The SLC cache block uses single-level cell flash memory, which features fast write speed and low latency, and can quickly accept write requests from the host. User data is accumulated and stored in the SLC cache block, and subsequent migration operations are triggered when the data volume reaches a preset threshold. It should be noted that the host refers to an external device connected to the QLC solid-state drive and sending data read and write requests to the QLC solid-state drive.
[0022] S120. When the amount of data in the SLC cache block reaches the preset threshold required for QLC one-time programming, the user data to be moved is read from the SLC cache block, the QLC one-time programming operation is performed, the corresponding metadata is generated and written to the currently allocated metadata cache.
[0023] In this embodiment of the invention, the preset threshold is set according to the physical page size and concurrent programming capability of the QLC storage area to ensure that the amount of data moved each time can fully utilize the QLC programming bandwidth. After the move is triggered, the user data to be moved is read sequentially from the SLC cache block and transferred to the QLC storage area to perform a programming operation. The first programming operation uses a low-precision write method to quickly write the user data into the QLC storage area, forming a preliminary voltage state distribution. During the execution of the first programming operation, metadata corresponding to the user data is generated synchronously. The metadata includes key information such as the logical address, physical page location, and programming status identifier of the user data. It should be noted that the metadata cache is a dedicated storage area reserved in RAM for temporarily storing the metadata generated by the first programming operation, supporting high-speed read and write operations. The capacity of the metadata cache is configured according to the maximum number of concurrent writes of the QLC to ensure that it can accommodate all the metadata generated by a single concurrent programming operation, preparing for the subsequent transfer of metadata to the temporary SLC block.
[0024] In one embodiment, such as this embodiment, before the step of performing a single QLC programming operation, the method further includes: pre-allocating two sets of metadata caches, and using either set of metadata caches as the currently allocated metadata cache. It should be noted that the capacity of each set of metadata caches is configured according to the maximum concurrent write count of the QLC, ensuring that it can accommodate all metadata generated in a single concurrent programming operation. The two sets of metadata caches are located in RAM, supporting high-speed read and write operations. After allocation, one set of metadata caches is selected as the currently allocated metadata cache to temporarily store the metadata generated by the current batch of QLC single programming. The other set of metadata caches remains in standby mode, waiting to be switched to after the current batch is processed. By alternately allocating the two sets of metadata caches, a pipelined operation for metadata processing is achieved, avoiding delays caused by waiting for release and reallocation, and improving overall write efficiency.
[0025] In one embodiment, such as this one, after QLC primary programming is completed, the metadata is asynchronously written to the pre-allocated temporary SLC block. During the writing of the metadata to the temporary SLC block, the next batch of user data to be moved is read from the SLC cache block, and the QLC primary programming operation is executed in parallel. It should be noted that asynchronous writing means the metadata transfer process runs independently of the main processing flow, and subsequent operations can continue without waiting for the writing to complete, effectively reducing write latency. It should also be noted that the parallel processing mechanism allows metadata writing and data programming to occur simultaneously, fully utilizing the processing bandwidth of the QLC SSD and the concurrency capabilities of the NAND flash memory. Understandably, the combination of asynchronous writing and parallel execution avoids the waiting idle time in traditional serial processing methods, significantly improving data transfer efficiency. The temporary SLC block is specifically used to temporarily store metadata, stored separately from user data, facilitating rapid retrieval during subsequent secondary programming. The overall design optimizes the timing of the QLC write process, reduces CPU idle waiting, and improves the overall write throughput and performance of the SSD.
[0026] S130. Write the metadata in the metadata cache into a pre-allocated temporary SLC block.
[0027] In this embodiment of the invention, the temporary SLC block is a specially allocated storage area in the NAND flash memory, operating in SLC mode, characterized by fast write speed and high reliability. Metadata is written directly to the temporary SLC block in uncompressed format, avoiding the CPU overhead of compression and decompression operations. The metadata in the temporary SLC block is read during secondary programming and works with user data to complete QLC secondary programming, ensuring the accuracy and integrity of data writing. It should be noted that the temporary SLC block is allocated when the user data in the SLC cache block begins to be moved, and the storage space occupied by the temporary SLC block is asynchronously reclaimed after QLC secondary programming is completed. Specifically, when the amount of data accumulated in the SLC cache block reaches a preset threshold, triggering the migration process to the QLC storage area, a dedicated area is allocated from the NAND flash memory as a temporary SLC block to temporarily store the metadata generated during the first programming. After QLC secondary programming is completed, the storage space occupied by the temporary SLC block is asynchronously reclaimed. Asynchronous reclamation means that the space release operation runs independently of the main write process, and subsequent write requests can continue to be processed without waiting for reclamation to complete, avoiding blocking the main process. The reclaimed temporary SLC block space is returned to the available storage pool and can be reallocated for use in subsequent batches. This allocation and reclamation mechanism enables the cyclical reuse of temporary SLC blocks, improves storage space utilization, reduces resource waste, and ensures the timely release of metadata temporary storage space.
[0028] In one embodiment, such as this embodiment, step S130 further includes: releasing the currently allocated metadata cache and allocating another set of metadata caches. It should be noted that releasing the currently allocated metadata cache space allows it to return to the available cache pool. Simultaneously, another set of metadata caches is allocated from the two pre-allocated sets of metadata caches as the new current cache, used to temporarily store metadata generated by the next batch of QLC programming. Through the alternating release and allocation of the two sets of caches, pipelined operations are achieved, avoiding cache wait overhead and improving continuous write efficiency.
[0029] S140. When the secondary programming trigger condition is met, the corresponding metadata is read from the temporary SLC block, and the corresponding user data is read from the SLC cache block.
[0030] In this embodiment of the invention, the secondary programming trigger conditions include: all pages on the same layer have completed one programming iteration, the SSD controller idle time reaches a preset threshold, or the host write request is below a set threshold. These trigger conditions ensure that the data from the first programming iteration is complete and resources are sufficient, guaranteeing a smooth secondary programming process and preventing interruptions that could affect write performance and data reliability.
[0031] Among them, such as Figure 2As shown, step S140 specifically includes steps S141-S143: S141, obtaining the location mapping relationship, wherein the location mapping relationship is used to record the storage location of the user data in the SLC cache block and the storage location of the corresponding metadata in the temporary SLC block; S142, determining the metadata reading location and the user data reading location according to the location mapping relationship; S143, reading the corresponding metadata from the temporary SLC block according to the metadata reading location, and reading the corresponding user data from the SLC cache block according to the user data reading location. It should be noted that the location mapping relationship is established and maintained during the primary programming phase, forming an association index between user data and metadata. The location mapping table is queried to obtain the physical address of the metadata corresponding to the data to be reprogrammed in the temporary SLC block, and the logical address of the user data in the SLC cache block. It should also be noted that the location mapping relationship ensures accurate matching between metadata and user data, avoids data corruption, guarantees the correctness and reliability of secondary programming, and improves the QLC write success rate.
[0032] In one embodiment, such as this embodiment, if a read error is detected during the process of reading the metadata from the temporary SLC block, the currently writing QLC storage area is closed, the currently allocated metadata cache is released, and the migration operation of the user data to the QLC storage area is re-triggered. It should be noted that during the process of reading metadata from the temporary SLC block, the read metadata is checked. If a read error is detected, such as a mismatched checksum or corrupted data, the current metadata is determined to be unusable. At this time, the currently writing QLC storage area is closed, and subsequent programming operations are stopped to prevent erroneous data from being written to flash memory, causing data loss or corruption. Simultaneously, the currently allocated metadata cache space is released, returning it to the available cache pool for reuse in subsequent operations. Subsequently, the SLC cache management module is notified to re-trigger the migration operation of user data from the SLC cache block to the QLC storage area. Re-migrating means rereading the user data from the SLC cache block and re-executing the programming and metadata generation process to ensure that the metadata and user data completely match during the second programming. It should also be noted that this error handling mechanism ensures the reliability and integrity of data writing, avoids data corruption caused by metadata errors, and improves the data security and write success rate of QLC solid-state drives.
[0033] S150. Based on the read metadata and user data, perform QLC secondary programming operations to complete the transfer of user data to the QLC storage area.
[0034] In this embodiment of the invention, QLC secondary programming, based on QLC primary programming, utilizes the voltage state information recorded in the metadata to program the user data. This refines the voltage state distribution in the QLC storage area from an initial distribution to 16 precise states, completing the full storage of 4-bit data. After secondary programming, the user data is formally migrated from the SLC cache block to the QLC storage area, realizing the data transfer to the QLC storage area. After the transfer is complete, the user data copy in the SLC cache block can be cleared, releasing cache space for subsequent writing. Simultaneously, the metadata space in the temporary SLC block is also reclaimed, completing the entire data writing process.
[0035] In one embodiment, such as this embodiment, after the step of performing QLC secondary programming based on the read metadata and user data, the method further includes: determining whether there is still user data to be secondary programmed in the SLC cache block; if there is user data to be secondary programmed, then returning to the step of reading the corresponding metadata from the temporary SLC block according to the metadata reading position; if there is no user data to be secondary programmed, then releasing the metadata cache. It should be noted that since programming may be performed in multiple batches, the SLC cache block may still contain data that has completed primary programming but has not yet undergone secondary programming. If there is user data to be secondary programmed, through cyclic reading and programming, it is ensured that all data that has completed primary programming can successfully complete secondary programming, achieving complete data migration. If there is no user data to be secondary programmed, it indicates that all data in the current migration process has completed secondary programming and been written to the QLC storage area. At this time, the metadata cache space is released, returning it to the available cache pool, and the current secondary programming process ends.
[0036] This loop-based decision-making mechanism ensures the integrity of data migration, avoids missing any batches of data, and releases cache resources in a timely manner to optimize memory usage efficiency.
[0037] In one embodiment, such as this embodiment, please refer to Figure 3 , Figure 3 The diagram shows that QLC NAND flash memory uses a multi-layer structure, including layer 0 and layer 1. Each layer contains multiple pages and planes, with the pages arranged in numerical order. QLC secondary programming requires that the primary programming of the next layer be completed before secondary programming of the next layer can proceed. In the diagram, after the primary programming of layer 0 is completed, layer 1 undergoes primary programming, and then layer 0 undergoes secondary programming, illustrating the timing dependency of inter-layer programming.
[0038] Meanwhile, comparing the metadata space usage, assuming each page corresponds to 64B of metadata, the compressed metadata occupies 32B. In existing technologies, compressed metadata is stored in RAM, occupying 32B × 48 pages × 16 planes = 24576B. This application temporarily stores metadata in temporary SLC blocks, requiring only two sets of pipelined caches at runtime, occupying 64B × 4 pages × 16 planes = 8192B, significantly reducing RAM usage compared to existing technologies.
[0039] In summary, the method for improving QLC solid-state drive write performance in this invention replaces RAM compression storage by writing the metadata required for QLC secondary programming into temporary SLC blocks, thereby avoiding metadata compression and decompression operations, reducing CPU load, and decreasing write latency. The metadata is stored in an uncompressed format in the temporary SLC blocks, significantly reducing RAM space usage and improving concurrent write capabilities. Two sets of metadata cache pipelines are used alternately to avoid cache waiting overhead and improve continuous write efficiency. The location mapping relationship ensures accurate matching between metadata and user data, and the error handling mechanism guarantees data write reliability.
[0040] Figure 4 This is a schematic block diagram of a device 200 for improving the write performance of a QLC solid-state drive according to an embodiment of the present invention. Figure 4 As shown, corresponding to the above-described method for improving the write performance of a QLC solid-state drive (SSD), the present invention also provides an apparatus 200 for improving the write performance of a QLC SSD. This apparatus 200 includes a unit for performing the above-described method for improving the write performance of a QLC SSD, and the apparatus can be configured on a QLC SSD. Specifically, please refer to... Figure 4 The device 200 for improving the write performance of QLC solid-state drives includes a receiving unit 201, a read generation unit 202, a writing unit 203, a reading unit 204, and an execution unit 205. Detailed descriptions of each functional module are as follows: The receiving unit 201 is used to receive user data and write it into the SLC buffer block; The read generation unit 202 is used to read the user data to be moved from the SLC cache block when the amount of data in the SLC cache block reaches the preset threshold required for QLC one-time programming, perform the QLC one-time programming operation, generate the corresponding metadata and write it into the currently allocated metadata cache. The writing unit 203 is used to write the metadata in the metadata cache into a pre-allocated temporary SLC block; The reading unit 204 is used to read the corresponding metadata from the temporary SLC block and the corresponding user data from the SLC cache block when the secondary programming trigger condition is met. The execution unit 205 is used to perform QLC secondary programming operations based on the read metadata and user data to complete the transfer of the user data to the QLC storage area.
[0041] In some embodiments, such as this one, the reading unit 204 is specifically used for: Obtain the location mapping relationship, wherein the location mapping relationship is used to record the storage location of the user data in the SLC cache block and the storage location of the corresponding metadata in the temporary SLC block; The metadata reading location and the user data reading location are determined based on the location mapping relationship; The corresponding metadata is read from the temporary SLC block according to the metadata read position, and the corresponding user data is read from the SLC cache block according to the user data read position.
[0042] In some embodiments, such as this one, the apparatus 200 for improving the write performance of a QLC solid-state drive further includes: An allocation unit is used to pre-allocate two sets of the metadata cache and use either set of the metadata cache as the currently allocated metadata cache. The first release unit is used to release the currently allocated metadata cache and allocate another set of metadata caches; The judgment unit is used to determine whether the user data to be reprogrammed still exists in the SLC cache block; The execution unit is returned to the step of reading the corresponding metadata from the temporary SLC block according to the metadata reading position if the user data to be reprogrammed exists. The second release unit is used to release the metadata cache if there is no user data to be reprogrammed.
[0043] The aforementioned device for improving the write performance of QLC solid-state drives can be implemented as a computer program, which can, for example... Figure 5 It runs on the QLC solid-state drive shown.
[0044] Please see Figure 5 , Figure 5 This is a schematic block diagram of a QLC solid-state drive provided in an embodiment of the present invention. The QLC solid-state drive 300 is a device capable of personnel detection.
[0045] See Figure 5 The QLC solid-state drive 300 includes a processor 302, a memory, and a network interface 305 connected via a system bus 301. The memory may include a non-volatile storage medium 303 and internal memory 304.
[0046] The non-volatile storage medium 303 may store an operating system 3031 and a computer program 3032. When the computer program 3032 is executed, it causes the processor 302 to execute a method to improve the write performance of the QLC solid-state drive.
[0047] The processor 302 provides computing and control capabilities to support the operation of the entire QLC solid-state drive 300.
[0048] The internal memory 304 provides an environment for the execution of the computer program 3032 in the non-volatile storage medium 303. When the computer program 3032 is executed by the processor 302, the processor 302 can execute a method to improve the write performance of the QLC solid-state drive.
[0049] This network interface 305 is used for network communication with other devices. Those skilled in the art will understand that... Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the QLC solid-state drive 300 to which the present invention is applied. The specific QLC solid-state drive 300 may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0050] The processor 302 is used to run a computer program 3032 stored in the memory to implement any embodiment of the above-described method for improving the write performance of QLC solid-state drives.
[0051] It should be understood that, in this embodiment of the invention, the processor 302 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0052] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by a processor in the computer system to implement the process steps of the embodiments of the above methods.
[0053] Therefore, the present invention also provides a storage medium. This storage medium can be a computer-readable storage medium. The storage medium stores a computer program. When executed by a processor, the computer program causes the processor to perform any embodiment of the method described above for improving the write performance of a QLC solid-state drive.
[0054] The storage medium can be any computer-readable storage medium capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), magnetic disk, or optical disk.
[0055] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0056] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0057] The steps in the method of this invention can be adjusted, merged, or reduced in order according to actual needs. The units in the device of this invention can be merged, divided, or reduced according to actual needs. Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0058] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a QLC solid-state drive to execute all or part of the steps of the methods described in the various embodiments of the present invention.
[0059] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0060] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Since these modifications and variations fall within the scope of the claims and their equivalents, this invention also intends to include these modifications and variations.
[0061] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for improving the write performance of a QLC solid-state drive, characterized in that, include: Receive user data and write it to the SLC cache block; When the amount of data in the SLC cache block reaches the preset threshold required for QLC one-time programming, the user data to be moved is read from the SLC cache block, the QLC one-time programming operation is performed, the corresponding metadata is generated and written to the currently allocated metadata cache; Write the metadata in the metadata cache into a pre-allocated temporary SLC block; When the secondary programming trigger condition is met, the corresponding metadata is read from the temporary SLC block, and the corresponding user data is read from the SLC cache block; Based on the read metadata and user data, perform QLC secondary programming operations to complete the migration of the user data to the QLC storage area.
2. The method according to claim 1, characterized in that, Before the step of performing a single QLC programming operation, the following steps are also included: Pre-allocate two sets of the metadata cache, and use either set of the metadata cache as the currently allocated metadata cache; After the step of writing the metadata in the metadata cache into the pre-allocated temporary SLC block, the method further includes: Release the currently allocated metadata cache and allocate another set of metadata caches.
3. The method according to claim 1, characterized in that, The steps of reading the corresponding metadata from the temporary SLC block and reading the corresponding user data from the SLC cache block include: Obtain the location mapping relationship, wherein the location mapping relationship is used to record the storage location of the user data in the SLC cache block and the storage location of the corresponding metadata in the temporary SLC block; The metadata reading location and the user data reading location are determined based on the location mapping relationship; The corresponding metadata is read from the temporary SLC block according to the metadata read position, and the corresponding user data is read from the SLC cache block according to the user data read position.
4. The method according to claim 1, characterized in that, After QLC programming is completed, the write operation of the metadata to the pre-allocated temporary SLC block is started asynchronously; during the process of writing the metadata to the temporary SLC block, the next batch of user data to be moved is read from the SLC cache block, and the QLC programming operation is executed in parallel.
5. The method according to claim 1, characterized in that, If a read error is detected during the process of reading the metadata from the temporary SLC block, the QLC storage area currently being written to is closed, the currently allocated metadata cache is released, and the migration operation of the user data to the QLC storage area is retried.
6. The method according to any one of claims 1-5, characterized in that, After the step of performing QLC secondary programming operations based on the read metadata and user data, the method further includes: Determine whether the user data to be reprogrammed still exists in the SLC cache block; If the user data to be reprogrammed exists, then return to the step of reading the corresponding metadata from the temporary SLC block according to the metadata reading location; If the user data to be reprogrammed does not exist, then the metadata cache is released.
7. The method according to claim 1, characterized in that, The temporary SLC block is allocated when the user data in the SLC cache block begins to be moved, and the storage space occupied by the temporary SLC block is asynchronously reclaimed after the QLC secondary programming is completed.
8. A device for improving the write performance of a QLC solid-state drive, characterized in that, include: The receiving unit is used to receive user data and write it into the SLC buffer block; The read generation unit is used to read the user data to be moved from the SLC cache block when the amount of data in the SLC cache block reaches the preset threshold required for QLC one-time programming, perform the QLC one-time programming operation, generate the corresponding metadata and write it into the currently allocated metadata cache. A writing unit is used to write the metadata in the metadata cache into a pre-allocated temporary SLC block; The reading unit is used to read the corresponding metadata from the temporary SLC block and the corresponding user data from the SLC cache block when the secondary programming trigger condition is met. The execution unit is used to perform QLC secondary programming operations based on the read metadata and user data, and to complete the transfer of the user data to the QLC storage area.
9. A QLC solid-state drive, characterized in that, The QLC solid-state drive includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, can implement the method as described in any one of claims 1-7.