Hardware acceleration device and system

The hardware acceleration device addresses CPU resource consumption and processing speed limitations by aggregating and executing NVMe commands in parallel, enhancing command processing efficiency and throughput.

CN119065608APending Publication Date: 2024-12-03SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411161478.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The conversion of NVMe commands into read and write operations on disk groups results in read and write amplification phenomena and significant CPU resource consumption, limiting processing speed due to host CPU and memory limitations.

Method used

A hardware acceleration device that aggregates and splits continuous commands, enabling parallel execution without consuming host CPU resources, by using a command interaction unit, generation unit, acceleration unit, and recovery unit to manage and execute sub-commands efficiently.

Benefits of technology

Improves command processing efficiency and throughput, reducing read and write operation delays by aggregating and executing commands in parallel using hardware acceleration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119065608A_ABST
    Figure CN119065608A_ABST
Patent Text Reader

Abstract

The invention discloses hardware acceleration equipment and a hardware acceleration system in the technical field of computers. According to the hardware acceleration device, through the command interaction unit, the generation unit, the information storage and the acceleration unit, continuous commands can be aggregated and segmented, parallel execution of the commands is achieved, host CPU resources do not need to be consumed, the command processing efficiency and the command throughput rate are improved, and read-write operation delay can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a hardware acceleration device and system. Background Art

[0002] When NVMe commands are converted into read and write operations on the disk group, not only is the read and write amplification phenomenon of the disk accompanied, but the host CPU is also required to control the operation process. This results in a large amount of CPU resources being consumed in the process of converting NVMe commands into read and write disk commands, and the processing speed is limited by the processing capabilities of the host CPU, memory, etc.

[0003] Therefore, how to improve the read and write operation efficiency of a disk group is a problem that those skilled in the art need to solve. Summary of the invention

[0004] In view of this, the purpose of this application is to provide a hardware acceleration device and system to improve the read and write operation efficiency of the disk group. The specific scheme is as follows:

[0005] In a first aspect, the present application provides a hardware acceleration device, including:

[0006] A command interaction unit, used to obtain N consecutive commands;

[0007] 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;

[0008] 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;

[0009] The acceleration unit is used to control multiple operation engines in itself to execute each sub-command according to the index information of each sub-command.

[0010] Optionally, there are multiple acceleration units;

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

[0012] Optionally, the acceleration unit is further used to: determine the execution result of each subcommand;

[0013] Correspondingly, the hardware acceleration device also includes: a recovery unit, which is used to receive the execution results of each sub-command sent by the acceleration unit. If the execution results of each sub-command included in any aggregate command are all successful, it is determined that the execution of the aggregate command is completed, and a successful execution message is returned to the host.

[0014] Optionally, the recovery unit is also used to: if the execution result of any sub-command in any aggregate command is an execution failure, determine that the aggregate command has failed to execute, and determine the sub-command in the aggregate command that has failed to execute, repeat the sub-command that has failed to execute, record the number of repeated executions, and if the number of repeated executions exceeds a preset threshold, return an execution failure message to the host.

[0015] Optionally, the information storage device is further used to record the execution results of each sub-command in real time.

[0016] Optionally, the generating unit includes:

[0017] an aggregation subunit, for determining whether the N commands are continuous based on original command information of the N commands; if so, aggregating commands of the same type for the N commands according to a preset configuration to obtain the aggregated command; if not, aggregating commands of the same type for consecutive commands among the N commands according to a preset configuration to obtain the aggregated command, and after splicing subsequently received new commands with non-consecutive commands among the N commands, executing a step of determining whether the N commands are continuous based on the original command information of the N commands and its subsequent steps.

[0018] Optionally, the generating unit comprises: a cutting subunit;

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

[0020] Optionally, the hardware acceleration device further includes:

[0021] The control page index pool is used to store index information of each sub-command included in the aggregate command and is shared by different acceleration units.

[0022] Optionally, it also includes: a hardware transmission device;

[0023] The hardware transmission device comprises:

