Multi-stream ssd management method, device, computer equipment and storage medium

By allocating the same write block to multi-stream SSDs and adding timestamps, rebuilding the mapping table and performing data migration, the problems of high mapping reconstruction complexity and low data reliability in multi-stream SSDs are solved, thus simplifying data management and improving reliability.

CN115454345BActive Publication Date: 2026-04-21SUZHOU UNIONMEMORY INFORMATION SYST LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SUZHOU UNIONMEMORY INFORMATION SYST LTD
Filing Date
2022-09-16
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing multi-stream SSDs suffer from high mapping and reconstruction complexity and reduced data reliability due to the interleaving of multiple write points during data writing, and the poor reliability of unwritten physical blocks.

Method used

By allocating the same host write block to multiple data streams, adding a first timestamp to them, saving the stream number, rebuilding the mapping table according to the timestamp order after the write operation, using the newly written data to overwrite the old data, and allocating garbage collection blocks and writing them in order when data is moved.

Benefits of technology

It simplifies the complexity of mapping table reconstruction, improves data reliability, avoids the overhead of multiple write blocks, and enhances the simplicity of data management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115454345B_ABST
    Figure CN115454345B_ABST
Patent Text Reader

Abstract

This invention discloses a multi-stream SSD management method, apparatus, computer device, and storage medium. The method includes: responding to a request from a host to write multiple data streams; allocating the same host write block for the multiple data streams; adding a first timestamp to the allocated host write block; performing write operations on the multiple data streams; and saving the stream numbers at the time of writing the multiple data streams. This invention enables the mixed storage of different data streams on the same write block in a multi-stream scenario, avoiding the overhead of opening multiple write blocks, simplifying data maintenance, and improving data reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of storage technology, and more specifically to a multi-stream SSD management method, apparatus, computer equipment, and storage medium. Background Technology

[0002] SSDs (Solid State Drives) have been widely used in various applications and are gradually replacing traditional HDDs in the PC market, providing users with a better experience in terms of reliability and performance.

[0003] SSDs are used in many typical scenarios in both consumer and enterprise applications. To improve the corresponding user experience or performance / reliability metrics, targeted design optimizations are required. In traditional storage applications, data written by the host is mixed and stored within the SSD. However, in some newer scenarios, the host identifies multiple write streams and carries corresponding flags when writing to the SSD. The data attributes of different streams may differ, such as update frequency, data temperature, and storage reliability.

[0004] Due to the existence of multi-stream applications, existing SSDs typically need to start a new write point (a set of blank physical blocks) when they receive new stream information that is inconsistent with the current write point. Because there are multiple write points interleaved, relying solely on the timestamp of the physical block is no longer sufficient to determine the age of the data; timestamps at the physical page level must be maintained, which is more costly. Correspondingly, the complexity of determining the age of data during reconstruction is also higher. In addition, due to the presence of multiple host write points, there are more incomplete physical blocks, and the physical characteristics of NAND reduce the reliability of incomplete physical blocks. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a multi-stream SSD management method, device, computer equipment and storage medium to simplify the complexity of mapping table reconstruction and improve data reliability.

[0006] To achieve the above objectives, the present invention adopts the following technical solution:

[0007] Firstly, multi-stream SSD management methods include:

[0008] Respond to requests from the host to write multiple data streams;

[0009] Allocate the same host write block for multiple data streams;

[0010] Add a first timestamp to the allocated host write block;

[0011] Perform write operations on multiple data streams;

[0012] Store the stream number when multiple data streams are written.

[0013] The further technical solution is as follows: the host write block is composed of physical blocks provided by multiple DIEs in the SSD.

[0014] The further technical solution is that the physical blocks provided by each of the multiple DIEs have the same or different numbers.

[0015] The further technical solution is that the number of Pages provided by each physical block in multiple DIEs is the same.

[0016] Its further technical solutions include:

[0017] Power-on response to the request to rebuild host data mapping;

[0018] The System Meta within each physical block is scanned sequentially according to the timestamps of the host writing to the physical blocks in order to reconstruct the mapping table.

