Hardware transmission device and system
Through the priority dispatcher, channel arbiter and traffic monitor in the hardware transmission device, the distribution is based on the priority and transmission characteristics of the NVMe command, which solves the problem of low processing efficiency of NVMe commands and improves transmission efficiency and reliability.
Patent Information
- Application Number
- CN202411161630.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-12-03
Smart Images

Figure CN119065997A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a hardware transmission device and system. Background Art
[0002] NVMe commands initiated by different users often correspond to different storage priorities, access priorities, and bandwidth priorities. These priority control processes rely on the host CPU performance and memory size, etc., and the processing efficiency is slow and there is a certain degree of latency.
[0003] Therefore, how to improve the transmission efficiency of NVMe commands of different priorities 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 hardware transmission device and system to improve the transmission efficiency of NVMe commands of different priorities. The specific scheme is as follows:
[0005] In a first aspect, the present application provides a hardware transmission device, comprising:
[0006] A priority dispatcher, configured to dispatch each received command to each first transmission channel according to a preset dispatching strategy and data transmission characteristics of each first transmission channel;
[0007] Each first transmission channel is used to transmit the command received by itself to the channel arbiter;
[0008] The channel arbiter is used to transmit the received command to the task dispatcher according to the channel priority of each first transmission channel;
[0009] The task dispatcher is used to determine the transmission characteristics of each first transmission channel and transmit the transmission characteristics to the flow monitor;
[0010] The traffic monitor is used to summarize the transmission characteristics of each first transmission channel, obtain the data transmission characteristics of each first transmission channel, and transmit the data transmission characteristics of each first transmission channel to the priority dispatcher.
[0011] Optionally, the hardware transmission device further includes:
[0012] A command dispatching controller is used to dispatch received task class commands and / or control class commands to at least one second transmission channel specified by a user instruction using back pressure handshake logic, so that the task class commands and / or control class commands reach the priority dispatcher via the at least one second transmission channel; wherein, the task class commands include: task commands issued by the host in real time and / or task commands sent back by the priority dispatcher that are not dispatched to any first transmission channel.
[0013] Optionally, the hardware transmission device further includes:
[0014] A register for generating control commands, task command selection information and channel priority configuration information in response to user operations on the host; storing control commands, task command selection information and channel priority configuration information; the control commands include: channel flow monitoring commands, channel flow control commands, channel queue emptying commands and queue emptying enable commands.
[0015] Optionally, the hardware transmission device further includes:
[0016] The command recovery controller is used to determine the execution result of the command. If the execution result of any command is successful, the command execution is determined to be completed and a successful execution message is returned to the host; if the execution result of any command is failed, the command execution is determined to have failed and an execution failure message is returned to the host.
[0017] Optionally, the priority dispatcher is used to dispatch each received command according to a traffic priority draining strategy and a task priority transmission strategy; the preset dispatching strategy includes a traffic priority draining strategy and a task priority transmission strategy.
[0018] Optionally, the task dispatcher is used to collect the instantaneous transmission upper limit, the average transmission data volume and the total transmission data volume in a preset time period of each first transmission channel to obtain the transmission characteristics of each first transmission channel.
[0019] Optionally, the hardware transmission device is connected to an acceleration device;
[0020] The acceleration device comprises:
[0021] A command interaction unit, used to obtain N consecutive commands;
[0022] A generating unit, used to classify N commands according to read and write types, aggregate commands of the same type according to a preset configuration to obtain an aggregate command, and divide the aggregate command to obtain sub-commands, and generate index information of each sub-command;
[0023] An information storage device, used to store the preset configuration, the segmentation boundary and original command information of the aggregation command, and the index information of each subcommand;
[0024] The acceleration unit is used to control multiple operation engines in the acceleration unit to execute each subcommand according to the index information of each subcommand;
[0025] Wherein, the generating unit comprises:
[0026] an aggregation subunit, configured to determine whether the N commands are continuous according to original command information of the N commands; if so, aggregating commands of the same type according to a preset configuration for the N commands to obtain the aggregated command; if not, aggregating commands of the same type according to a preset configuration for continuous commands among the N commands to obtain the aggregated command, and after splicing a subsequently received new command with a non-continuous command among the N commands, executing a step of determining whether the N commands are continuous according to the original command information of the N commands and subsequent steps thereof;
[0027] The cutting sub-unit is used to: cut the aggregate command horizontally into individual sub-commands of equal size; wherein a fixed number of sub-commands constitute the size of a stripe.
[0028] Optionally, there are multiple acceleration units;
[0029] Accordingly, the generation unit is used to: generate different aggregation commands, split different aggregation commands to obtain corresponding sub-commands, and generate index information of the corresponding sub-commands of different aggregation commands; send the index information of the corresponding sub-commands of different aggregation commands to different acceleration units, so that different acceleration units execute the corresponding sub-commands of different aggregation commands in parallel.
[0030] In a second aspect, the present application provides a hardware transmission system, comprising: a plurality of cascaded hardware transmission devices as described in any one of the above items.
[0031] Optionally, multiple hardware transmission devices are cascaded in a tree structure.
[0032] It can be seen from the above scheme that the present application provides a hardware transmission device, including: a priority dispatcher, which is used to dispatch each received command to each first transmission channel according to a preset dispatching strategy and the data transmission characteristics of each first transmission channel; each first transmission channel is used to transmit the commands it receives to a channel arbitrator; the channel arbitrator is used to transmit the received commands to a task dispatcher according to the channel priority of each first transmission channel; the task dispatcher is used to determine the transmission characteristics of each first transmission channel, and transmit the transmission characteristics to a traffic monitor; the traffic monitor is used to summarize the transmission characteristics of each first transmission channel, obtain the data transmission characteristics of each first transmission channel, and transmit the data transmission characteristics of each first transmission channel to the priority dispatcher.
[0033] It can be seen that the hardware transmission device provided in the present application can confirm the priority and dispatch NVMe commands through the priority dispatcher, each first transmission channel, the task dispatcher and the traffic monitor, and can adjust the dispatch strategy in time according to the actual transmission performance, thereby realizing the orderly closed-loop controllable command dispatch, multi-channel transmission and control, which not only has flexible control, but also can effectively improve the transmission efficiency and performance quality, and improve the transmission reliability.
[0034] Correspondingly, a hardware transmission system provided by the present application also has the above-mentioned technical effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] 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.
[0036] Figure 1 A schematic diagram of a hardware transmission device disclosed in this application;
[0037] Figure 2 A schematic diagram of a hardware acceleration device disclosed in this application;
[0038] Figure 3 for Figure 2 Corresponding command processing method flow chart;
[0039] Figure 4 This is a schematic diagram of another hardware transmission device disclosed in this application;
[0040] Figure 5 for Figure 4 Corresponding command processing method flow chart;
[0041] Figure 6 This is a schematic diagram of another hardware transmission device disclosed in this application;
[0042] Figure 7 for Figure 6 Schematic diagram of the corresponding command dispatch sequence;
[0043] Figure 8 A schematic diagram of the structure of a cascade of hardware transmission devices disclosed in this 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 examples obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0045] NVMe is a non-volatile memory host controller interface specification. This standard protocol has the characteristics of low latency, high concurrency and low power consumption. It is a high-performance, highly scalable storage protocol used to connect the host and memory subsystem. In order to further improve the storage performance and reliability of NVMe disk data, multiple independent NVMe disks are generally combined to form a large disk system to form RAID (Redundant Arrays of Independent Disks).
[0046] Common RAID group levels include RAID0, RAID1, RAID5, RAID6, RAID10, etc. Different levels of RAID groups have different storage solutions, which can effectively improve the system read and write performance and reliability. For example, RAID0 can provide very high execution performance, and the basic read and write operations are N times that of a single disk (N is the number of disks that make up RAID0); RAID5 can store data and corresponding parity information on different disks, taking into account storage performance, data security and storage costs.
[0047] From NVMe commands to RAID group data read and write operations, conversion and mapping operations are generally required, that is, after obtaining data read and write commands from the host, the commands are converted into read and write operations on different disks according to the type of RAID. This process generally has two methods according to system performance, security, cost and other requirements, namely software RAID (CPU performs calculation process) and hardware RAID (circuit performs calculation process). Software RAID means: RAID tasks run in the computer system processor, which shares the computing power of the operating system with all related applications, and is relatively low in cost, but software performance will be affected by RAID applications. The more drivers involved (for example, parity check in RAID5), the more complex the RAID system, the greater the impact on overall performance. This solution is more suitable for simple RAID0 / 1 / 10 scenarios. The hardware RAID solution runs RAID applications through dedicated chips. In this implementation, the RAID system is a stand-alone small computer system dedicated to RAID applications, which can unload the task from the host system. Hardware RAID is provided as an important component of the solution or an add-on card. Its main feature is high performance, but the cost is also relatively high because it requires dedicated chips to implement these functions.
[0048] Since NVMe commands initiated by different users often correspond to different storage priorities, access priorities, and bandwidth priorities, these priority control processes rely on host CPU performance and memory size, etc., and the processing efficiency is slow and there is a certain delay. To this end, this application provides a hardware transmission solution that can improve the transmission efficiency of NVMe commands of different priorities.
[0049] See also Figure 1 As shown, the embodiment of the present application discloses a hardware transmission device, including:
[0050] The priority dispatcher is used to dispatch each received command to each first transmission channel according to a preset dispatching strategy and data transmission characteristics of each first transmission channel.
[0051] Each first transmission channel is used to transmit the command received by itself to the channel arbiter.
[0052] The channel arbiter is used to transmit the received commands to the task dispatcher according to the channel priorities of the first transmission channels.
[0053] The task dispatcher is used to determine the transmission characteristics of each first transmission channel and transmit the transmission characteristics to the flow monitor.
[0054] The traffic monitor is used to summarize the transmission characteristics of each first transmission channel, obtain the data transmission characteristics of each first transmission channel, and transmit the data transmission characteristics of each first transmission channel to the priority dispatcher.
[0055] In one embodiment, the hardware transmission device also includes: a command dispatching controller, which is used to use back pressure handshake logic to dispatch the received task class commands and / or control class commands to at least one second transmission channel specified by the user instruction, so that the task class commands and / or control class commands reach the priority dispatcher via at least one second transmission channel; wherein the task class commands include: task commands issued by the host in real time and / or task commands sent back by the priority dispatcher that are not dispatched to any first transmission channel.
[0056] In one embodiment, the hardware transmission device also includes: a register for generating control commands, task command selection information and channel priority configuration information in response to user operations on the host; storing control commands, task command selection information and channel priority configuration information; control commands include: channel flow monitoring commands, channel flow control commands, channel queue emptying commands and queue emptying enable commands.
[0057] In one embodiment, the hardware transmission device also includes: a command recovery controller, which is used to determine the execution result of the command. If the execution result of any command is a successful execution, it is determined that the command execution is completed and an execution success message is returned to the host; if the execution result of any command is a failed execution, it is determined that the command execution has failed and an execution failure message is returned to the host.
[0058] In one embodiment, the priority dispatcher is used to dispatch each received command according to a traffic priority draining strategy and a task priority transmission strategy; the preset dispatching strategy includes a traffic priority draining strategy and a task priority transmission strategy.
[0059] In one embodiment, the task dispatcher is used to collect the instantaneous transmission upper limit, the average transmission data volume and the total transmission data volume in a preset time period of each first transmission channel to obtain the transmission characteristics of each first transmission channel.
[0060] It can be seen that the hardware transmission device provided in this embodiment can confirm the priority and dispatch NVMe commands through the priority dispatcher, each first transmission channel, the task dispatcher and the traffic monitor, and can adjust the dispatch strategy in time according to the actual transmission performance, thereby realizing the orderly closed-loop controllable command dispatch, multi-channel transmission and control, which not only has flexible control, but also can effectively improve the transmission efficiency and performance quality, and improve the transmission reliability.
[0061] In one embodiment, the hardware transmission device is connected to an acceleration device; the acceleration device includes: a command interaction unit, used to obtain N consecutive commands; a generation unit, used to classify the N commands according to the read and write type, aggregate commands of the same type according to a preset configuration to obtain an aggregated command, and split the aggregated command to obtain each sub-command, and generate index information of each sub-command; an information storage device, used to store the preset configuration, the splitting boundary and original command information of the aggregated command, and the index information of each sub-command; the acceleration unit, used to control multiple operation engines in itself to execute each sub-command according to the index information of each sub-command. Among them, the generation unit includes: an aggregation subunit, which is used to determine whether the N commands are continuous according to the original command information of the N commands; if so, for the N commands, the commands of the same type are aggregated according to the preset configuration to obtain an aggregated command; if not, for the continuous commands in the N commands, the commands of the same type are aggregated according to the preset configuration to obtain an aggregated command, and after splicing the subsequently received new commands with the non-continuous commands in the N commands, the step of determining whether the N commands are continuous according to the original command information of the N commands and its subsequent steps are executed; the cutting subunit is used to: horizontally cut the aggregated command into individual sub-commands of equal size; wherein a fixed number of sub-commands constitute the size of a stripe.
[0062] In one embodiment, there are multiple acceleration units; accordingly, the generation unit is used to: generate different aggregation commands, split different aggregation commands to obtain corresponding sub-commands, and generate index information of the corresponding sub-commands of different aggregation commands; send the index information of the corresponding sub-commands of different aggregation commands to different acceleration units, so that different acceleration units execute the corresponding sub-commands of different aggregation commands in parallel.
[0063] In another embodiment, the composition structure of the hardware acceleration device can refer to Figure 2 . Reference Figure 2 and Figure 3 , the functions of each unit and module are as follows:
[0064] After the command interaction unit obtains SQE (Submission Queue Entry, which is defined in the NVMe protocol and can be understood as an NVMe command) from the host, it sends SQE to the sub-command generation unit. After analyzing the relevant information of the command, the sub-command generation unit aggregates the continuous read and write commands (the types to be distinguished are aggregated to the same type) and re-cuts and reshapes the aggregation results.
[0065] The command interaction unit is responsible for interacting with the host for NVMe read and write commands. It is responsible for obtaining SQE and feeding back the CQE corresponding to the executed SQE command to the host. For the underlying hardware, it is responsible for sending the received SQE to the sub-command generation unit and receiving CQE information sent from the recovery unit.
[0066] The sub-command generation unit stores the original NVMe SQE information (i.e., the relevant information of each NVMe command) and shaping information (including cutting boundaries, marking information, etc.) into the information integration memory according to the control page index information (the control page stores the sub-commands that different engines need to execute).
[0067] Specifically, the sub-command generation unit first needs to aggregate and cut the original NVMe read and write commands, including the aggregation of the same operations in the continuous space of the same Raid group to generate an aggregate command. Perform a cut operation on the aggregate command to generate several sub-commands. Secondly, apply for a control page index for each sub-command in the control page index pool, and store the original NVMe command information, the sub-command information, the aggregate cutting information, etc. into the information integration memory according to the index information. Finally, send the control page index and its corresponding sub-command to the acceleration unit for execution.
[0068] Among them, the current NVMe command can be mapped to the Raid group through the namespace information, and the location information and size information of the namespace in the Raid group are provided. Raid group information: used to describe the corresponding Raid group information of the NVMe command operation, including Raid level, number of disks, status, ChunkSize (single stripe size), etc. Disk group information: used to describe the disk status information in the Raid group. When the disk status is abnormal, this information will affect the command aggregation operation and subsequent acceleration unit processing rules.
[0069] The aggregation unit determines whether the command is continuous based on the NSID, SQID, SLBA, NLB and other information in the current NVMe command. If it is continuous, the aggregation operation is performed. If it is not continuous, the current aggregation command is dispatched to the cutting unit and waits for the next NVMe command, and then determines whether it can be aggregated. The aggregation operation can limit the maximum number of continuous aggregation NVMe commands or not. When an original NVMe command involves an abnormal disk during the aggregation operation, the aggregation needs to be disconnected.
[0070] Please refer to Table 1, which illustrates the aggregation process of five NVMe commands in a stripe: IO1~IO5. At this time, IO1~IO5 form an aggregate command.
[0071] Table 1
[0072]
[0073] Among them, the cutting unit receives the aggregation command sent by the aggregation unit, and performs horizontal cutting according to the configured cutting rules, generally according to the stripe direction, and the cutting depth can be 4KB, 8KB, 16KB, etc. Table 2 shows the processing according to the cutting depth of 16KB (ChunkSize=64KB, each grid represents 4KB), each cutting generates a subcommand, and a total of four subcommands are generated, subcommand 1~subcommand. This horizontal cutting can cut a stripe horizontally into 4 parts. One column of Table 2 corresponds to a disk, and there are 4 disks in total. Table 2 represents a stripe.
[0074] Table 2
[0075]
[0076] The control page index pool contains several control page index information. The control page index information is used to indicate the storage location of the control page within the specified storage space, similar to an address information. The specified storage space can be inside the acceleration unit or outside the acceleration unit, and shared by multiple acceleration units. At the same time, the control page index information can also be used to guide the storage location of sub-command information and cutting information in the information integration memory.
[0077] The subcommand generation unit sends the subcommand and the control page index to the acceleration unit, and the acceleration unit (a hardware processing module) is the command execution channel. The scalability of this embodiment is mainly manifested in that multiple acceleration units can be connected to the command interaction unit. The acceleration unit executes each subcommand between engine A, engine B, and engine C according to the control page index information corresponding to the subcommand, thereby completing the subcommand's read and write operation on the Raid disk group or the Raid calculation operation.
[0078] After receiving the subcommand, the acceleration unit executes the subcommand according to the input requirements of modules such as Engine A, Engine B, and Engine C, and according to the control page index information. The control page can drive different engines to perform task flow execution according to certain rules, and finally complete the read and write operations of the Raid disk group. When the last engine completes the operation, the control page index is recovered and fed back to the subcommand generation unit, and stored in the control page index pool for subsequent use.
[0079] The control page generation module receives the subcommand and control page index, converts the subcommand into input drive information for different engine executions, stores it in the control page, and stores the control page in the specified storage space according to the control page index or its change value according to the rules. Finally, notify engine A of the control page location for subsequent operations. In this example, engines A, B, and C are simply described based on the engine location to express the starting execution engine, the middle execution engine, and the last execution engine. More engines can be implemented during the implementation process. After engine A obtains the control page location, it reads the control page index information and completes the corresponding work of engine A based on its internal information. After completion, it passes the control page index information to engine B and continues to execute, and so on, until the last engine (engine C) completes its work and passes the control page address to the control page recovery module. It can be seen that the execution of a subcommand may require the participation of multiple engines and sequential execution to complete.
[0080] The control page recovery module feeds back the sub-command execution status information, sub-command information and control page index information to the recovery unit, and converts the control page address into a control page index according to the specified rules, and returns it to the sub-command unit. The execution of this sub-command task is completed.
[0081] The recovery unit receives the subcommand related information fed back by the acceleration unit, searches for the relevant storage space in the information integration memory through the control page index, mainly including the current subcommand information storage space and the relevant subcommand storage space information cut by the current aggregation command, comprehensively judges whether the original NVMe command has been executed, and the completed NVMe command is fed back to the command interaction unit by constructing CQE format data, and updates the relevant subcommand storage space information. Please refer to Table 3. IO1 in Table 3 is divided into subcommands 1, 2, and 3. Therefore, only when subcommands 1, 2, and 3 are all executed, IO1 is considered to be executed. Therefore, assuming that the current subcommand 2 is executed, the recovery unit obtains the completion information of subcommands 1 to 4 from the information integration memory. If it is determined that subcommands 1 to 3 are all executed, and subcommands 1 to 3 all correspond to NVMe command 1, then the CQE information corresponding to the NVMe command 1 is generated and replied to the command interaction unit, and the status information of the NVMe command 1 in the three subcommands is updated at the same time.
[0082] Table 3
[0083]
[0084] The acceleration unit sends the execution result of the subcommand to the recycling unit so that the recycling unit can subsequently feedback CQE (Completion Queue Entry, the submission queue entry defined in the NVMe protocol, which can be understood as the NVMe command execution result) and other related information to the command interaction unit, including: information predefined by the protocol, command completion status, whether it is completed normally, command ID and other information. Among them, the replies of several subcommands are integrated by the recycling unit before being fed back to the command interaction unit. Among them, the recycling unit reads the execution status information of other subcommands corresponding to the SQE split this time in the information integration memory. When all the subcommand execution status information is completed, the SQE is considered to be executed. Otherwise, the SQE execution is not completed. In addition, the recycling unit needs to update the subcommand execution status information in the integrated memory. The recycling unit also recycles the control page index information corresponding to the subcommand that has been executed to save the storage space occupied by the control page index information for subsequent processing of other subcommands.
[0085] When the SQE execution is completed, the recovery unit feeds back the CQE information to the command interaction unit so that the command interaction unit can further interact with the upper-layer host.
[0086] The storage space of the information integration memory is used to store subcommand execution context information. When the original NVMe command is cut, the subcommand generation unit stores the subcommand information and cutting status information in the space. At the same time, the space also contains the execution status information of each subcommand for the recovery unit to read and update.
[0087] It can be seen that this embodiment can aggregate and cut NVMe read and write commands, and dispatch the cut sub-commands to the acceleration unit for execution. The control interaction information during the execution process is generated by the sub-command generation unit and handed over to the information integration memory storage and recycling unit for use. In order to further improve efficiency, multiple acceleration units can work concurrently in multiple channels.
[0088] In one example, the hardware transmission device can refer to Figure 4 Carry out design implementation.
[0089] See also Figure 4 , Instruction selection logic and user command channel FIFO: The instruction input logic adopts back pressure handshake. From the perspective of traffic, when the traffic saturation condition of a channel (maximum traffic limit, which can be different for different channels) is reached, the back pressure system command is input. The selection logic of different task sources, the data sources include three categories, one is user commands, that is, general task commands; the second is custom commands, including sub-channel traffic monitoring commands, sub-channel traffic control commands, sub-channel queue emptying commands and queue emptying enable commands. The command information is written into the register in advance by the system and input directly; the third is the command that is fed back after the priority dispatch logic cannot dispatch (congested commands that have not been dispatched). Among them, user commands and feedback commands are fixed two-choice (how to choose is determined by the register configuration), and the priority of feedback commands is higher than that of user commands. The two-choice output and the custom command are then output to the subsequent user command channel FIFO in a two-choice manner. The selection signal is "instruction selection", which comes from the register configuration.
[0090] Sub-channel traffic monitoring command, including the sub-channel number, obtains the total traffic or the current task traffic.
[0091] Sub-channel flow control command, including sub-channel number, total flow limit of time period or current flow limit.
[0092] Subchannel queue drain command, including subchannel number, queue drain on and off operation mode.
[0093] The sub-channel flow monitoring command and flow control command rely on the simple decoding operation performed by the sub-channel when receiving the task, and input it into the flow monitoring unit (flow monitor) in its device.
[0094] The queue emptying command corresponds to the opening or closing of the user channel queue, which is controlled by "command selection".
[0095] Priority dispatch unit (priority dispatcher) and flow control FIFO channel: The priority dispatch unit is responsible for two dispatch strategies, including flow priority dispatch strategy (dispatching flow in time according to the flow upper limit of different channels) and task priority dispatch strategy (determined based on task priority classification), and the control source is "flow control information". Flow priority: let the flow go down in advance. Channel priority: determined by configuration
[0096] The flow control information includes: the flow control strategy of each channel, including the flow priority strategy and the task priority strategy; the current flow priority of each channel, including the flow priority and the task priority, which are divided into four levels according to the current number of input channels being 4; among which the flow priority dispatching strategy has a lower priority than the task priority dispatching strategy.
[0097] The flow priority dispatching strategy is described as follows: when a flow priority dispatching strategy of a certain user is effective, different numbers of task downlink channels are configured to the flow control FIFO channel according to the flow priority value.
[0098] The task priority dispatching strategy is described as follows: when a user task priority dispatching strategy is effective, different numbers of corresponding task downlink channels are configured to the flow control FIFO channel according to the task priority value, and then input into the priority arbiter for task priority dispatching. The priority of the rightmost channel of the priority arbiter is configured as the highest, and the three channels on the left are configured with the second highest priority, and the priorities are the same. In this example, the priority can be configured into two levels.
[0099] When the traffic priority strategy and task priority strategy are configured at the same time, the task priority is considered first in the task assignment process. When the corresponding priority channel is occupied, the use of other traffic channels is considered.
[0100] Task information extraction and dispatching unit: From the perspective of traffic control, task extraction mainly includes user information and traffic information (size, which channel is used) in the currently dispatched command. This information is sent to the traffic monitoring unit to facilitate information statistics, analysis and query, so as to notify the priority dispatching module to perform new dispatching tasks.
[0101] Traffic monitoring unit: mainly counts and reports the total system traffic, total user traffic, current traffic, and sub-channel traffic. At the same time, it converts the traffic control information according to the system configuration and sends it to the priority dispatching unit to control and adjust the system traffic.
[0102] The total system traffic is the total traffic information of all users passing through the device from system startup to the current period. This information is obtained by summing up the total traffic information of each user.
[0103] Total user traffic, total traffic information of an independent user passing through the device from system startup to the current period.
[0104] The current flow is the sum of the flow information carried by all commands currently executed in the system. After a command is executed, the command recovery controller will feed back the flow of the completed task to the flow monitoring unit for verification.
[0105] Subchannel traffic, when a command is dispatched to the system, it is split into several subcommands by the system and executed in different task subchannels, subchannel traffic is generated in the task subchannel, and the traffic information can be counted by the device or other devices. When the device is configured to send a subchannel traffic monitoring instruction, the subchannel receives the instruction and feeds back its total traffic or current traffic information to the traffic monitoring unit.
[0106] See also Figure 5 , Figure 4 The execution steps of the structure shown are as follows:
[0107] The command dispatching controller dispatches a user command to channel 4. At this time, the "command selection" signal selects the user command input, and the command passes through the multiplexer.
[0108] The commands are output to the priority dispatching unit through the command channel FIFO.
[0109] The priority dispatching unit dispatches tasks to subsequent flow control FIFO channels according to the current flow status of the user in the "flow control information".
[0110] The command is dispatched to the task information extraction and dispatching module through the priority arbitrator. At this time, the command priority arbitration level is the highest.
[0111] The task information extraction and dispatching module (task dispatcher) extracts the flow information in the current task and sends it to the flow monitoring unit for statistics. The flow calculation unit adds the total flow of the current user and the flow of the task being executed.
[0112] The task is executed to the command recovery controller unit, which feeds back the flow information of the currently executed command to the flow monitoring unit, and the flow monitoring unit reduces the flow of the task currently being executed by the user.
[0113] Since the current total user traffic exceeds the configured traffic threshold and is fed back to the system through the register, the system reduces the user task priority through traffic control configuration and task priority adjustment.
[0114] The information that the user task priority is reduced is transmitted to the priority dispatching unit, and the unit adjusts the user task dispatching channel.
[0115] The priority of the new user task in the priority allocation unit is reduced.
[0116] It can be seen that this embodiment can perform flow control on NVMe commands initiated by multiple users. If the four user spaces are named NSID1 to NSID4 respectively, the flow control of these four user spaces can refer to Figure 6 , Figure 7 And the following:
[0117] In this example, the instructions only include queue emptying instructions. The operation modes include emptying instruction valid and emptying instruction invalid. When the instruction is valid, the corresponding user command channel will no longer receive NSID commands. When the instruction is invalid, the corresponding user channel will be opened to receive NSID instructions. The instruction selection control signal is 1 bit. When it is 1, the queue emptying instruction is selected. When it is 0, the general user command is selected.
[0118] The priority dispatch module implements flow priority control and task priority control, which is controlled by flow control information. According to the priority arbiter logic, the flow control implementation logic list of a single NSID (taking NSID1 as an example) of this module is shown in Table 4.
[0119] Table 4
[0120]
[0121] The weight configuration ratio of the priority arbitrator for channels 1 to 4 is 1:1:1:3, that is, the arbitrator outputs commands for channels 1 to 4 in the following principle: channel 1 outputs one command, channel 2 outputs one command, channel 3 outputs one command, and after channel 4 outputs three commands, channel 1 outputs one command, channel 2 outputs one command, and the others are executed in turn according to this rule. When it is a channel's turn, if there is no command output request for this channel, it will switch to the next channel.
[0122] The internal rules of traffic monitoring are: configure a statistical time counter, which is a circular adder. When the counter is 0, clear the four total traffic adders, otherwise allow the four total traffic adders to continue to accumulate and calculate the total user traffic.
[0123] Configure four total traffic adders to calculate the total number of NLBs of the corresponding NSID, that is, the total historical traffic of the four users in the statistical time period.
[0124] Four current flow adders and subtractors are configured to calculate the total number of NLBs that are executing commands in the system for the corresponding NSID. When the NSID and NLB are passed in by the task information extraction and dispatching module, the counter is incremented. When the NSID is passed in by the external command recovery controller, the counter is decremented.
[0125] Receive the flow control information configured by the system, including flow priority enable, task priority enable, flow priority, and task priority.
[0126] Output four total flow adder values and four current flow adder values, as well as the effective flow control information of the current system.
[0127] The flow control of user space includes: Assuming that all four user channels have command input, the command input is uniform and the efficiency reaches saturation. All command data loads are consistent, that is, the NLB value is the same. The system has not yet controlled user traffic, so the flow control information corresponding to the four command channels is shown in Table 5.
[0128] Table 5
[0129]
[0130] The system has the same ability to respond to commands from the four channels, so the flow information fed back by the recycling controller is also basically the same.
[0131] In the current example, the traffic effect achieved by the command input of the corresponding user space is: due to the command input characteristics and the balance of the command channel (the weight configuration ratio of channel 1 to channel 3 in the priority arbitrator is 1:1:1), the traffic of the four user channels is basically equal, and the ratio of NSID1 to NSID4 commands is 1:1:1:1. The total traffic of channel users is basically equal, and the current traffic of channel users is basically equal.
[0132] When NSID1 to NSID4 commands arrive continuously, and the control target is to increase the NSID4 user command flow, the flow control priority can refer to Table 6.
[0133] Table 6
[0134]
[0135] After adjusting the flow control, the status after the command input is: According to the flow control configuration, the four channels send the user commands to the priority arbitrator in sequence. Finally, the command sequence output by the priority arbitrator is as follows. In this command sequence, the command ratios of NSID1 to NSID4 are 3:3:3:9. The command distribution ratio of NSID4 is improved, and the command flow is improved.
[0136] The transmission device provided in this embodiment can be cascaded, and any transmission device provides multi-level channel traffic transmission, and multi-channel traffic control can be achieved by configuring registers. Among them, register configuration and instruction control are used to achieve task traffic control at different levels of the multi-level task system. After cascading multiple devices, the system may include a top-level device similar to a root node and at least one leaf node device. The root node is controlled by system configuration, and the leaf node is controlled by custom instructions generated after the root node system is configured. Please refer to Figure 8, a main control unit (such as a host) is connected to three transmission transpositions, and these three transmission devices are connected in a tree structure. By entering the flow observation or control instruction from the device as the root node, the instruction can enter the bottom execution unit with the current command flow, and at the same time obtain or control the task flow of the top unit, which has certain real-time and continuity. This cascade topology can be implemented from any flow control level of the system, that is, the level is considered as the flow control root node, and the flow status of the lower level is obtained and controlled through register configuration control.
[0137] A single device consists of instruction selection logic, priority dispatching logic, priority arbiter, flow monitoring unit, and custom instruction decoding logic. The device realizes the input of instruction control information, the flow observation and control of the system command channel and the underlying execution sub-channel of the system, and realizes clear division of logical task functions, convenient operation, simple and ingenious structure, which can effectively improve the work efficiency of the system execution module, reduce the working pressure of the high-load module, improve the system performance quality, prevent system failures caused by uneven system performance, and improve system reliability.
[0138] The flow control operations implemented by the device mainly include:
[0139] You can close or open the task flow of a certain user by inputting queue drain instructions.
[0140] By inputting sub-channel flow instructions, the task load of different execution sub-units in the system can be observed and controlled.
[0141] The load conditions of different users and task channels in the system can be monitored through the flow position and status of the tasks, and fed back to the flow monitoring unit.
[0142] The system can be supported to read the current traffic status (how much traffic different users use).
[0143] The flow monitoring unit controls the multi-channel flow through flow control information according to the system flow state or system configuration state.
[0144] Through flow control information, user tasks of different priorities are assigned to task channels of different priorities.
[0145] Through flow control information, flow control of different user tasks is achieved.
[0146] A hardware transmission system provided in an embodiment of the present application is introduced below. The hardware transmission system described below can be cross-referenced with other embodiments described in this document.
[0147] The embodiment of the present application discloses a hardware transmission system, comprising: a plurality of cascaded hardware transmission devices according to any of the above embodiments, wherein the plurality of hardware transmission devices are cascaded in a tree structure.
[0148] In one example, the hardware transmission device includes:
[0149] A priority dispatcher, configured to dispatch each received command to each first transmission channel according to a preset dispatching strategy and data transmission characteristics of each first transmission channel;
[0150] Each first transmission channel is used to transmit the command received by itself to the channel arbiter;
[0151] a channel arbiter, configured to transmit the received command to the task dispatcher according to the channel priority of each first transmission channel;
[0152] A task dispatcher, configured to determine transmission characteristics of each first transmission channel and transmit the transmission characteristics to a flow monitor;
[0153] The traffic monitor is used to summarize the transmission characteristics of each first transmission channel, obtain the data transmission characteristics of each first transmission channel, and transmit the data transmission characteristics of each first transmission channel to the priority dispatcher.
[0154] In one embodiment, the hardware transmission device further includes:
[0155] A command dispatching controller is used to dispatch received task class commands and / or control class commands to at least one second transmission channel specified by a user instruction using back pressure handshake logic, so that the task class commands and / or control class commands reach a priority dispatcher via at least one second transmission channel; wherein, task class commands include: task commands issued by the host in real time and / or task commands sent back by the priority dispatcher that are not dispatched to any first transmission channel.
[0156] In one embodiment, the hardware transmission device further includes:
[0157] The register is used to generate control commands, task command selection information and channel priority configuration information in response to user operations on the host; store control commands, task command selection information and channel priority configuration information; control commands include: channel flow monitoring commands, channel flow control commands, channel queue emptying commands and queue emptying enable commands.
[0158] In one embodiment, the hardware transmission device further includes:
[0159] The command recovery controller is used to determine the execution result of the command. If the execution result of any command is successful, the command execution is determined to be completed and a successful execution message is returned to the host; if the execution result of any command is failed, the command execution is determined to have failed and an execution failure message is returned to the host.
[0160] In one embodiment, the priority dispatcher is used to dispatch each received command according to a traffic priority draining strategy and a task priority transmission strategy; the preset dispatching strategy includes a traffic priority draining strategy and a task priority transmission strategy.
[0161] In one embodiment, the task dispatcher is used to collect the instantaneous transmission upper limit, the average transmission data volume and the total transmission data volume in a preset time period of each first transmission channel to obtain the transmission characteristics of each first transmission channel.
[0162] 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.
[0163] It can be seen that the hardware transmission device provided in this embodiment can confirm the priority and dispatch NVMe commands through the priority dispatcher, each first transmission channel, the task dispatcher and the traffic monitor, and can adjust the dispatch strategy in time according to the actual transmission performance, thereby realizing the orderly closed-loop controllable command dispatch, multi-channel transmission and control, which not only has flexible control, but also can effectively improve the transmission efficiency and performance quality, and improve the transmission reliability.
[0164] 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.
[0165] 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 non-volatile storage medium known in the art.
[0166] 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 hardware transmission device, characterized in that: include: A priority dispatcher, configured to dispatch each received command to each first transmission channel according to a preset dispatching strategy and data transmission characteristics of each first transmission channel; Each first transmission channel is used to transmit the command received by itself to the channel arbiter; The channel arbiter is used to transmit the received command to the task dispatcher according to the channel priority of each first transmission channel; The task dispatcher is used to determine the transmission characteristics of each first transmission channel and transmit the transmission characteristics to the flow monitor; The traffic monitor is used to summarize the transmission characteristics of each first transmission channel, obtain the data transmission characteristics of each first transmission channel, and transmit the data transmission characteristics of each first transmission channel to the priority dispatcher.
2. The hardware transmission device according to claim 1, characterized in that: The hardware transmission device also includes: A command dispatching controller is used to dispatch received task class commands and / or control class commands to at least one second transmission channel specified by a user instruction using back pressure handshake logic, so that the task class commands and / or control class commands reach the priority dispatcher via the at least one second transmission channel; wherein, the task class commands include: task commands issued by the host in real time and / or task commands sent back by the priority dispatcher that are not dispatched to any first transmission channel.
3. The hardware transmission device according to claim 2, characterized in that: The hardware transmission device also includes: A register for generating control commands, task command selection information and channel priority configuration information in response to user operations on the host; storing control commands, task command selection information and channel priority configuration information; the control commands include: channel flow monitoring commands, channel flow control commands, channel queue emptying commands and queue emptying enable commands.
4. The hardware transmission device according to claim 1, characterized in that: The hardware transmission device also includes: The command recovery controller is used to determine the execution result of the command. If the execution result of any command is successful, the command execution is determined to be completed and a successful execution message is returned to the host; if the execution result of any command is failed, the command execution is determined to have failed and an execution failure message is returned to the host.
5. The hardware transmission device according to claim 1, characterized in that: The priority dispatcher is used to dispatch each received command according to the flow priority emptying strategy and the task priority transmission strategy; the preset dispatching strategy includes the flow priority emptying strategy and the task priority transmission strategy.
6. The hardware transmission device according to claim 1, characterized in that: The task dispatcher is used to collect the instantaneous transmission upper limit, the average transmission data volume and the total transmission data volume in a preset time period of each first transmission channel to obtain the transmission characteristics of each first transmission channel.
7. The hardware transmission device according to any one of claims 1 to 6, characterized in that: The hardware transmission device is connected to an acceleration device; The acceleration device comprises: A command interaction unit, used to obtain N consecutive commands; A generating unit, used to classify N commands according to read and write types, aggregate commands of the same type according to a preset configuration to obtain an aggregate command, and divide the aggregate command to obtain sub-commands, and generate index information of each sub-command; An information storage device, used to store the preset configuration, the segmentation boundary and original command information of the aggregation command, and the index information of each subcommand; The acceleration unit is used to control multiple operation engines in the acceleration unit to execute each subcommand according to the index information of each subcommand; Wherein, the generating unit comprises: an aggregation subunit, configured to determine whether the N commands are continuous according to original command information of the N commands; if so, aggregating commands of the same type according to a preset configuration for the N commands to obtain the aggregated command; if not, aggregating commands of the same type according to a preset configuration for continuous commands among the N commands to obtain the aggregated command, and after splicing a subsequently received new command with a non-continuous command among the N commands, executing a step of determining whether the N commands are continuous according to the original command information of the N commands and subsequent steps thereof; The cutting sub-unit is used to: cut the aggregate command horizontally into individual sub-commands of equal size; wherein a fixed number of sub-commands constitute the size of a stripe.
8. The hardware transmission device according to claim 7, characterized in that: There are multiple acceleration units; Accordingly, the generation unit is used to: generate different aggregation commands, split different aggregation commands to obtain corresponding sub-commands, and generate index information of the corresponding sub-commands of different aggregation commands; send the index information of the corresponding sub-commands of different aggregation commands to different acceleration units, so that different acceleration units execute the corresponding sub-commands of different aggregation commands in parallel.
9. A hardware transmission system, characterized in that: include: A plurality of cascaded hardware transmission devices according to any one of claims 1 to 8.
10. The hardware transmission system according to claim 9, characterized in that: Multiple hardware transmission devices are cascaded in a tree structure.