[0024] A command dispatching controller connected to the host, used for dispatching received task class commands and / or control class commands to at least one second transmission channel specified by a user instruction by using a 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 in reverse by the priority dispatcher that are not dispatched to any first transmission channel;

[0025] A priority dispatcher, used for dispatching each command sent by the host to each first transmission channel according to a preset dispatching strategy and historical transmission characteristics of each first transmission channel;

[0026] Each first transmission channel is used to transmit the command received by itself to the channel arbiter;

[0027] The channel arbiter is used to transmit the received command to the task dispatcher according to the channel priority of each first transmission channel;

[0028] The task dispatcher is used to transmit the received command to the command interaction unit; determine the transmission characteristics of each first transmission channel, and transmit the transmission characteristics to the flow monitor;

[0029] The traffic monitor is used to summarize the transmission characteristics of each first transmission channel, obtain the historical transmission characteristics of each first transmission channel, and transmit the historical transmission characteristics of each first transmission channel to the priority dispatcher;

[0030] The register is used to store 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 enabling commands.

[0031] In a second aspect, the present application provides an acceleration system, comprising: a host and at least one hardware acceleration device as described in any of the foregoing.

[0032] Through the above scheme, it can be known that the present application provides a hardware acceleration device, including: a command interaction unit, used to obtain N consecutive commands; a generation unit, used to classify N commands according to read and write types, aggregate commands of the same type according to a preset configuration, obtain an aggregate command, and divide the aggregate 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 segmentation boundary and original command information of the aggregate command, and the index information of each sub-command; an acceleration unit, used to control multiple operation engines in itself to execute each sub-command according to the index information of each sub-command. It can be seen that the hardware acceleration device provided by the present application can aggregate and divide continuous commands, and realize parallel execution without consuming host CPU resources, improve command processing efficiency and command throughput, and reduce read and write operation delays.

[0033] Correspondingly, an acceleration system provided by the present application also has the above-mentioned technical effects. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0035] Figure 1 A schematic diagram of a hardware acceleration device disclosed in this application;

[0036] Figure 2 A schematic diagram of another hardware acceleration device disclosed in this application;

[0037] Figure 3 for Figure 2 Corresponding command processing method flow chart;

[0038] Figure 4 This is a schematic diagram of another hardware acceleration device disclosed in this application;

[0039] Figure 5 A schematic diagram of the structure of a control page disclosed in this application;

[0040] Figure 6 A schematic diagram of the structure of a subcommand disclosed in this application;

[0041] Figure 7 This is a schematic diagram of another hardware transmission device disclosed in this application;

[0042] Figure 8 for Figure 7 Corresponding command processing method flow chart. DETAILED DESCRIPTION

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

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

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

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

[0047] At present, when NVMe commands are converted to read and write operations on disk groups, not only is the read and write amplification phenomenon of the disk accompanied, but the host CPU is also required to control the operation process, which results in the need to consume a large amount of CPU resources in the process of converting NVMe commands to read and write disk commands, and the processing speed is limited by the processing capabilities of the host CPU, memory, etc. To this end, the present application provides a hardware acceleration solution that can aggregate and split continuous commands and implement parallel execution without consuming host CPU resources, thereby improving command processing efficiency and command throughput, and reducing read and write operation delays.

[0048] See also Figure 1 As shown, the embodiment of the present application discloses a hardware acceleration device, which can be integrated in a dedicated RAID chip. The hardware acceleration device includes:

[0049] The command interaction unit is used to obtain N consecutive commands. The command may specifically be: NVMe command.

[0050] A generation unit is used to classify N commands according to the 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 each sub-command, and generate index information for each sub-command. That is to say: the read commands in the N commands are aggregated together, and / or the write commands in the N commands are aggregated together to form at least one aggregate command. Among them, information such as the maximum amount of data that an aggregate command can accommodate is determined according to a preset configuration, and the preset configuration may specifically specify information such as the maximum number of commands and the maximum amount of data. For the aggregate command, it can be further divided into sub-commands of equal size. The index information of a sub-command includes: a record of which operation engine performs which type of operation on which disk on which sub-command.