[0019] The further technical solution is as follows: The step of sequentially scanning the System Meta within the physical blocks according to the timestamp order of the physical blocks written by the host to reconstruct the mapping table includes:

[0020] For data corresponding to the same logical address, the new data written later will overwrite the old data written earlier.

[0021] Its further technical solutions include:

[0022] Respond to data migration requests;

[0023] Allocate garbage collection and write it to the block;

[0024] Add a second timestamp to the allocated garbage collection write block;

[0025] All non-empty physical blocks in the host write block are sorted according to the first timestamp, and the target data is searched from the physical blocks with timestamps earlier than the second timestamp.

[0026] All target data found is read from the host write block and written to the garbage collection write block.

[0027] Secondly, a multi-stream SSD management device includes a first response unit, a first allocation unit, an addition unit, an execution unit, and a storage unit;

[0028] The first response unit is used to respond to a request from the host to write multiple data streams;

[0029] The first allocation unit is used to allocate the same host write block for multiple data streams;

[0030] The adding unit is used to add a first timestamp to the allocated host write block;

[0031] The execution unit is used to perform write operations on multiple data streams;

[0032] The storage unit is used to store the stream number when multiple data streams are written.

[0033] Thirdly, a computer device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor, when executing the computer program, implements the multi-stream SSD management method as described above.

[0034] Fourthly, a computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the multi-stream SSD management method described above.

[0035] The advantages of this invention compared to existing technologies are as follows: By allocating the same host write block to multiple data streams written by the host and adding a first timestamp, this invention saves the stream numbers of the multiple data streams after the write operation is performed. This enables the mixed storage of different data streams on the same write block in multi-stream scenarios, avoiding the overhead of opening multiple write blocks, simplifying data maintenance, and improving data reliability.

[0036] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other objects, features and advantages of the present invention more obvious and understandable, preferred embodiments are described in detail below. Attached Figure Description

[0037] 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.

[0038] Figure 1 A flowchart illustrating a multi-stream SSD management method provided in a specific embodiment of the present invention;

[0039] Figure 2 A schematic block diagram of a multi-stream SSD management device provided for a specific embodiment of the present invention;

[0040] Figure 3 A schematic block diagram of a computer device provided for a specific embodiment of the present invention;

[0041] Figure 4 A schematic diagram of a typical existing NAND flash memory structure provided for a specific embodiment of the present invention;

[0042] Figure 5 A schematic diagram of a conventional non-multi-stream (single-stream) SSD management method provided for a specific embodiment of the present invention;

[0043] Figure 6 A schematic diagram of an existing multi-stream SSD writing method and reconstruction method provided for a specific embodiment of the present invention;

[0044] Figure 7 A schematic diagram of the improved NAND composition provided in a specific embodiment of the present invention;

[0045] Figure 8 A schematic diagram illustrating the improved multi-stream writing and reconstruction provided for a specific embodiment of the present invention;

[0046] Figure 9 This is a schematic diagram illustrating the separation of different streams during data transfer, provided as a specific embodiment of the present invention. Detailed Implementation

[0047] 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.

[0048] 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.

[0049] 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.

[0050] 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.

[0051] For SSDs, the data written by the host is generally divided into single stream and multi stream. Single stream refers to a single data stream written by a single host program, while multi stream refers to multiple data streams written by multiple host programs.

[0052] like Figure 4 As shown, a typical NAND flash memory consists of: DIE (a cell that can be operated independently and concurrently); Block (a cell that can be erased independently, where the entire Block must be erased before the next write after the data at each physical location is written); and Page (a read / write cell, where Pages within the same physical block must be programmed sequentially: 0->1->2->3…).

[0053] A page typically consists of two types of data:

[0054] User Data: Data written by the host. The host accesses the SSD in LBA (512 bytes), which is internally divided into LPA (4KB) for easy management: LBA 0-7 correspond to LPA 0, LBA 8-15 correspond to LPA 1, and so on.

[0055] System Meta: System management metadata, including user data address (LPA), physical block timestamp (Block TS), and other data.

