Traffic management method and system, solid state drive controller and solid state drive

By using hardware logic circuits to generate flow control identifiers in solid-state memory, forming a flow control queue and a message submission queue, stable control of data processing speed is achieved, and the problem of unstable processing speed caused by uncontrollable factors in the prior art is solved.

CN112363673BActive Publication Date: 2025-02-14DAPUSTOR CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011263773.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-12
Publication Date
2025-02-14
Estimated Expiration
2040-11-12

AI Technical Summary

Technical Problem

In existing solid-state memory, when data processing speed is controlled through software, it is affected by uncontrollable factors such as temperature and memory, resulting in unstable processing speed.

Method used

A flow management method is adopted to generate flow control identifiers through hardware logic circuits to form a flow control queue and a message submission queue (SQ). When both the flow control queue and SQ are in non-empty states, read the SQ at the preset speed. Message and delete the flow control identifier to achieve stable control of data processing speed.

Benefits of technology

The flow control identifier is generated through hardware logic circuits to ensure the stability of data processing speed and avoid the problem of unstable processing speed caused by temperature, memory and other factors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112363673B_ABST
    Figure CN112363673B_ABST
Patent Text Reader

Abstract

The present application discloses a flow management method and system, a solid-state drive controller and a solid-state drive. The present application first queries whether the flow control queue and SQ are both in a non-empty state; the flow control queue includes: at least one flow control identifier, which is generated at a preset speed using a hardware logic circuit; if so, the message in the SQ is read according to the read pointer, and after the read pointer is updated, the flow control identifier at the head of the flow control queue is deleted. When the flow control queue and SQ have data at the same time, a message in the SQ is read, and then a flow control identifier is deleted, so that the reading speed of the message in the SQ is controlled by the generation speed of the flow control identifier in the flow control queue, thereby achieving the purpose of controlling the flow. Since the flow control identifier is generated at a preset speed using a hardware logic circuit, the data flow speed can be controlled to be in a stable and ideal state. The flow management system, solid-state drive controller and solid-state drive provided by the present application also have the above-mentioned technical effects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer storage technology, and in particular to a traffic management method and system, a solid-state hard disk controller and a solid-state hard disk. Background Art

[0002] At present, in solid-state memories, the data processing speed of the memory is generally controlled by software. However, since the software operation is affected by uncontrollable factors such as temperature and memory, it is impossible to ensure that the processing speed is stable under ideal conditions during the software operation.

[0003] Therefore, how to control the data processing speed of the memory is a problem that needs to be solved by those skilled in the art. Summary of the invention

[0004] In view of this, the purpose of this application is to provide a traffic management method and system, a solid state drive controller and a solid state drive to control the data processing speed of the memory. The specific scheme is as follows:

[0005] In a first aspect, the present application provides a traffic management method, applied to a storage device, comprising:

[0006] Query whether the flow control queue and SQ are both in a non-empty state; the flow control queue includes: at least one flow control identifier, the flow control identifier is generated by a hardware logic circuit according to a preset speed;

[0007] If so, the message in the SQ is read according to the read pointer, and after the read pointer is updated, the flow control identifier at the head of the flow control queue is deleted.

[0008] Preferably, it also includes:

[0009] If the flow control queue and / or the SQ is in an empty state, after waiting for a first preset time, the step of querying whether the flow control queue and the SQ are both in a non-empty state is performed.

[0010] Preferably, it also includes:

[0011] If a new message is obtained, check whether the SQ is full;

[0012] If yes, then after waiting for a second preset time, execute the step of querying whether the SQ is full;

[0013] If not, write the message to the SQ according to the write pointer and update the write pointer.

[0014] Preferably, it also includes:

[0015] If a new flow control identifier is obtained, query whether the flow control queue is full;

[0016] If yes, then after waiting for a third preset time, execute the step of querying whether the flow control queue is full;

[0017] If not, the new flow control identifier is added to the end of the flow control queue.

[0018] Preferably, after deleting the flow control identifier at the head of the flow control queue, the method further includes:

[0019] The states of the flow control queue and the SQ are updated respectively, and the step of querying whether the flow control queue and the SQ are both in a non-empty state is performed.

[0020] Preferably, it also includes:

[0021] If the speed adjustment condition is met, the preset speed is adjusted.