[0051] The information storage device is used to store preset configurations, the segmentation boundaries and original command information of the aggregate command, and the index information of each subcommand. The original command information is the original information of each continuous command that constitutes the aggregate command, including: NSID (namespace ID), SLBA (Starting Logical Block Address, a field in the NVMe command) and NLB (Number of Logic Block, which refers to the number of data blocks of an IO, a field in the NVMe command) and other information. The information storage device is also used to record the execution results of each subcommand in real time.

[0052] The acceleration unit is used to control multiple operation engines in itself to execute each subcommand according to the index information of each subcommand. The operation engine is used to implement the read and write operations of the disk group, RAID calculation operations, etc.

[0053] In one embodiment, there are multiple acceleration units; accordingly, the generation unit is used to: generate different aggregation commands, and divide the different aggregation commands to obtain corresponding sub-commands, and generate index information of the corresponding sub-commands of the different aggregation commands; send the index information of the corresponding sub-commands of the different aggregation commands to different acceleration units, so that different acceleration units execute the corresponding sub-commands of the different aggregation commands in parallel. The composition structure of each acceleration unit is the same and can work in parallel. Each acceleration unit includes multiple operation engines, and the corresponding execution order can be configured between different operation engines to execute different sub-commands.

[0054] In this embodiment, the acceleration unit is also used to: determine the execution results of each subcommand; accordingly, the hardware acceleration device also includes: a recycling unit, which is used to receive the execution results of each subcommand sent by the acceleration unit, and if the execution results of each subcommand included in any aggregate command are all executed successfully, then the aggregate command is determined to be executed successfully, and a successful execution message is returned to the host. In one embodiment, the recycling unit is also used to: if the execution result of any subcommand in any aggregate command is an execution failure, then the aggregate command is determined to have failed to execute, and the subcommands in the aggregate command that failed to execute are determined, and the subcommands that failed to execute are repeatedly executed, and the number of repeated executions is recorded. If the number of repeated executions exceeds a preset threshold, an execution failure message is returned to the host.

[0055] In one embodiment, the generation unit includes: an aggregation subunit, used to determine whether the N commands are continuous based on the original command information of the N commands; if so, for the N commands, aggregating commands of the same type according to a preset configuration to obtain an aggregated command; if not, for continuous commands among the N commands, aggregating commands of the same type according to a preset configuration to obtain an aggregated command, and after splicing subsequently received new commands with non-continuous commands among the N commands, executing the step of determining whether the N commands are continuous based on the original command information of the N commands and its subsequent steps.

[0056] In one embodiment, the generation unit includes: a cutting sub-unit; 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.

[0057] In one embodiment, the hardware acceleration device further includes: a control page index pool, which is used to store index information of each sub-command included in the aggregate command and is shared by different acceleration units.

[0058] In one embodiment, it also includes: a hardware transmission device; the hardware transmission device includes: a command dispatching controller connected to the host, 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 in reverse by the priority dispatcher that are not dispatched to any first transmission channel; the priority dispatcher is used to dispatch each command sent by the host to each first transmission channel according to a preset dispatching strategy and the historical transmission characteristics of each first transmission channel; each first transmission channel is used to transmit the received commands itself. The received commands are sent to the channel arbitrator; the channel arbitrator is used to transmit the received commands to the task dispatcher according to the channel priority of each first transmission channel; the task dispatcher is used to transmit the received commands to the command interaction unit; determine the transmission characteristics of each first transmission channel, and transmit the transmission characteristics to the flow monitor; the flow monitor is used to summarize the transmission characteristics of each first transmission channel, obtain the historical transmission characteristics of each first transmission channel, and transmit the historical transmission characteristics of each first transmission channel to the priority dispatcher; the register is used to store 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.

[0059] It can be seen that the hardware acceleration device provided in this embodiment can aggregate and split continuous commands, and realize parallel execution of commands without consuming host CPU resources, thereby improving command processing efficiency and command throughput, and reducing read and write operation delays.

[0060] As mentioned above, this application uses hardware to accelerate the aggregation, cutting and execution of commands, and can also integrate the execution results of the commands, divide and conquer the originally complex and disordered NVMe commands, thereby improving the efficiency of command execution.