[0056] like Figure 5 As shown, the existing non-multi-stream (single-stream) SSD management method is as follows: An SSD typically consists of multiple DIEs to meet capacity and concurrency requirements. For ease of explanation, we will use four DIEs as an example. Each DIE outputs one physical block to form a write block. Figure 5The write block consists of physical blocks with the same number within each DIE: for example, four Block 0s in DIE 0 / 1 / 2 / 3 form write block Block 0. When data needs to be written, the SSD allocates a write block and assigns a timestamp (TS). This TS is monotonically increasing; each time data is written to a blank physical block, the corresponding timestamp value is incremented. Within a physical block X, the write order is: DIE 0 Block X Page 0, DIE 1 Block X Page 0, DIE 2 Block X Page 0, DIE 3 Block X Page 0. DIE 0 Block X Page 1, DIE 1 Block X Page 1, DIE 2 Block X Page 1, DIE 3 Block X Page 1. DIE 0 Block X Page 2, DIE 1 Block X Page 2, DIE 2 Block X Page 2, DIE 3 Block X Page 2… SSDs typically have two types of write points: a host write point, which stores newly written data from the host, and a data migration write point, used for moving idle data during disk defragmentation or garbage collection. In this management mode, when rebuilding the mapping from host data logical addresses to NAND physical addresses after a power outage, the system is sorted according to the physical block timestamps, and then the System Meta within each physical page is scanned sequentially to update the mapping table. For data corresponding to the same logical address, later-written data (new data) will overwrite earlier-written data (old data). Regarding the newness of data, the following rules apply: if two data entries are in different physical blocks, the data with the larger corresponding physical block timestamp is considered newer; if two data entries are in the same physical block, the later-written data is considered newer, following the write order described above (DIE0 Page 0 -> DIE1 Page 0…).

[0057] like Figure 6 As shown, the existing multi-stream SSD writing and rebuilding methods are as follows: In multi-stream applications, the host carries the corresponding stream number when writing the corresponding data. Streams with different numbers have different attributes and need to be stored independently in the SSD (for example, some streams need to exist in high-performance physical blocks, or they need to be stored in low-wear physical blocks).

[0058] For ease of explanation, we will use four streams for the following description. For each stream, the SSD allocates one write block, such as... Figure 6 Block A is written to stream 1; Block B is written to stream 2; Block C is written to stream 3; and Block D is written to stream 4.

[0059] Because writes to the host are dynamically initiated based on the behavior of the programs running on it, the order of writes between streams is unpredictable; the following scenario could occur between streams 1 / 2 / 3 / 4:

[0060] Data with the same host logical address is written to different streams, as shown in the figure: User data A_1, User data A_2, User data A_3, User data A_4, and User data A_5. This means that User data A was written at different times; only the last one written is the latest data.

[0061] Writes between streams are completely interleaved, so the traditional method of determining data age based on "physical block timestamp + write order within the physical block" used in non-multi-stream SSDs is no longer applicable. A globally monotonically increasing timestamp needs to be maintained at the physical page level, which significantly increases the complexity of timestamp management and mapping reconstruction. Figure 6 In the data, user data A_1, user data A_3, user data A_4, and user data A_5 belong to different streams, and their order cannot be easily determined. It is necessary to record the timestamp of each write to determine which is newer and which is older when rebuilding after a power outage.

[0062] As described above, existing multi-stream SSD writing methods suffer from complex mapping and reconstruction, and are inconvenient for data management. This invention addresses this issue by designing an SSD management method for multi-stream scenarios. The invention will be illustrated below with specific embodiments.

[0063] like Figure 1 As shown, the multi-stream SSD management method includes a writing method, which includes the following steps: S10-S50.

[0064] S10, respond to the host's request to write multiple data streams.

[0065] S20. Allocate the same host write block for multiple data streams.

[0066] S30. Add a first timestamp to the allocated host write block.

[0067] S40, Perform write operations on multiple data streams.

[0068] S50, save the stream number when writing multiple data streams.