[0022] In a second aspect, the present application provides a traffic management system, applied to a memory, including: at least one traffic manager, the traffic manager including:

[0023] A query module, used to query whether the flow control queue and SQ are both in a non-empty state; the flow control queue includes: at least one flow control identifier, the flow control identifier is generated by a hardware logic circuit according to a preset speed;

[0024] The execution module is used for reading the message in the SQ according to the read pointer if both the flow control queue and the SQ are in a non-empty state, and after updating the read pointer, deleting the flow control identifier at the head of the flow control queue.

[0025] Preferably, the traffic manager is arranged between different hardware modules in the solid state drive.

[0026] In a third aspect, the present application provides a solid state drive controller, including: the system as described above.

[0027] In a fourth aspect, the present application provides a solid state drive, comprising: a solid state drive controller as described above.

[0028] It can be seen from the above scheme that the present application provides a traffic management method, applied to a memory, including: querying whether the flow control queue and SQ are both in a non-empty state; the flow control queue includes: at least one flow control identifier, and the flow control identifier is generated at a preset speed using a hardware logic circuit; if so, reading the message in the SQ according to the read pointer, and after updating the read pointer, deleting the flow control identifier at the head of the flow control queue.

[0029] It can be seen that the flow control identifier in the flow control queue is generated at a preset speed. Moreover, when the flow control queue and SQ are both in a non-empty state, that is, there is a flow control identifier in the flow control queue, and there are messages to be processed in SQ, the message in SQ is read according to the read pointer, that is, a message in SQ is processed (the messages in SQ are processed one by one), and then the read pointer is updated, and a flow control identifier located at the head of the flow control queue is deleted. That is: when the flow control queue and SQ have data at the same time, a message in SQ is read, and then a flow control identifier is deleted, so that the reading speed of the message in SQ is controlled by the generation speed of the flow control identifier in the flow control queue, thereby achieving the purpose of controlling the data processing speed of the memory, that is, realizing traffic management and control. Since the flow control identifier is generated at a preset speed using a hardware logic circuit, the generation speed of the flow control identifier is more stable, and then the reading speed of the message in SQ is also more stable. Therefore, the control process does not involve uncontrollable factors such as temperature and memory, so it is conducive to controlling the data processing speed to be in a stable and ideal state.

[0030] Correspondingly, a traffic management system, a solid-state drive controller, and a solid-state drive provided by the present application also have the above-mentioned technical effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0032] Figure 1 A flow chart of a traffic management method disclosed in this application;

[0033] Figure 2 A schematic diagram of a traffic manager disclosed in this application;

[0034] Figure 3 A schematic diagram of the structure of a solid state hard disk disclosed in this application;

[0035] Figure 4 A schematic diagram of a solid state hard disk controller disclosed in this application;

[0036] Figure 5 A schematic diagram of a configuration for flow control based on a flow management system disclosed in this application;

[0037] Figure 6 A schematic diagram of data interaction between a CPU and a DP based on Doorbell disclosed in the present application;

[0038] Figure 7 and Figure 8 A schematic diagram of a Doorbell managing SQ and flow control queue disclosed in this application;

[0039] Fig. 9 A flowchart of the interaction between a Doorbell and an external module disclosed in the present application;

[0040] Fig.10 A flowchart of updating queue status of a Doorbell disclosed in the present application;

[0041] Fig.11 A schematic diagram of a flow control effect disclosed in this application;

[0042] Fig.12 This is a schematic diagram of another configuration for flow control based on a flow management system disclosed in this application;

[0043] Fig.13 This is a flow chart of adjusting the flow control speed in a flow control point disclosed in the present application. DETAILED DESCRIPTION

[0044] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0045] At present, in solid-state memory, software is generally used to control the data processing speed of the memory. However, since the software operation process is affected by uncontrollable factors such as temperature and memory, it is impossible to ensure that the processing speed is stable under ideal conditions during the software operation process. To this end, the present application provides a flow management solution to control the data processing speed of the memory.

[0046] See also Figure 1 As shown, the embodiment of the present application discloses a traffic management method, which is applied to a memory, including:

[0047] S101, query whether the flow control queue and SQ are both in a non-empty state; if so, execute S102; if not, wait for a first preset time and then execute S101;

