A write processing method and device of a ZNS solid state disk, equipment and medium

By setting the writable zone space of the host and determining the LPA overwrite write flag, the problem of adaptation and mapping relationship in the transformation from traditional SSD to ZNSSSD is solved, realizing an efficient ZNS solution that supports concurrent and random writes, reduces write abandonment rate, and improves device lifespan and delivery efficiency.

CN116301588BActive Publication Date: 2026-06-16成都芯忆联信息技术有限公司

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
成都芯忆联信息技术有限公司
Filing Date
2023-01-17
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

The transition from traditional SSDs to ZNSSSDs requires upper-layer software to be adapted, and may lead to write errors in random write scenarios. In addition, it is necessary to maintain the mapping relationship of logical addresses, which affects delivery efficiency.

Method used

By setting the writable zone space of the host, the system receives and determines whether the command carries the LPA overwrite identifier. If it does, the overwrite is performed in the zone space. If it does not, the system modifies the FTL to allocate physical space and aligns the zone size with the ZNSblock size, thus simplifying the interaction between concurrent and random writes.

🎯Benefits of technology

It achieves an efficient ZNS solution that does not require maintaining mapping relationships, supports concurrent and random writes, reduces write abandonment rate, and improves device lifespan and delivery efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116301588B_ABST
    Figure CN116301588B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a ZNS solid state disk write processing method, device, equipment and medium, the method comprising: setting a zone space writable by a host; receiving a command issued by the host; judging whether the command issued by the host carries an LPA overwrite write identifier; if the LPA overwrite write identifier is carried, performing overwrite write in the zone space writable by the host according to the command. In the present application, the host can write in the order of LPA or randomly in the ZNS storage space, the host does not need to perceive the arrangement of data on the medium, the equipment does not perform GC on the ZNS storage space, and the host releases the medium space occupied by the ZNS at one time in the ZNS mode. The effect of simplifying ZNS concurrent write random write interaction and reducing WA is achieved. In addition, the size of the selected zone is aligned with the ZNS block size, which facilitates the mapping of the zone and the physical space and reduces redundant space.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to solid-state drives (SSDs), and more specifically to a write processing method, apparatus, device, and medium for a ZNS SSD. Background Technology

[0002] Traditional SSDs (Solid State Drives) place data based on the order of data stream requests. When multiple application data streams are sent simultaneously, the data is mixed together and written to the disk.

[0003] ZNSSSD divides the entire LBA range of the SSD namespace into several zones of equal length. Writes must be performed sequentially within each zone, and each zone has its own independent state machine for management. Maintaining sequential writes within zones can achieve a WAF close to 1, compared to the WAF value of 3 to 4 for typical server SSDs. ZNSSSDs also have a lifespan four times that of traditional disks, making them a more environmentally friendly and sustainable solution for server infrastructure.

[0004] However, the transition from traditional SSDs to ZNSSSDs currently requires adaptation from upper-layer software: 1. The host needs to guarantee sequential writes, otherwise the write operation may return an error due to the lack of order preservation within the disk, but there are random write scenarios in actual business; 2. Append can meet the random write scenario to a certain extent, but the host needs to refresh the logical address actually allocated to the written data, so it is necessary to specifically maintain this logical address mapping relationship.

[0005] In summary, it is necessary to design a ZNS solution that does not require maintaining mapping relationships, can improve host delivery efficiency, and supports concurrent and random writes. Summary of the Invention

[0006] The purpose of this invention is to overcome the shortcomings of the prior art and provide a write processing method, apparatus, device and medium for ZNS solid-state drives.

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

[0008] Firstly, a write processing method for a ZNS solid-state drive includes:

[0009] Configure the writable zone space for the host;

[0010] Receive commands from the host;

[0011] Determine whether the command issued by the host carries the LPA overwrite flag;

[0012] If the LPA overwrite flag is carried, the overwrite will be performed within the writable zone space of the host according to the command.

[0013] The further technical solution is as follows: the zone space that the host can write to includes:

[0014] Select the zone where the host can write data;

[0015] Align the size of the selected zone with the size of the ZNSblock.

[0016] The further technical solution is as follows: the zone space that the host can write to further includes:

[0017] The selected zone can only be written to once after it is in the open state.

[0018] The further technical solution is as follows: after determining whether the command issued by the host carries the LPA overwrite identifier, it also includes:

[0019] If the LPA overwrite identifier is not carried, then determine whether all data has been written within the writable zone space of the host;

[0020] If not, modify the FTL to allocate physical space for the LPA.

[0021] Secondly, the write processing device of the ZNS solid-state drive includes a setting unit, a receiving unit, a first judgment unit, and an overwrite unit.

[0022] The setting unit is used to set the zone space that the host can write to;

[0023] The receiving unit is used to receive commands issued by the host;

[0024] The first judgment unit is used to determine whether the command issued by the host carries the LPA overwrite identifier;

[0025] The overwrite unit is used to perform an overwrite within the writable zone space of the host according to the command if it carries an LPA overwrite identifier.