[0069] For S10-S50, in this embodiment, as follows Figure 7 , Figure 8 As shown, Figure 7In this context, the user data address (LPA) is derived from the host data's LBA. The physical block timestamp (Block TS) is monotonically increasing, incrementing with each instance of data being written to a blank physical block. The stream ID is the stream information carried by the host during writes.

[0070] like Figure 8 As shown, at a certain point in time, the SSD maintains only a single host write block, such as host write block BlockA, whose first timestamp is TS_A.

[0071] Data streams numbered 1, 2, and 4 are sequentially interleaved with the following information: Stream 1 writes: LPA_100_1, LPA_101_1, LPA_102_1, LPA_103_1; Stream 2 writes: LPA_102_2, LPA_103_2, LPA_104_1, LPA_105_1; Stream 4 writes: LPA_105_2, LPA_106_1, LPA_107_1, LPA_108_1. Within the System Meta storage area for each user's data, the first timestamp is TS_A, and the Stream ID is set to the stream number (1 / 2 / 4) at the time of writing.

[0072] At this point, the old and new data are as follows:

[0073] LPA_100, LPA_101, LPA_104, LPA_106, LPA_107, and LPA_108 were written only once, with the new data being LPA_100_1, LPA_101_1, LPA_104_1, LPA_106_1, LPA_107_1, and LPA_108_1, respectively.

[0074] LPA_102 was written twice, and the new data is LPA_102_2 (written by stream 2).

[0075] LPA_103 was written twice, and the new data is LPA_103_2 (written by stream 2).

[0076] LPA_105 was written twice, and the new data is LPA_105_2 (written by stream 4).

[0077] It should be noted that the host write block consists of physical blocks provided by multiple DIEs within the SSD. The physical blocks provided by each of the multiple DIEs may have the same or different numbering. The number of pages in each physical block provided by each of the multiple DIEs is the same.

[0078] In one embodiment, the multi-stream SSD management method further includes a reconstruction method, which includes the following steps: S60-S70.

[0079] S60, Power-on response to the request to rebuild host data mapping.

[0080] S70. Scan the SystemMeta within the physical blocks sequentially according to the timestamps of the physical blocks written by the host, in order to rebuild the mapping table.

[0081] For S60 and S70, in the event of a power outage, since the rules for writing blocks are the same as for single-stream, the reconstruction method used in single-stream can be continued. The blocks are sorted according to their timestamps, and then the System Meta within each physical page is scanned sequentially to update the mapping table. For data corresponding to the same logical address, data written later (new data) will overwrite data written earlier (old data).

[0082] In one embodiment, step S70 specifically includes the following steps:

[0083] S701: For data corresponding to the same logical address, the newly written data overwrites the previously written data.

[0084] Regarding the newness of data, the following rules apply: If two data entries are located in different physical blocks, the data with the larger timestamp of the corresponding physical block is considered newer; if two data entries are located in the same physical block, the data written later is considered newer, following the writing order described above (DIE 0 Page 0 -> DIE 1 Page 0…).

[0085] In one embodiment, the multi-stream SSD management method further includes a data migration method, which includes the following steps: S80-S120.

[0086] S80, respond to the data transfer request;

[0087] S90, Allocate garbage collection and write to the block;

[0088] S100, Add a second timestamp to the allocated garbage collection write block;

[0089] S110. Sort all non-empty physical blocks in the host write block according to the first timestamp, and search for target data from physical blocks with timestamps smaller than the second timestamp.

[0090] S120. Read all the target data found from the host write block and write it to the garbage collection write block.

[0091] like Figure 9As shown, when the SSD is internally idle (hostless command) or garbage collection triggers data migration, a garbage collection write block B (with a physical block timestamp of TS_B) is allocated internally, assuming it contains data with Stream ID 1. All non-empty physical blocks are sorted in chronological order of their timestamps. The system searches among physical blocks with timestamps less than TS_B to see if they contain data with Stream ID 1 that is the latest data at the corresponding logical address (which has not been overwritten by the host since).