[0061] In another embodiment, the hardware acceleration device can be configured as follows: Figure 2 . Reference Figure 2 and Figure 3 , the functions of each unit and module are as follows:

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

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

[0064] 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).

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

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

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

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

[0069] Table 1

[0070]

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

[0072] Table 2

[0073]

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

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

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

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

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

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

[0080] Table 3

[0081]

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

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

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

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

[0086] See also Figure 4 , implement two groups of NVMe command to Raid command acceleration modules, one module executes NVMe commands of NSID1~NSID4, and the other module executes NVMe commands of NSID5~NSID8. Four acceleration units are implemented in each command acceleration module to accelerate the task execution process. The control page storage space required by the acceleration unit is shared in the command acceleration module. The two groups of command acceleration modules independently feedback NVMe CQE information to the command interaction unit. For the sake of simplicity, the two groups of command acceleration modules are implemented with exactly the same structure, and will not be described separately in the future. They are simply referred to as module A and module B, or collectively referred to as modules.

[0087] Combination Figure 4 , the specific functions of each unit are as follows:

[0088] The subcommand generation unit needs to save four different NameSpace information in the NameSpace information module according to the number of NSIDs dispatched by the command interaction unit. The Raid group information module saves a group of information, that is, module A and module B operate on a Raid group respectively. The disk group information supports saving information of up to 32 disks. Here, module A and module B can store the same Raid group information and disk group information, indicating that the above 8 NameSpaces exist in the same Raid group, and can also store different Raid group information and different disk group information, indicating that the above 8 NameSpaces are in two different Raid groups.

[0089] The control page index pool contains 1024 control page indexes, which means that up to 1024 subcommands can be supported to execute tasks in the module at the same time. The maximum value is configurable.

[0090] The aggregation unit supports up to 32 consecutive NVMe command aggregation operations, which can be oriented to different Raid groups, and the read and write operation modes can open or close the aggregation operation, or can be enabled to open or close the command aggregation operation. The aggregation command information will be cached to the temporary space, and the information is also used by the cutting unit. For details of the aggregation command information, please refer to Table 4 and Table 5.

[0091] Table 4

[0092]

[0093] Table 5

[0094]

[0095] The cutting unit performs a horizontal cutting operation on the aggregation command in the strip direction. The cutting depth is configurable and the default is 4KB. That is, when the Raid group ChunkSize is 64KB, a 64KB aggregation command can be cut into 16 equal parts at most. In particular, when there is no valid data in a sub-strip in the strip, the sub-strip will be skipped and no cutting will be performed. For the information output by the cutting unit, please refer to Table 6 and Table 7.

[0096] Table 6

[0097]

[0098] Table 7

[0099]

[0100] The information sent to the information integration memory is mainly obtained from the output of the cutting unit. After applying for the control page index from the control page index pool, it is sent to the information integration memory together. The address of the information integration memory is obtained by the control page index. The main parameters included are shown in Table 8 to describe the structure of the control page.

[0101] Table 8

[0102]

[0103] Four acceleration units are instantiated in module A and module B respectively. There is no task dependency between these acceleration units and they can execute subcommands independently. A control page needs to be created at the beginning of execution. After the execution is completed, the corresponding control page index needs to be recycled and the execution status of the subcommand is sent to the recycling unit.

[0104] The generation of the control page, the parsing of the subcommands and the instruction assembly process include: encapsulating the information of the current subcommand in a certain format to form a Raid command format. The Raid command encapsulation format includes a command feature area of ​​64B, an original NVMe command area of ​​64B, an engine general parameter area of ​​64B and a subcommand sequence area of ​​832B. Subcommands refer to instructions executed by the engine, such as engine A executes subcommand 0, engine B executes subcommand 1, engine C executes subcommand 2, etc. The command feature area can be filled with subcommand parameters. Among them, the structure of the control page can refer to Figure 5 .

