Multi-Namespace flow control method and device applied to NVMe Subsystem, and storage medium

By using Vendor Command and token cache pool for traffic control in NVMe Subsystem, the problem of bandwidth splitting during concurrent access by multiple Namespaces is solved, and bandwidth management and QOS guarantee for each Namespace is realized.

CN119807099APending Publication Date: 2025-04-11SHANDONG SINOCHIP SEMICON CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411808439.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

In NVMe Subsystem, multiple Namespaces may have bandwidth bisecting during concurrent access, and the bandwidth cannot be allocated according to the Host or process weights, resulting in a decrease in QOS.

Method used

The Vendor Command is issued by Host to set the flow control parameters, initialize the timer and token cache pool, set the number of tokens for each Namespace, and control the flow according to the number of tokens when NVMe IO Command is processed.

Benefits of technology

The traffic control of multi-Namespace access under NVMe Subsystem is implemented, and the bandwidth management of each Namespace is carried out according to the Host configuration parameters to ensure different QOS and delay requirements for different applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807099A_ABST
    Figure CN119807099A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-Namespace flow control method and device applied to an NVMe Subsystem and a storage medium, relates to the technical field of SSDs (Solid State Disks), and can be used for carrying out flow control on multi-Namespace access under the NVMe Subsystem and carrying out bandwidth management on each Namespace according to Host configuration parameters in a scene of multi-Namespace concurrent access. For upper Host applications using different Namespaces, flow control based on an SSD layer is provided, and different QOS and delay requirements of different applications are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of SSD technology, and in particular to a method, device and storage medium for controlling traffic between multiple Namespaces applied to an NVMe Subsystem. Background Art

[0002] NVMe SSD is a solid state drive (SSD) that complies with the Non-Volatile Memory Express host controller interface specification. SSD consists of a controller and a memory. An excellent NVMe SSD controller can make full use of the low latency and parallelism of the PCIE channel, greatly improve the read and write performance of the SSD at a controllable storage cost, reduce the high latency caused by the AHCI interface, and completely unleash the ultimate performance of SSDs in the STAT era.

[0003] NVMe Subsystem specifically refers to the collective name of all controllers in a certain NVMe SSD hard disk, and the hard disk may have multiple controllers. One or more Namespaces can be mounted on each Controller. In the interaction between NVMe Subsystem and Host, Namespace is a logical space for Host to operate SSD, and the logical space corresponding to each Namespace is independent. In NVMe Subsystem, there may be multiple Namespaces to cope with the access of multiple Hosts or multiple processes, but no matter how many Namespaces there are, they all share the physical channels on the NVMe Subsystem. Therefore, the problems are: 1. When multiple hosts or processes access their corresponding namespaces at the same time, the total bandwidth may be evenly divided among the multiple namespaces, and the bandwidth cannot be allocated according to the host or process weight. 2. When a host or process performs instantaneous high-pressure access to its corresponding namespace, the namespace will occupy most of the bandwidth of the physical channel, causing other hosts or processes to experience increased latency and reduced bandwidth when accessing other namespaces, resulting in reduced QOS. Summary of the invention

[0004] In order to overcome the deficiencies of the above technologies, the present invention provides a method, device and storage medium for flow control of access to multiple Namespaces of NVMe Subsystem.

[0005] The technical solution adopted by the present invention to overcome the technical problems is: A method for controlling traffic between multiple Namespaces applied to an NVMe Subsystem includes the following steps: S1.Host sends Vendor Command to set flow control parameters; S2. After receiving the Vendor Command sent by the Host, the Controller determines whether it is legal. If it is legal, it executes step S3. If not, it ends. S3. Use the parameters in the Vendor Command to initialize each timer. When each timer is initialized, a token is generated and stored in the token cache pool corresponding to each Namespace. S4. Initialize the command cache pool weight; S5. Controller receives the NVMe IO Command sent by the Host, specifies a Namespace, and places the NVMeIO Command into the command cache pool corresponding to the specified Namespace; S6. Determine whether there is a command in the Namespace command cache pool other than the specified Namespace. If yes, execute step S7; otherwise, execute step S8; S7. Determine which Namespace command cache pool's command should be processed in other Namespace command cache pools; S8. Determine whether there is a token in the token cache pool corresponding to the Namespace of the command in the Namespace command cache pool to be processed. If yes, execute step S9. Otherwise, wait for the token to arrive. S9. Subtract the tokens consumed by the IO Command from the number of tokens of the Namespace; S10: Process NVMe IO Command.