[0092] like Figure 9 As shown, the source block 0 / 1 contains valid / latest data with stream id 1. Therefore, the valid user data with stream id 1 in the corresponding physical block is read from the source block 0 / 1 and written to block B. The system data is set as follows: LPA remains unchanged; Stream ID remains unchanged; and the physical block timestamp is changed from the original TS_0 / TS_1 to the timestamp TS_B of the current block being written.

[0093] Once TS_B is full, a new garbage collection write block can be allocated to collect data from other streams with the same ID.

[0094] Once all valid data for all stream IDs within the source block has been moved, the source physical block can be erased for subsequent writing. At this point, data mixed in the same write block during host writing can be separated into independent physical blocks.

[0095] This invention allocates the same host write block to multiple data streams written by the host and adds a first timestamp. After executing write operations for multiple data streams, it saves the stream numbers at the time of writing. This enables the mixed storage of different data streams on the same write block in multi-stream scenarios, avoiding the overhead of opening multiple write blocks, simplifying data maintenance, and improving data reliability.

[0096] Figure 2 This is a schematic block diagram of a multi-stream SSD management device provided in an embodiment of the present invention; corresponding to the multi-stream SSD management method described above, an embodiment of the present invention also provides a multi-stream SSD management device 100.

[0097] like Figure 2 As shown, the multi-stream SSD management device 100 includes a first response unit 110, a first allocation unit 120, an addition unit 130, an execution unit 140, and a storage unit 150.

[0098] The first response unit 110 is used to respond to a request from the host to write multiple data streams.

[0099] The first allocation unit 120 is used to allocate the same host write block for multiple data streams.

[0100] Add unit 130 to add a first timestamp to the allocated host write block.

[0101] The execution unit 140 is used to perform write operations on multiple data streams.

[0102] Storage unit 150 is used to store the stream number when multiple data streams are written.

[0103] In this embodiment, as Figure 7 , Figure 8 As shown, Figure 7 In this context, the user data address (LPA) is derived from the host data's LBA. The physical block timestamp (Block TS) is monotonically increasing, incrementing with each instance of data being written to a blank physical block. The stream ID is the stream information carried by the host during writes.

[0104] like Figure 8 As shown, at a certain point in time, the SSD maintains only a single host write block, such as host write block A, whose first timestamp is TS_A.

[0105] Data streams numbered 1, 2, and 4 are sequentially interleaved with the following information: Stream 1 writes: LPA_100_1, LPA_101_1, LPA_102_1, LPA_103_1; Stream 2 writes: LPA_102_2, LPA_103_2, LPA_104_1, LPA_105_1; Stream 4 writes: LPA_105_2, LPA_106_1, LPA_107_1, LPA_108_1. Within the System Meta storage area for each user's data, the first timestamp is TS_A, and the Stream ID is set to the stream number (1 / 2 / 4) at the time of writing.

[0106] At this point, the old and new data are as follows:

[0107] LPA_100, LPA_101, LPA_104, LPA_106, LPA_107, and LPA_108 were written only once, with the new data being LPA_100_1, LPA_101_1, LPA_104_1, LPA_106_1, LPA_107_1, and LPA_108_1, respectively.

[0108] LPA_102 was written twice, and the new data is LPA_102_2 (written by stream 2).

[0109] LPA_103 was written twice, and the new data is LPA_103_2 (written by stream 2).

[0110] LPA_105 was written twice, and the new data is LPA_105_2 (written by stream 4).

[0111] It should be noted that the host write block consists of physical blocks provided by multiple DIEs within the SSD. The physical blocks provided by each of the multiple DIEs may have the same or different numbering. The number of pages in each physical block provided by each of the multiple DIEs is the same.

[0112] In one embodiment, the multi-stream SSD management device 100 further includes a second response unit and a scanning unit.

[0113] The second response unit is used to respond to requests to rebuild the host data mapping upon power-up.

[0114] The scanning unit is used to scan the System Meta within the physical blocks sequentially according to the timestamps of the physical blocks written by the host, in order to reconstruct the mapping table.

[0115] In the event of a power outage, since the rules for writing blocks are the same as for single-stream, the reconstruction method used in single-stream can be continued. The blocks are sorted according to their timestamps, and then the System Meta within each physical page is scanned sequentially to update the mapping table: for data corresponding to the same logical address, data written later (new data) will overwrite data written earlier (old data).