[0105] The subcommand data format includes two parts: the subcommand feature area and the subcommand parameter area. The subcommand feature area includes the position of the current subcommand in the subcommand sequence, the execution mode of the current subcommand, the execution engine, the debugging mode, the size and the execution status, etc. (The execution status is currently a reserved bit and will be filled in after the engine execution is completed). The parameters filled in the subcommand parameter area are related to the function of the execution engine corresponding to the instruction. Different subcommands of different execution engines are filled in with different parameter information. The data format of the subcommand is as follows: Figure 6 shown.

[0106] Control page recycling requires that the subcommand related information be read from the command feature area, updated, and delivered to the recycling unit. The recycling unit uses PriorCPIndex and NextCPIndex in the subcommand information to query the execution status of other context subcommands in the information integration memory, and determines whether the original NVMe command has been executed through CID comparison, position splicing, etc. If all the original NVMe commands involved in the current subcommand are executed, the controller index is written to the subcommand generation unit.

[0107] It can be seen that this embodiment aggregates and cuts NVMe commands through hardware and converts them into fixed-specification sub-commands, and then enables the sub-commands to quickly execute the read and write operations of the Raid disk group in the acceleration engine. Among them, by aggregating the original NVMe read and write commands and executing them in a multi-channel acceleration unit, the command delay is reduced and the system command execution speed is improved; by standardizing the strip cutting strategy, the internal engine structure of the acceleration unit, the internal data structure of the information integration memory, and the recovery unit structure are simplified, thereby reducing the overall complexity of the system hardware design. The command interaction unit can group NVMe commands of different NameSpaces and distribute them to multiple independent sub-command generation units. The sub-command generation unit can also realize the aggregation and cutting of multiple original commands according to the characteristics of the NVMe read and write command protocol that is executed in an unordered manner, and distribute them in disorder to multiple independent acceleration units. Such a system has good scalability. Different acceleration units process sub-commands in parallel to improve system efficiency.

[0108] An acceleration system provided in an embodiment of the present application is introduced below. The acceleration system described below can be referenced to other embodiments described in this document.

[0109] An embodiment of the present application discloses an acceleration system, including: a host and at least one hardware acceleration device described in any of the aforementioned embodiments.

[0110] In one example, the hardware acceleration device includes:

[0111] A command interaction unit, used to obtain N consecutive commands;

[0112] 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, split the aggregate command to obtain sub-commands, and generate index information of each sub-command;

[0113] An information storage device for storing preset configurations, segmentation boundaries of aggregation commands and original command information, as well as index information of each subcommand;

[0114] The acceleration unit is used to control multiple operation engines in itself to execute each sub-command according to the index information of each sub-command.

[0115] In one embodiment, there are multiple acceleration units;

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

[0117] In one embodiment, the acceleration unit is further used to: determine the execution result of each subcommand;

[0118] Correspondingly, the hardware acceleration device also includes: a recovery unit, which is used to receive the execution results of each sub-command sent by the acceleration unit. If the execution results of each sub-command included in any aggregate command are all successful, it is determined that the execution of the aggregate command is completed, and a successful execution message is returned to the host.

[0119] In one embodiment, the recovery unit is also used for: if the execution result of any subcommand in any aggregate command is an execution failure, then determining that the aggregate command has failed to execute, and determining the subcommand in the aggregate command that has failed to execute, repeatedly executing the subcommand that has failed to execute, recording the number of repeated executions, and if the number of repeated executions exceeds a preset threshold, returning an execution failure message to the host.

[0120] In one implementation, the information storage device is further used to record the execution results of each subcommand in real time.

[0121] In one embodiment, the generating unit includes:

[0122] The aggregation subunit is used to determine whether the N commands are continuous based on 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 among 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 among the N commands, the step of determining whether the N commands are continuous based on the original command information of the N commands and its subsequent steps are executed.

[0123] In one embodiment, the generation unit includes: a polymerization subunit;

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

[0125] In one embodiment, the hardware acceleration device further includes:

[0126] The control page index pool is used to store index information of each sub-command included in the aggregate command and is shared by different acceleration units.

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