[0026] The further technical solution is as follows: the setting unit includes a selection module and an alignment module;

[0027] The selected module is used to select a zone where the host can write data;

[0028] The alignment module is used to align the size of the selected zone with the size of the ZNSblock.

[0029] A further technical solution is that the setting unit further includes a setting module;

[0030] The setting module is used to set that the selected zone can only write data once after it is in the open state.

[0031] Its further technical solution includes a second judgment unit and a modification unit;

[0032] The second determination unit is used to determine whether all data has been written within the writable zone space of the host if it does not carry an LPA overwrite identifier;

[0033] The modification unit is used to modify the FTL if not to allocate physical space for the LPA.

[0034] Thirdly, a computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements a write processing method for a ZNS solid-state drive as described above.

[0035] Fourthly, a computer-readable storage medium stores a computer program, the computer program including program instructions, which, when executed by a processor, cause the processor to perform a write processing method for a ZNS solid-state drive as described above.

[0036] The beneficial effects of this invention compared to existing technologies are as follows: This invention sets a writable zone space for the host; receives commands issued by the host; determines whether the command issued by the host carries an LPA overwrite identifier; if it carries an LPA overwrite identifier, it performs an overwrite write within the writable zone space according to the command. The host can write in the ZNS storage space according to the LPA sequence or randomly. The host does not need to be aware of the data arrangement on the medium, the device does not perform GC on this ZNS storage space, and the host releases the medium space occupied by the ZNS in one go through the ZNS method. This simplifies the interaction between concurrent and random writes in the ZNS and reduces the WA (Wait and Deflate) effect. Furthermore, aligning the size of the selected zone with the ZNS block size facilitates the mapping between the zone and the physical space, reducing redundant space.

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

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

[0039] Figure 1 A flowchart illustrating a write processing method for a ZNS solid-state drive, provided as a specific embodiment of the present invention;

[0040] Figure 2 A schematic block diagram of a write processing device for a ZNS solid-state drive provided in a specific embodiment of the present invention;

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

[0042] Figure 4 This is a schematic diagram illustrating the Zone size alignment method provided in a specific embodiment of the present invention. Detailed Implementation

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

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

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

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

[0047] This invention provides a write processing method for a ZNS solid-state drive, such as... Figure 1As shown, the method includes the following steps: S10-S40.

[0048] S10, Set the zone space that the host can write to.

[0049] In one embodiment, step S10 specifically includes the following steps:

[0050] S101. Select the zone where the host can write data.

[0051] For ZNS solid-state drives, the entire LBA range of the SSD namespace is divided into several zones of equal length, so the zone that the host can write data to can be selected according to the needs.

[0052] S102. Align the size of the selected zone with the size of the ZNSblock.

[0053] like Figure 4 As shown, Zonecapacity (ZCAP) is aligned according to the physical block size of the medium, such as 36MB, 76MB, etc. Zonesize (ZSZE) can be aligned with ZCAP, or with powers of 2.

[0054] By setting the alignment, the zone space that the host can write to is ZCAP, which is aligned with the physical block, making it easier to map the zone to the physical space and reducing redundant space.

[0055] In one embodiment, step S10 further includes the following step: S103.

[0056] S103. Set the selected zone to only be written to once after it is in the open state.

[0057] The open state refers to one of the states of a zone. The open state means that the zone is open, and data can only be written to the zone when it is open.

[0058] By configuring the zone space, the host can write to the ZNS storage space in LPA order or randomly, and the SSD does not perform GC (garbage collection) on the ZNS storage space. When the data in a zone is no longer needed, the host resets the zone to release the media space occupied by that zone, thereby simplifying the interaction between concurrent and random writes in the ZNS and reducing the impact of WA (Wait and Defeat).

[0059] S20, Receive commands from the host.

[0060] S30. Determine whether the command issued by the host carries the LPA overwrite flag.

[0061] Between the host and the device, the LPA can be overridden to specify the write identifier. Specifically, the write command CommandDword13 (DatasetManagement) can be used to make the agreement.

[0062] S40. If the LPA overwrite flag is carried, then the overwrite is performed within the writable zone space of the host according to the command.

[0063] In one embodiment, step S30 is followed by the following steps: S50 and S60.

[0064] S50. If the LPA overwrite identifier is not carried, determine whether all data has been written within the writable zone space of the host.

[0065] S60. If not, modify the FTL and allocate physical space for the LPA; if yes, return an error message.

[0066] Figure 2 This is a schematic block diagram of a write processing apparatus for a ZNS solid-state drive provided in an embodiment of the present invention; corresponding to the above-described write processing apparatus method for a ZNS solid-state drive, an embodiment of the present invention also provides a write processing apparatus 100 for a ZNS solid-state drive.