[0048] The flow control queue includes: at least one flow control identifier, which is generated by a hardware logic circuit at a preset speed. That is, each flow control identifier in the flow control queue is continuously generated at a certain speed, for example, a flow control identifier is generated every 3 seconds.

[0049] S102: Read the message in the SQ according to the read pointer, and after updating the read pointer, delete the flow control identifier at the head of the flow control queue.

[0050] It should be noted that the messages in SQ (Submission Queue) are read one by one, that is, only a message indicated by the read pointer is read each time. After reading a message, the read pointer moves one position, and the flow control identifier at the head of the flow control queue is deleted. Generally, the flow control identifiers generated earlier are arranged at the head of the flow control queue, and the flow control identifiers generated later are arranged at the tail of the flow control queue. Each time a message is read, a flow control identifier is consumed, so that the reading speed of the messages in SQ is controlled by the generation speed of the flow control identifiers in the flow control queue, thereby achieving the purpose of controlling the data processing speed of the memory. Of course, if the flow control queue has no flow control identifier, the message in SQ cannot be read.

[0051] In a specific implementation, adding a new message to SQ follows the following steps: if a new message is obtained, query whether SQ is full; if so, wait for a second preset time and execute the step of querying whether SQ is full; if not, write the message to SQ according to the write pointer and update the write pointer.

[0052] In a specific implementation, adding a new flow control identifier to the flow control queue follows the following steps: if a new flow control identifier is obtained, query whether the flow control queue is full; if so, wait for a third preset time and execute the step of querying whether the flow control queue is full; if not, add the new flow control identifier to the end of the flow control queue.

[0053] In a specific implementation, after deleting the flow control identifier at the head of the flow control queue, the method further includes: updating the states of the flow control queue and SQ respectively, and executing the step of querying whether the flow control queue and SQ are both in a non-empty state.

[0054] It should be noted that the speed of generating the flow control identifier can be adjusted according to the actual situation. Specifically, multiple adjustment conditions can be preset. If the speed adjustment conditions are met, the preset speed is adjusted. For example, when the temperature is high, the preset speed is reduced to reduce the workload, thereby reducing power consumption and lowering the temperature; when the temperature is low, the preset speed is increased. The principle is the same as above and will not be repeated.

[0055] It can be seen that in the embodiment of the present application, when the flow control queue and SQ have data at the same time, a message in SQ is read, and then a flow control identifier is deleted, so that the reading speed of the message in SQ is controlled by the generation speed of the flow control identifier in the flow control queue, thereby achieving the purpose of controlling the data processing speed of the memory, that is, realizing flow management and control. Since the flow control identifier is generated at a preset speed using a hardware logic circuit, the generation speed of the flow control identifier is more stable, and the reading speed of the message in SQ is also more stable. Therefore, the control process does not involve uncontrollable factors such as temperature and memory, so it is conducive to controlling the data processing speed to be in a stable and ideal state.

[0056] A traffic management system provided in an embodiment of the present application is introduced below. The traffic management system described below and the traffic management method described above can be referenced to each other.

[0057] An embodiment of the present application discloses a traffic management system, which is applied to a memory and includes: at least one traffic manager.

[0058] See also Figure 2 , Traffic Manager includes:

[0059] The query module 201 is used to query whether the flow control queue and SQ are both in a non-empty state; the flow control queue includes: at least one flow control identifier, and the flow control identifier is generated by a hardware logic circuit according to a preset speed;

[0060] The execution module 202 is used to read the message in the SQ according to the read pointer if both the flow control queue and the SQ are in a non-empty state, and after updating the read pointer, delete the flow control identifier at the head of the flow control queue.

[0061] In a specific implementation, the traffic manager is set between different hardware modules in the solid-state drive. Different hardware modules in the solid-state drive include: front-end module (FE), data processing module (DP), algorithm module (FTL), back-end module (BE), etc. These modules are set in the solid-state drive according to the established data processing logic. A traffic manager can be set between two logically adjacent modules to control the speed of processing data between the two logically adjacent modules. If the output of the previous module is the input of the next module, the two modules are considered to be logically adjacent.

[0062] In a specific implementation, the traffic manager further includes:

[0063] The polling module is used to, if the flow control queue and / or SQ is in an empty state, wait for a first preset time and then execute the step of querying whether the flow control queue and SQ are both in a non-empty state.