[0128] It can be seen that this embodiment provides an acceleration system that can aggregate, cut, and convert NVMe commands into fixed-specification sub-commands, and then enable the sub-commands to quickly execute read and write operations of the Raid disk group in the acceleration engine.

[0129] In one example, the hardware transmission device can refer to Figure 7 Carry out design implementation.

[0130] See also Figure 7 , 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.

[0131] Sub-channel traffic monitoring command, including the sub-channel number, obtains the total traffic or the current task traffic.

[0132] Sub-channel flow control command, including sub-channel number, total flow limit of time period or current flow limit.

[0133] Subchannel queue drain command, including subchannel number, queue drain on and off operation mode.

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

[0135] The queue emptying command corresponds to the opening or closing of the user channel queue, which is controlled by "command selection".

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

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

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

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

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

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

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

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

[0144] Total user traffic, total traffic information of an independent user passing through the device from system startup to the current period.

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

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

[0147] See also Figure 8 , Figure 8 for Figure 7 The execution steps of the structure shown are as follows:

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

[0149] The commands are output to the priority dispatching unit through the command channel FIFO.

[0150] 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".

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

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

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

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

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

[0156] The priority of the new user task in the priority allocation unit is reduced.

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

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

[0159] 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 acceleration device, characterized in that: include: 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 itself to execute each sub-command according to the index information of each sub-command.

2. The hardware acceleration device according to claim 1, 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.

3. The hardware acceleration device according to claim 1, characterized in that: The acceleration unit is also used to: determine the execution result of each subcommand; Correspondingly, the hardware acceleration device also includes: a recovery unit, which is used to receive the execution results of each sub-command sent by the acceleration unit. If the execution results of each sub-command included in any aggregate command are all successful, it is determined that the execution of the aggregate command is completed, and a successful execution message is returned to the host.

4. The hardware acceleration device according to claim 3, characterized in that: The recovery unit is also used for: if the execution result of any subcommand in any aggregate command is an execution failure, then determining that the aggregate command has failed to execute, and determining the subcommand in the aggregate command that has failed to execute, repeatedly executing the subcommand that has failed to execute, recording the number of repeated executions, and if the number of repeated executions exceeds a preset threshold, returning an execution failure message to the host.

5. The hardware acceleration device according to claim 3, characterized in that: The information storage device is also used to record the execution results of each subcommand in real time.

6. The hardware acceleration device according to claim 1, characterized in that: The generating unit comprises: an aggregation subunit, for determining whether the N commands are continuous based on original command information of the N commands; if so, aggregating commands of the same type for the N commands according to a preset configuration to obtain the aggregated command; if not, aggregating commands of the same type for consecutive commands among the N commands according to a preset configuration to obtain the aggregated command, and after splicing subsequently received new commands with non-consecutive commands among the N commands, executing a step of determining whether the N commands are continuous based on the original command information of the N commands and its subsequent steps.

7. The hardware acceleration device according to claim 1, characterized in that: The generating unit comprises: a cutting subunit; 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 acceleration device according to claim 2, characterized in that: The hardware acceleration device also includes: The control page index pool is used to store index information of each sub-command included in the aggregate command and is shared by different acceleration units.

9. The hardware acceleration device according to any one of claims 1 to 8, characterized in that: Also includes: Hardware transmission device; The hardware transmission device comprises: A command dispatching controller connected to the host is used to dispatch the received task class commands and / or control class commands to at least one second transmission channel specified by the user instruction by using the back pressure handshake logic, so that the task class commands and / or control class commands reach the priority dispatcher through 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; A priority dispatcher, used for dispatching each command sent by the host to each first transmission channel according to a preset dispatching strategy and historical 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 transmit the received command to the command interaction unit; 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 historical transmission characteristics of each first transmission channel, and transmit the historical transmission characteristics of each first transmission channel to the priority dispatcher; The register is used to store 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 enabling commands.

10. An acceleration system, characterized in that: include: A host and at least one hardware acceleration device according to any one of claims 1 to 8.

Citation Information

Cited By

  • Transmission efficiency improvement method and device, electronic equipment and storage medium

    CN121326254A