[0006] Furthermore, in step S2, after receiving the Vendor Command sent by the Host, the Controller performs a validity check on the command parameters of the Vendor Command, and determines that the command is legal if the command parameters are valid.

[0007] Furthermore, the method for initializing each timer in step S3 is: setting the trigger time and trigger event of each timer for each Namespace, generating the number of tokens specified in the Vendor Command within the trigger time and starting the timer.

[0008] Furthermore, after the command cache pool weight is initialized in step S4, a polling weight value is set for the command cache pool corresponding to each Namespace, and the weight value is the weight in the Vendor Command.

[0009] Furthermore, in step S7, the command of a Namespace command cache pool that should be processed in other Namespace command cache pools is determined by polling the command cache pool weights.

[0010] On the other hand, the present invention also relates to a multi-Namespace traffic control device applied to NVMe Subsystem, comprising: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; wherein: The memory is used to store computer programs; The processor is configured to execute, by running a program stored in the memory: S1.Host sends Vendor Command to set flow control parameters; S2. After receiving the Vendor Command sent by the Host, the Controller determines whether it is legal. If it is legal, it executes step S3. If not, it ends. S3. Use the parameters in the Vendor Command to initialize each timer. When each timer is initialized, a token is generated and stored in the token cache pool corresponding to each Namespace. S4. Initialize the command cache pool weight; S5. Controller receives the NVMe IO Command sent by the Host, specifies a Namespace, and places the NVMeIO Command into the command cache pool corresponding to the specified Namespace; S6. Determine whether there is a command in the Namespace command cache pool other than the specified Namespace. If yes, execute step S7; otherwise, execute step S8; S7. Determine which Namespace command cache pool's command should be processed in other Namespace command cache pools; S8. Determine whether there is a token in the token cache pool corresponding to the Namespace of the command in the Namespace command cache pool to be processed. If yes, execute step S9. Otherwise, wait for the token to arrive. S9. Subtract the tokens consumed by the IO Command from the number of tokens of the Namespace; S10: Process NVMe IO Command.

[0011] On the other hand, the present invention also relates to a storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements: S1.Host sends Vendor Command to set flow control parameters; S2. After receiving the Vendor Command sent by the Host, the Controller determines whether it is legal. If it is legal, it executes step S3. If not, it ends. S3. Use the parameters in the Vendor Command to initialize each timer. When each timer is initialized, a token is generated and stored in the token cache pool corresponding to each Namespace. S4. Initialize the command cache pool weight; S5. Controller receives the NVMe IO Command sent by the Host, specifies a Namespace, and places the NVMeIO Command into the command cache pool corresponding to the specified Namespace; S6. Determine whether there is a command in the Namespace command cache pool other than the specified Namespace. If yes, execute step S7; otherwise, execute step S8; S7. Determine which Namespace command cache pool's command should be processed in other Namespace command cache pools; S8. Determine whether there is a token in the token cache pool corresponding to the Namespace of the command in the Namespace command cache pool to be processed. If yes, execute step S9. Otherwise, wait for the token to arrive. S9. Subtract the tokens consumed by the IO Command from the number of tokens of the Namespace; S10: Process NVMe IO Command.

[0012] The beneficial effects of the present invention are: flow control can be performed on the access to multiple Namespaces under the NVMe Subsystem, and in the scenario of concurrent access to multiple Namespaces, bandwidth management of each Namespace can be performed according to the Host configuration parameters. For upper-layer Host applications using different Namespaces, flow control based on the SSD layer is provided to ensure different QOS and latency requirements of different applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION

[0014] The following is combined with Figure 1 The present invention is further described.