[0064] In a specific implementation, the traffic manager further includes: a message management module, which is specifically used to:

[0065] If a new message is obtained, check whether the SQ is full;

[0066] If yes, then after waiting for a second preset time, execute the step of querying whether the SQ is full;

[0067] If not, write the message to SQ according to the write pointer and update the write pointer.

[0068] In a specific implementation manner, the traffic manager further includes: a flow control identification management module, which is specifically used to:

[0069] If a new flow control identifier is obtained, check whether the flow control queue is full;

[0070] If yes, then after waiting for a third preset time, execute the step of querying whether the flow control queue is full;

[0071] If not, the new flow control identifier is added to the end of the flow control queue.

[0072] In a specific implementation, the traffic manager further includes:

[0073] The status update module is used to update the status of the flow control queue and SQ respectively, and execute the step of querying whether the flow control queue and SQ are both in a non-empty state.

[0074] In a specific implementation, the traffic manager further includes:

[0075] The speed adjustment module is used to adjust the preset speed if the speed adjustment condition is met.

[0076] Among them, for more specific working processes of each module and unit in this embodiment, reference can be made to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.

[0077] It can be seen that this embodiment provides a traffic management system, in which any traffic manager can make the reading speed of messages in SQ under the control of the generation speed of flow control identifiers in the flow control queue, thereby achieving the purpose of controlling the data processing speed of the memory, that is, realizing traffic management and control.

[0078] A solid-state hard disk controller provided in an embodiment of the present application is introduced below. The solid-state hard disk controller described below and the traffic management method and system described above can be referenced to each other.

[0079] The embodiment of the present application discloses a solid state drive controller, including: a system disclosed in any of the above embodiments. The system includes: at least one traffic manager. The traffic manager can be set between different hardware modules in the solid state drive.

[0080] The traffic manager includes:

[0081] A query module is used to query whether the flow control queue and SQ are both in a non-empty state; the flow control queue includes: at least one flow control identifier, the flow control identifier is generated by a hardware logic circuit according to a preset speed;

[0082] The execution module is used to read the message in the SQ according to the read pointer if both the flow control queue and the SQ are in a non-empty state, and after updating the read pointer, delete the flow control identifier at the head of the flow control queue.

[0083] In a specific implementation, the traffic manager further includes:

[0084] The polling module is used to, if the flow control queue and / or SQ is in an empty state, wait for a first preset time and then execute the step of querying whether the flow control queue and SQ are both in a non-empty state.

[0085] In a specific implementation, the traffic manager further includes: a message management module, which is specifically used to:

[0086] If a new message is obtained, check whether the SQ is full;

[0087] If yes, then after waiting for a second preset time, execute the step of querying whether the SQ is full;

[0088] If not, write the message to SQ according to the write pointer and update the write pointer.

[0089] In a specific implementation manner, the traffic manager further includes: a flow control identification management module, which is specifically used to:

[0090] If a new flow control identifier is obtained, check whether the flow control queue is full;

[0091] If yes, then after waiting for a third preset time, execute the step of querying whether the flow control queue is full;

[0092] If not, the new flow control identifier is added to the end of the flow control queue.

[0093] In a specific implementation, the traffic manager further includes:

[0094] The status update module is used to update the status of the flow control queue and SQ respectively, and execute the step of querying whether the flow control queue and SQ are both in a non-empty state.

[0095] In a specific implementation, the traffic manager further includes:

[0096] The speed adjustment module is used to adjust the preset speed if the speed adjustment condition is met.

[0097] In this embodiment, any traffic manager in the system can be used to control the data processing speed in the solid state drive to achieve traffic management and control.

[0098] A solid-state hard disk provided in an embodiment of the present application is introduced below. The solid-state hard disk described below and the traffic management method and system and a solid-state hard disk controller described above can refer to each other.

[0099] The present application embodiment discloses a solid state hard disk, including: a solid state hard disk controller as described in any of the above embodiments. For details, please refer to the relevant introduction of the above embodiments, which will not be repeated in this embodiment.

[0100] In order to explain the present application more clearly, the following introduction is made in combination with the specific structure and application of the solid state drive.

[0101] See also Figure 3 , solid state drives (SSDs) generally include:

[0102] Solid State Drive Controller (SSD Controller): As a control computing unit, it is used to manage the internal functions of the SSD.

[0103] Flash array (NAND Flash): used to store data (user data and system data). Generally, there are multiple flash channels (Channel, abbreviated as CH), and one channel is independently connected to a group of NAND Flash, such as Figure 1 The characteristics of flash memory are: data must be erased before writing, and the number of erase times of each flash memory is limited.

[0104] Dynamic random access memory (DDR, DRAM): used as cache.

[0105] Connector: used to connect the host (PC or server) or other peripheral units, such as: OSC-crystal oscillator, JTAG-debug interface, serial port (UART), sensor (Sensor), power chip (PMIC), serial peripheral interface (SPI), etc.

[0106] See also Figure 4The solid-state drive controller includes: host interface controller (PCIe / NVMe Controller / PHY), dynamic random access memory controller (DMAC, DDR Controller / PHY), data path (Data Path Processor) module, flash memory controller (FCH, Flash Controller / PHY), CPU module, peripheral module, etc.

[0107] Among them, the host interface controller is used to process the communication protocol between the solid-state drive and the host; the dynamic random access memory controller is used to process the communication protocol between the solid-state drive and the dynamic random access memory; the flash memory controller is used to process the communication protocol between the solid-state drive and the flash memory; and the data path module is used to process the internal data flow of the solid-state drive.

[0108] Generally, the data reading and writing of SSD is completed by the following modules:

[0109] Front End Module (FE): Responsible for the host communication protocol stack and command data distribution processing.

[0110] Data Processing Module (DP, DataProcess): Responsible for data path processing, such as write cache management.

[0111] Algorithm module (FTL, Flash Translation Layer): responsible for the management of the address mapping table, the management of the granularity of data written to the flash memory, etc.

[0112] The back-end module (BE) is responsible for reading and writing flash memory data and managing related flash memory commands.

[0113] This application designs and implements a Doorbell system (i.e., a traffic management system), in which the number of Doorbells (i.e., traffic controllers) can be configured as one or more according to demand. Figure 5 As shown in the figure, the dotted line represents the path between the CPU and the data path module (DP), and the two exchange data through the doorbell. The dots represent the flow control points (i.e. the points where the doorbell is set), which control the IO processing speed by controlling the speed of reading messages. The flow can be controlled on the paths where the flow control points are set, so as to meet the flow control requirements of the entire system. NVMe represents the host end connected to the solid-state drive.

[0114] like Figure 5As shown, flow control can be performed at multiple locations. However, if flow control design is performed in each hardware module, then these hardware modules must be modified. Generally, these hardware modules are modular and should not be modified. For this reason, the present invention modularizes DoorBell, which can be instantiated at different demand points without affecting or modifying the functions of other hardware modules.

[0115] like Figure 6 As shown in the figure, take the information exchange between CPU and DP as an example. The restriction is made at the doorbell exit. The message in SQ is the request message submitted by CPU, and the message in CQ (Completion Queue) is the completion message returned by DP. Specifically, CPU writes message to SQ to pass the message to be processed to DP, and DP reads the message in SQ and performs corresponding IO operation. By controlling the speed at which SQ is taken away by DP, the speed at which DP processes data can be controlled.

[0116] Doorbell can be set between the CPU and the hardware module, between the hardware module and the CPU, or between the CPU and the CPU, and supports two-way message interaction. At the same time, message queues are used for interaction to effectively reduce communication congestion and waiting.

[0117] Among them, SQ is the command queue used by producers to send messages to consumers. For example, after the CPU generates multiple commands, it sends them to the hardware module to execute the command through SQ. CQ is used to return the completion status and related information of the message in SQ. The order of command completion results returned by CQ and the order of SQ command issuance can be out of order. In each CQ message, it is marked which command in SQ the Entry has completed. SQ and CQ are usually used in combination for message communication, that is, they appear in pairs, such as Figure 6 Of course, for commands that do not require a completion status, you can also use only SQ.

[0118] See also Figure 7 and Figure 8 Doorbell manages two queues, one is SQ and the other is flow control queue. The Flag in the flow control queue is used to control whether the message in SQ can be read. Specifically, it includes:

[0119] Pointer management: To write or read a message in SQ, you need to use a write pointer and a read pointer to indicate the write address and read address of the message.