[0116] In one embodiment, the multi-stream SSD management device 100 further includes a third response unit, an allocation unit, an addition unit, a search unit, and a read unit.

[0117] The third response unit is used to respond to data transfer requests.

[0118] Allocation unit, used to allocate garbage collection write blocks.

[0119] An additional unit is added to add a second timestamp to the allocated garbage collection write block.

[0120] The search unit is used to sort all non-empty physical blocks in the host write block according to the first timestamp order, and search for target data from physical blocks with timestamps smaller than the second timestamp.

[0121] The read unit is used to read all the target data found from the host write block and write it to the garbage collection write block.

[0122] like Figure 9As shown, when the SSD is internally idle (hostless command) or garbage collection triggers data migration, a garbage collection write block B (with a physical block timestamp of TS_B) is allocated internally, assuming it contains data with Stream ID 1. All non-empty physical blocks are sorted in chronological order of their timestamps. The system searches among physical blocks with timestamps less than TS_B to see if they contain data with Stream ID 1 that is the latest data at the corresponding logical address (which has not been overwritten by the host since).

[0123] like Figure 9 As shown, the source block 0 / 1 contains valid / latest data with stream id 1. Therefore, the valid user data with stream id 1 in the corresponding physical block is read from the source block 0 / 1 and written to block B. The system data is set as follows: LPA remains unchanged; Stream ID remains unchanged; and the physical block timestamp is changed from the original TS_0 / TS_1 to the timestamp TS_B of the current block being written.

[0124] Once TS_B is full, a new garbage collection write block can be allocated to collect data from other streams with the same ID.

[0125] Once all valid data for all stream IDs within the source block has been moved, the source physical block can be erased for subsequent writing. At this point, data mixed in the same write block during host writing can be separated into independent physical blocks.

[0126] The aforementioned multi-stream SSD management device can be implemented as a computer program, which can, for example... Figure 3 It runs on the computer device shown.

[0127] Please see Figure 3 , Figure 3 This is a schematic block diagram of a computer device provided in an embodiment of this application. The computer device 500 can be a server, wherein the server can be a standalone server or a server cluster composed of multiple servers.

[0128] like Figure 3 As shown, the computer device includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the multi-stream SSD management method described above.

[0129] The computer device 700 can be a terminal or a server. The computer device 700 includes a processor 720, a memory, and a network interface 750 connected via a system bus 710, wherein the memory may include a non-volatile storage medium 730 and internal memory 740.

[0130] The non-volatile storage medium 730 can store an operating system 731 and a computer program 732. When the computer program 732 is executed, it enables the processor 720 to perform any multi-stream SSD management method.

[0131] The processor 720 provides computing and control capabilities to support the operation of the entire computer device 700.

[0132] The internal memory 740 provides an environment for the execution of the computer program 732 in the non-volatile storage medium 730. When the computer program 732 is executed by the processor 720, the processor 720 can execute any multi-stream SSD management method.

[0133] This network interface 750 is used for network communication, such as sending assigned tasks. Those skilled in the art will understand that... Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device 700 to which the present application is applied. The specific computer device 700 may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements. The processor 720 is used to run program code stored in memory to implement the following steps:

[0134] Multi-stream SSD management methods include:

[0135] Respond to requests from the host to write multiple data streams;

[0136] Allocate the same host write block for multiple data streams;

[0137] Add a first timestamp to the allocated host write block;

[0138] Perform write operations on multiple data streams;

[0139] Store the stream number when multiple data streams are written.

[0140] In one embodiment: the host write block consists of physical blocks provided by multiple DIEs in the SSD.

[0141] In one embodiment: the physical blocks provided in each of the multiple DIEs may have the same or different numbers.

[0142] In one embodiment: the number of Pages provided in each of the multiple DIEs is the same.

[0143] In one embodiment: it further includes:

[0144] Power-on response to the request to rebuild host data mapping;

[0145] The System Meta within each physical block is scanned sequentially according to the timestamps of the host writing to the physical blocks in order to reconstruct the mapping table.