[0015] Example 1 A method for controlling traffic between multiple Namespaces applied to an NVMe Subsystem includes the following steps: S1.Host sends Vendor Command to set flow control parameters; S2. After receiving the Vendor Command sent by the Host, the Controller determines whether it is legal. If it is legal, it executes step S3. If not, it ends. S3. Use the parameters in the Vendor Command to initialize each timer. When each timer is initialized, a token is generated and stored in the token cache pool corresponding to each Namespace. S4. Initialize the command cache pool weight; S5. Controller receives the NVMe IO Command sent by the Host, specifies a Namespace, and places the NVMeIO Command into the command cache pool corresponding to the specified Namespace; S6. Determine whether there is a command in the Namespace command cache pool other than the specified Namespace. If yes, execute step S7; otherwise, execute step S8; S7. Determine which Namespace command cache pool's command should be processed in other Namespace command cache pools; S8. Determine whether there is a token in the token cache pool corresponding to the Namespace of the command in the Namespace command cache pool to be processed. If yes, execute step S9. Otherwise, wait for the token to arrive. S9. Subtract the tokens consumed by the IO Command from the number of tokens of the Namespace; S10: Process NVMe IO Command.

[0016] Perform traffic control on access to multiple namespaces under the NVMe Subsystem. In the scenario of concurrent access to multiple namespaces, manage the bandwidth of each namespace according to the host configuration parameters.

[0017] In this embodiment, in step S2, after receiving the Vendor Command sent by the Host, the Controller performs a validity check on the command parameters of the Vendor Command, and determines that the command is legal if the command parameters are valid.

[0018] In this embodiment, the method for initializing each timer in step S3 is: setting the trigger time and trigger event of each timer for each Namespace, generating the number of tokens specified in the Vendor Command within the trigger time and starting the timer.

[0019] In this embodiment, after the command buffer pool weight is initialized in step S4, a polling weight value is set for the command buffer pool corresponding to each Namespace, and the weight value is the weight in the Vendor Command.

[0020] In this embodiment, in step S7, the command of a Namespace command cache pool that should be processed in other Namespace command cache pools is determined by polling the command cache pool weights.

[0021] Example 2 A multi-Namespace traffic control device applied to NVMe Subsystem includes: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; wherein: The memory is used to store computer programs; The processor is configured to execute, by running a program stored in the memory: S1.Host sends Vendor Command to set flow control parameters; S2. After receiving the Vendor Command sent by the Host, the Controller determines whether it is legal. If it is legal, it executes step S3. If not, it ends. S3. Use the parameters in the Vendor Command to initialize each timer. When each timer is initialized, a token is generated and stored in the token cache pool corresponding to each Namespace. S4. Initialize the command cache pool weight; S5. Controller receives the NVMe IO Command sent by the Host, specifies a Namespace, and places the NVMeIO Command into the command cache pool corresponding to the specified Namespace; S6. Determine whether there is a command in the Namespace command cache pool other than the specified Namespace. If yes, execute step S7; otherwise, execute step S8; S7. Determine which Namespace command cache pool's command should be processed in other Namespace command cache pools; S8. Determine whether there is a token in the token cache pool corresponding to the Namespace of the command in the Namespace command cache pool to be processed. If yes, execute step S9. Otherwise, wait for the token to arrive. S9. Subtract the tokens consumed by the IO Command from the number of tokens of the Namespace; S10: Process NVMe IO Command.

[0022] Example 3 A storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements: S1.Host sends Vendor Command to set flow control parameters; S2. After receiving the Vendor Command sent by the Host, the Controller determines whether it is legal. If it is legal, it executes step S3. If not, it ends. S3. Use the parameters in the Vendor Command to initialize each timer. When each timer is initialized, a token is generated and stored in the token cache pool corresponding to each Namespace. S4. Initialize the command cache pool weight; S5. Controller receives the NVMe IO Command sent by the Host, specifies a Namespace, and places the NVMeIO Command into the command cache pool corresponding to the specified Namespace; S6. Determine whether there is a command in the Namespace command cache pool other than the specified Namespace. If yes, execute step S7; otherwise, execute step S8; S7. Determine which Namespace command cache pool's command should be processed in other Namespace command cache pools; S8. Determine whether there is a token in the token cache pool corresponding to the Namespace of the command in the Namespace command cache pool to be processed. If yes, execute step S9. Otherwise, wait for the token to arrive. S9. Subtract the tokens consumed by the IO Command from the number of tokens of the Namespace; S10: Process NVMe IO Command.