[0120] Queue management: the size and number of entries in the queue, and the RAM address where the entry is stored. Entry refers to the space occupied by any data in the queue. For SQ, one entry stores one message. For flow control queues, one entry stores one flag.

[0121] Flow control management: including Flag producer manager, Flag consumer manager and queue status manager.

[0122] The queue status manager is used to manage the empty or full status of the flow control queue and SQ, and indicates the writable and readable status of the SQ to the CPU or hardware module by writing the full status and reading the empty status.

[0123] The control logic of the Flag in the flow control queue includes: Flag is automatically generated by the hardware logic circuit at a uniform speed and written to the flow control queue. The hardware logic circuit is the Flag producer. Only when there is a Flag can the permission to obtain the message in the SQ be opened. Each time the external module takes a message from the SQ, it consumes a Flag, that is, the speed of reading the message depends on the speed of Flag production.

[0124] Among them, when the flow control queue and SQ are both in a non-empty state (indicated by DB_Rd_NonEmpty), it indicates that the messages in the SQ are readable, and only one is read at a time.

[0125] DB_Rd_NonEmpty is the non-empty state that DoorBell shows to the external module (CPU or hardware module). Its non-empty state must satisfy that both SQ_FIFO_NonEmpty and Flag_FIFO_NonEmpty are non-empty at the same time. The external module is equivalent to DoorBell.

[0126] DB_Rd_CNT=Min(SQ_FIFO_RD CNT, Flag_FIFO_RD CNT)DB_Rd_CNT is an indication of the number of entries that can be read by DoorBell, and its value is the minimum value of SQ and flow control queue. SQ_FIFO_RD CNT is the number of entries in SQ, and Flag_FIFO_RD CNT is the number of entries in flow control queue.

[0127] The Flag producer manager can configure the Flag production speed. The flow control queue can use a typical hardware FIFO. The Flag producer manager can control the uniform generation and writing of Flags to make the Flag generation speed more stable, so that the reading speed of messages in SQ is more stable. It can be implemented by logic circuits, such as state machines and timers. Of course, there can be other implementation methods (such as microcoders, etc.).

[0128] The Flag consumer manager is used to read the Flag. The Flag itself has no specific meaning and can be discarded after reading. The condition for reading the Flag is that there are pending messages in the SQ, which can be implemented by logic circuits, such as state machines and timers. Of course, there can be other implementation methods (such as microcoders, etc.). If the speed of reading the Flag is greater than the speed at which the Flag is generated, then the reading speed is limited to the same as the generation speed. If the speed of reading the Flag is less than the speed at which the Flag is generated, then its reading speed depends on its own reading speed, that is, the speed at which the Flag is generated does not control the speed at which the Flag is read. The speed at which the Flag is read is the speed at which the messages in the SQ are read. The key to controlling the speed at which the Flag is read lies in the state management of the flow control queue and the SQ.

[0129] like Fig. 9 As shown, for a DoorBell, it includes two operations of interacting with external modules: one is that the external module writes DoorBell, and the other is that the external module reads DoorBell.

[0130] For example, the CPU queries the full flag of SQ. If it is not full, it is ready to write a new message to SQ, that is, read the write pointer (Wr_Ptr) of SQ and write the message to the space pointed to by the pointer; otherwise, wait for a period of time and query the full flag of SQ again. Among them, if the write pointer is not enabled or does not support automatic update of the write pointer, the CPU needs to update the write pointer after writing a new message. If the write pointer is enabled or supports automatic update of the write pointer, the write pointer is automatically updated.

[0131] The hardware module that interacts with the CPU detects the empty marks of the SQ and the flow control queue. If both are non-empty, it means that the SQ has commands to be processed and reading is allowed. Then the read pointer (Rd_Ptr) is obtained, and the message is taken from the space pointed to by the read pointer through the bus, and then the IO operation expressed by the message is executed; otherwise, it is detected again next time. Among them, if the read pointer is not enabled or does not support automatic update of the read pointer, the hardware module must update the read pointer after reading the message. If the read pointer is enabled or supports automatic update of the read pointer, the read pointer is automatically updated.