[0146] In one embodiment: the step of sequentially scanning the System Meta within the physical blocks according to the timestamps of the physical blocks written by the host to reconstruct the mapping table includes:

[0147] For data corresponding to the same logical address, the new data written later will overwrite the old data written earlier.

[0148] In one embodiment: it further includes:

[0149] Respond to data migration requests;

[0150] Allocate garbage collection and write it to the block;

[0151] Add a second timestamp to the allocated garbage collection write block;

[0152] All non-empty physical blocks in the host write block are sorted according to the first timestamp, and the target data is searched from the physical blocks with timestamps earlier than the second timestamp.

[0153] All target data found is read from the host write block and written to the garbage collection write block.

[0154] It should be understood that in the embodiments of this application, the processor 720 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.

[0155] Those skilled in the art will understand that Figure 3The structure of the computer device 700 shown does not constitute a limitation on the computer device 700, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0156] In another embodiment of the present invention, a computer-readable storage medium is provided. This computer-readable storage medium may be a non-volatile computer-readable storage medium. The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the multi-stream SSD management method disclosed in the embodiments of the present invention.

[0157] Those skilled in the art will readily understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. 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 composition and steps of each example have been generally described in terms of function 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 implementation should not be considered beyond the scope of this invention.

[0158] In the embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Units with the same function may be grouped into one unit. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, or it may be an electrical, mechanical, or other form of connection.

[0159] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention, depending on actual needs.

[0160] Furthermore, the functional units in the various embodiments of the present 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. The integrated unit can be implemented in hardware or as a software functional unit.

[0161] 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 computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks.

[0162] 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 multi-stream SSD management method, characterized in that, include: Respond to requests from the host to write multiple data streams; Allocate the same host write block for multiple data streams; Add a first timestamp to the allocated host write block; Perform write operations on multiple data streams; Store the stream number when multiple data streams are written.

2. The multi-stream SSD management method according to claim 1, characterized in that, The host write block consists of physical blocks provided by multiple DIEs in the SSD.

3. The multi-stream SSD management method according to claim 2, characterized in that, The physical blocks provided in multiple DIEs may have the same or different numbers.

4. The multi-stream SSD management method according to claim 2, characterized in that, The number of Pages provided for each physical block in multiple DIEs is the same.

5. The multi-stream SSD management method according to claim 1, characterized in that, Also includes: Power-on response to the request to rebuild host data mapping; The System Meta within each physical block is scanned sequentially according to the timestamps of the host writing to the physical blocks in order to reconstruct the mapping table.

6. The multi-stream SSD management method according to claim 5, characterized in that, The step of sequentially scanning the System Meta within the physical blocks according to the timestamps of the physical blocks written by the host to reconstruct the mapping table includes: For data corresponding to the same logical address, the new data written later will overwrite the old data written earlier.

7. The multi-stream SSD management method according to claim 1, characterized in that, Also includes: Respond to data migration requests; Allocate garbage collection and write it to the block; Add a second timestamp to the allocated garbage collection write block; All non-empty physical blocks in the host write block are sorted according to the first timestamp, and the target data is searched from the physical blocks with timestamps earlier than the second timestamp. All target data found is read from the host write block and written to the garbage collection write block.

8. A multi-stream SSD management device, characterized in that, It includes a first response unit, a first allocation unit, an addition unit, an execution unit, and a storage unit; The first response unit is used to respond to a request from the host to write multiple data streams; The first allocation unit is used to allocate the same host write block for multiple data streams; The adding unit is used to add a first timestamp to the allocated host write block; The execution unit is used to perform write operations on multiple data streams; The storage unit is used to store the stream number when multiple data streams are written.

9. A computer device, characterized in that, The system includes a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor, when executing the computer program, implements the multi-stream SSD management method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which includes program instructions. When the program instructions are executed by a processor, the processor performs the multi-stream SSD management method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Methods for multi-stream garbage collection

    CN108733322A

  • Data storage method, SSD controller, SSD and electronic equipment

    CN114327300A