[0023] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A multi-Namespace traffic control method applied to NVMe Subsystem, characterized in that: The steps include: S1.Host sends Vendor Command to set flow control parameters; S2. After receiving the Vendor Command sent by the Host, the Controller determines whether it is legal. If it is legal, it executes step S3. If not, it ends. S3. Use the parameters in the Vendor Command to initialize each timer. When each timer is initialized, a token is generated and stored in the token cache pool corresponding to each Namespace. S4. Initialize the command cache pool weight; S5. Controller receives the NVMe IO Command sent by the Host, specifies a Namespace, and places the NVMe IO Command into the command cache pool corresponding to the specified Namespace; S6. Determine whether there is a command in the Namespace command cache pool other than the specified Namespace. If yes, execute step S7; otherwise, execute step S8; S7. Determine which Namespace command cache pool's command should be processed in other Namespace command cache pools; S8. Determine whether there is a token in the token cache pool corresponding to the Namespace of the command in the Namespace command cache pool to be processed. If yes, execute step S9. Otherwise, wait for the token to arrive. S9. Subtract the tokens consumed by the IO Command from the number of tokens of the Namespace; S10: Process NVMe IO Command.

2. The method for controlling traffic between multiple Namespaces applied to NVMe Subsystem according to claim 1, characterized in that: In step S2, after receiving the Vendor Command sent by the Host, the Controller performs a validity check on the command parameters of the Vendor Command. If the command parameters are valid, it is determined to be legal.

3. The method for controlling traffic between multiple Namespaces applied to NVMe Subsystem according to claim 1, characterized in that: The method for initializing each timer in step S3 is: setting the trigger time and trigger event of each timer for each Namespace, generating the number of tokens specified in the Vendor Command within the trigger time and starting the timer.

4. The method for controlling traffic between multiple Namespaces applied to NVMe Subsystem according to claim 1, characterized in that: After the command cache pool weight is initialized in step S4, a polling weight value is set for the command cache pool corresponding to each Namespace, and the weight value is the weight in the Vendor Command.

5. The method for controlling traffic between multiple Namespaces applied to NVMe Subsystem according to claim 1, characterized in that: In step S7, the command of a Namespace command buffer pool that should be processed in other Namespace command buffer pools is determined by polling the command buffer pool weights.

6. A multi-Namespace traffic control device applied to NVMe Subsystem, characterized in that: include: A processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein: The memory is used to store computer programs; The processor is configured to execute, by running a program stored in the memory: S1.Host sends Vendor Command to set flow control parameters; S2. After receiving the Vendor Command sent by the Host, the Controller determines whether it is legal. If it is legal, it executes step S3. If not, it ends. S3. Use the parameters in the Vendor Command to initialize each timer. When each timer is initialized, a token is generated and stored in the token cache pool corresponding to each Namespace. S4. Initialize the command cache pool weight; S5. Controller receives the NVMe IO Command sent by the Host, specifies a Namespace, and places the NVMe IO Command into the command cache pool corresponding to the specified Namespace; S6. Determine whether there is a command in the Namespace command cache pool other than the specified Namespace. If yes, execute step S7; otherwise, execute step S8; S7. Determine which Namespace command cache pool's command should be processed in other Namespace command cache pools; S8. Determine whether there is a token in the token cache pool corresponding to the Namespace of the command in the Namespace command cache pool to be processed. If yes, execute step S9. Otherwise, wait for the token to arrive. S9. Subtract the tokens consumed by the IO Command from the number of tokens of the Namespace; S10: Process NVMe IO Command.

7. A storage medium, characterized in that: The computer readable storage medium stores a computer program, which, when executed by a processor, implements: S1.Host sends Vendor Command to set flow control parameters; S2. After receiving the Vendor Command sent by the Host, the Controller determines whether it is legal. If it is legal, it executes step S3. If not, it ends. S3. Use the parameters in the Vendor Command to initialize each timer. When each timer is initialized, a token is generated and stored in the token cache pool corresponding to each Namespace. S4. Initialize the command cache pool weight; S5. Controller receives the NVMe IO Command sent by the Host, specifies a Namespace, and places the NVMe IO Command into the command cache pool corresponding to the specified Namespace; S6. Determine whether there is a command in the Namespace command cache pool other than the specified Namespace. If yes, execute step S7; otherwise, execute step S8; S7. Determine which Namespace command cache pool's command should be processed in other Namespace command cache pools; S8. Determine whether there is a token in the token cache pool corresponding to the Namespace of the command in the Namespace command cache pool to be processed. If yes, execute step S9. Otherwise, wait for the token to arrive. S9. Subtract the tokens consumed by the IO Command from the number of tokens of the Namespace; S10: Process NVMe IO Command.