[0132] After the hardware module completes the IO operation, it checks the full state of the CQ. If it is not full, it is ready to write a message to the CQ. Then the hardware reads the write pointer of the CQ and writes the message to the space pointed to by the pointer. Otherwise, it waits for a while and then queries the full mark of the CQ. If the write pointer is not enabled or does not support automatic update of the write pointer, the hardware module must update the write pointer after writing the message. If the write pointer is enabled or supports automatic update of the write pointer, the write pointer is automatically updated.

[0133] After the hardware module writes the message to CQ, the CPU detects the empty flag of CQ. If it is not empty, it means that CQ has a message to be processed. Then the CPU obtains the read pointer (Rd_Ptr) and takes the message from the space pointed to by the read pointer through the bus to obtain the completion status information of the IO operation expressed by the message. Otherwise, check again next time. Similarly, if the read pointer is not enabled or does not support automatic update of the read pointer, the CPU needs to update the read pointer after reading the new message. If the read pointer is enabled or supports automatic update of the read pointer, the read pointer is automatically updated.

[0134] It can be seen that the external module (CPU or hardware module) is invisible to the flow control, that is, the external module only needs to query whether the SQ and flow control queue are in a non-empty state to decide whether to read the message. Based on this, it is only necessary to set DoorBell on a certain path without modifying other modules on the path. Therefore, for DoorBell, it only needs to control whether the SQ and flow control queue are in a non-empty state. For the specific control logic, please refer to Fig.10 .

[0135] From the above, we can know that after setting DoorBell, we can configure the production speed of the Flag in DoorBell according to the needs to meet the flow control requirements. For example: to control the data processing speed of the DP module, first calculate the expected speed value of processing IO, and set the production speed of the Flag in the Doorbell corresponding to the DP module to the expected speed value. Generally, the flow control effect can be seen in Fig.11 At the beginning, due to the presence of sufficient flags and messages to be processed, the processing speed will be relatively high. Later, the message processing speed is consistent with the flag generation speed, making the data processing speed in a stable and ideal situation. Fig.11 The horizontal axis represents time, and the vertical axis represents data processing speed.

[0136] In general, the performance requirement for flow control of SSDs is to maintain the smoothness of host reading and writing data, which depends on the ratio of the speed of host writing data and garbage collection reading and writing data.

[0137] For a specific flow control application example, see Fig.12 , set the bandwidth that the backend BE can provide to be 12GB / s. Garbage collection needs to be read before writing to make room for host writing. Considering the large demand for read operations, set the garbage collection read to occupy 6GB / s, and the remaining bandwidth is evenly divided between garbage collection write and host write, that is, garbage collection write occupies 3GB / s, and host write occupies 3GB / s. Fig.12 The circle in the figure represents the doorbell, which is the flow control point.

[0138] In order to facilitate flow control, at least three Doorbell channels are separated at the back end, corresponding to the garbage collection read Doorbell channel, the garbage collection write Doorbell channel, and the host write Doorbell channel. Then only the flow control speeds of these three DoorBells are set to 6GB / s, 3GB / s, and 3GB / s, respectively, so that the corresponding host write speed is kept relatively stable at 3GB / s. Furthermore, in order to ensure that the front end also has a stable write speed, DP / NVMe is flow controlled, that is, the speed at which DP / NVMe processes data is controlled, such as setting the flow control speeds to 3GB / s and 3GB / s, respectively, to ensure the front end's processing speed for commands. Combined with the above-mentioned flow control on the BE end and the flow control of DP / NVMe, the overall speed limit can be kept stable at 3GB / s.

[0139] Flash memory and DRAM are the main storage media for SSDs. The operating power consumption of SSDs mainly depends on these devices. In other words, the workload of flash memory and DRAM affects the power consumption, which in turn affects the operating temperature. In SSDs, writing to DRAM is generally done by NVMe receiving data from the host, and DP / DMAC forwarding data to the backend to be written into NAND Flash. The essence of SSD temperature control is to perform data processing flow control.

[0140] For a specific temperature control application example, please see Fig.12 , adjust the production speed of the Flag in each flow control point DoorBell, and you can adjust the corresponding data processing speed. For example: when it is detected that the temperature exceeds the temperature control threshold, as long as the Flag production speed of the DoorBell corresponding to NVMe, DP, FCH, and DMAC is reduced, the data processing speed at each location can be reduced accordingly. Among them, the temperature control threshold can be divided into an upper limit and a lower limit. The upper limit indicates that the temperature is too high and the speed needs to be limited, and the flow control speed is adjusted downward; conversely, the lower limit indicates that the temperature is far from the safe operating temperature and can be increased, and the flow control speed is adjusted upward. Please refer to Fig.13 , Fig.13 A flow chart for adjusting the flow control speed in each flow control point.