[0067] like Figure 2 As shown, the write processing device 100 of the ZNS solid-state drive includes a setting unit 110, a receiving unit 120, a first judgment unit 130, and an overwrite unit 140. The setting unit is used to set the zone space that the host can write to; the receiving unit is used to receive commands issued by the host; the first judgment unit is used to determine whether the command issued by the host carries an LPA overwrite identifier; the overwrite unit is used to perform an overwrite within the zone space that the host can write to according to the command if the LPA overwrite identifier is carried.

[0068] In one embodiment, the setting unit 110 includes a selection module and an alignment module. The selection module is used to select a zone that the host can write data to; the alignment module is used to align the size of the selected zone with the ZNS block size.

[0069] In one embodiment, the setting unit 110 further includes a setting module; the setting module is used to set that the selected zone can only write data once after it is in the open state.

[0070] In one embodiment, the write processing device 100 of the ZNS solid-state drive further includes a second judgment unit 150 and a modification unit 160; the second judgment unit is used to determine whether all data has been written within the writable zone space of the host if the LPA overwrite write identifier is not carried; the modification unit is used to modify the FTL and allocate physical space for the LPA if not.

[0071] The write processing device of the aforementioned ZNS solid-state drive can be implemented in the form of a computer program, which can, for example... Figure 3 It runs on the computer device shown.

[0072] 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 700 can be a server, wherein the server can be a standalone server or a server cluster composed of multiple servers.

[0073] 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 write processing method steps of the ZNS solid-state drive as described above.

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

[0075] 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 write processing method of the ZNS solid-state drive.

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

[0077] 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 ZNS solid-state drive write processing method.

[0078] 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:

[0079] A write processing method for a ZNS solid-state drive includes:

[0080] Configure the writable zone space for the host;

[0081] Receive commands from the host;

[0082] Determine whether the command issued by the host carries the LPA overwrite flag;

[0083] If the LPA overwrite flag is carried, the overwrite will be performed within the writable zone space of the host according to the command.

[0084] In one embodiment: the setting of the writable zone space of the host includes:

[0085] Select the zone where the host can write data;

[0086] Align the size of the selected zone with the size of the ZNSblock.

[0087] In one embodiment: the setting of the writable zone space of the host further includes:

[0088] The selected zone can only be written to once after it is in the open state.

[0089] In one embodiment: after determining whether the command issued by the host carries the LPA overwrite identifier, the method further includes:

[0090] If the LPA overwrite identifier is not carried, then determine whether all data has been written within the writable zone space of the host;

[0091] If not, modify the FTL to allocate physical space for the LPA.

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

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

[0094] 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 when executed by a processor, the computer program implements the write processing method for the ZNS solid-state drive disclosed in this embodiment of the present invention.

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

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

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

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

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

[0100] 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 write processing method for a ZNS solid-state drive, characterized in that, include: Configure the writable zone space for the host; Receive commands from the host; Determine whether the command issued by the host carries the LPA overwrite flag; If the LPA overwrite flag is carried, the overwrite will be performed within the writable zone space of the host according to the command; The "open" state refers to the zone being open, meaning that the selected zone can only be written to once after it is in the "open" state.

2. The write processing method for a ZNS solid-state drive according to claim 1, characterized in that, The zone space that the host can write to includes: Select the zone where the host can write data; Align the size of the selected zone with the size of the ZNS block.

3. The write processing method for a ZNS solid-state drive according to claim 1, characterized in that, After determining whether the command issued by the host carries the LPA overwrite identifier, the method further includes: If the LPA overwrite identifier is not carried, then determine whether all data has been written within the writable zone space of the host; If not, modify the FTL to allocate physical space for the LPA.

4. A write processing device for a ZNS solid-state drive, which, when operating, executes a write processing method for a ZNS solid-state drive as described in any one of claims 1-3, characterized in that... It includes a setting unit, a receiving unit, a first judgment unit, and an overwrite unit; The setting unit is used to set the zone space that the host can write to; The receiving unit is used to receive commands sent by the host; The first judgment unit is used to determine whether the command issued by the host carries the LPA overwrite identifier; The overwrite unit is used to perform an overwrite within the writable zone space of the host according to the command if it carries an LPA overwrite identifier.

5. The write processing apparatus for the ZNS solid-state drive according to claim 4, characterized in that, The setting unit includes a selection module and an alignment module; The selected module is used to select a zone where the host can write data; The alignment module is used to align the size of the selected zone with the size of the ZNS block.

6. The write processing apparatus for the ZNS solid-state drive according to claim 4, characterized in that, The setting unit also includes a setting module; The setting module is used to set that the selected zone can only write data once after it is in the open state.

7. The write processing apparatus for the ZNS solid-state drive according to claim 4, characterized in that, It also includes a second judgment unit and a modification unit; The second determination unit is used to determine whether all data has been written within the writable zone space of the host if it does not carry an LPA overwrite identifier; The modification unit is used to modify the FTL if not to allocate physical space for the LPA.

8. A computer device, characterized in that, The device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement a write processing method for a ZNS solid-state drive as described in any one of claims 1 to 3.

9. 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 a write processing method for a ZNS solid-state drive as described in any one of claims 1 to 3.