[0141] This embodiment designs a flow control mechanism in Doorbell and uses Doorbell globally for hardware flow control. Its flow control is directly related to speed, and the speed of flow control is close to the average speed. Moreover, its speed is configurable, which provides a favorable hardware foundation for system flow control design and can meet the flow control requirements in different scenarios. It not only simplifies the complexity of software design, but also implements flow control based on hardware, greatly reducing software overhead and reducing CPU load.

[0142] The "first", "second", "third", "fourth", etc. (if any) referred to in this application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods or devices.

[0143] It should be noted that the descriptions involving "first", "second", etc. in this application are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0144] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0145] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of readable storage medium known in the art.

[0146] Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A traffic management method, characterized in that: Applied to memory, including: Query whether the flow control queue and SQ are both in a non-empty state; the flow control queue includes: at least one flow control identifier, the flow control identifier is generated by a hardware logic circuit according to a preset speed; the SQ is: a message submission queue; If yes, read the message in the SQ according to the read pointer, and after updating the read pointer, delete the flow control identifier at the head of the flow control queue; If the speed adjustment conditions are met, the preset speed is adjusted; wherein, when it is detected that the temperature exceeds the temperature control threshold, the preset speed is adjusted; the temperature control threshold is divided into an upper limit and a lower limit, the upper limit indicates that the temperature is too high and the speed needs to be limited, and the preset speed is adjusted downward; the lower limit indicates that the temperature is far from the safe operating temperature and the speed needs to be increased, and the preset speed is adjusted upward.

2. The method according to claim 1, characterized in that Also includes: If the flow control queue and / or the SQ is in an empty state, after waiting for a first preset time, the step of querying whether the flow control queue and the SQ are both in a non-empty state is performed.

3. The method according to claim 1, characterized in that Also includes: If a new message is obtained, check whether the SQ is full; If yes, then after waiting for a second preset time, execute the step of querying whether the SQ is full; If not, write the message to the SQ according to the write pointer and update the write pointer.

4. The method according to claim 1, characterized in that: Also includes: If a new flow control identifier is obtained, query whether the flow control queue is full; If yes, then after waiting for a third preset time, execute the step of querying whether the flow control queue is full; If not, the new flow control identifier is added to the end of the flow control queue.

5. The method according to any one of claims 1 to 4, characterized in that: After deleting the flow control identifier at the head of the flow control queue, the method further includes: The states of the flow control queue and the SQ are updated respectively, and the step of querying whether the flow control queue and the SQ are both in a non-empty state is performed.

6. A traffic management system, characterized in that: Applied to a memory, comprising: at least one traffic manager, the traffic manager comprising: A query module is used to query whether the flow control queue and SQ are both in a non-empty state; the flow control queue includes: at least one flow control identifier, the flow control identifier is generated by a hardware logic circuit according to a preset speed; the SQ is: a message submission queue; An execution module, configured to read the message in the SQ according to the read pointer if both the flow control queue and the SQ are in a non-empty state, and after updating the read pointer, delete the flow control identifier at the head of the flow control queue; The speed adjustment module is used to adjust the preset speed if the speed adjustment conditions are met; wherein, when it is detected that the temperature exceeds the temperature control threshold, the preset speed is adjusted; the temperature control threshold is divided into an upper limit and a lower limit, the upper limit indicates that the temperature is too high and the speed needs to be limited, and the preset speed is adjusted downward; the lower limit indicates that the temperature is far from the safe operating temperature and the speed needs to be increased, and the preset speed is adjusted upward.

7. The system according to claim 6, characterized in that The traffic manager is arranged between different hardware modules in the solid state drive.

8. A solid state hard disk controller, characterized in that: include: A system as claimed in claim 6 or 7.

9. A solid state hard disk, characterized in that: include: The solid state drive controller as claimed in claim 8.

Citation Information

Patent Citations

  • Flow control method and device and equipment

    CN103929366A