Acceleration Device and Method for Disk Access

Through the design of the command parsing module and the queue management module, parallel processing of disk read and write commands is realized, solving the platform dependence and processor core dependence problems of NVMe SSD controller, and improving the efficiency and reliability of disk access.

CN118550476BActive Publication Date: 2025-07-25SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411018212.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-29
Publication Date
2025-07-25
Estimated Expiration
2044-07-29

AI Technical Summary

Technical Problem

In the prior art, the acceleration method of NVMe SSD controllers has problems with platform dependence and processor core dependence, resulting in high development costs in heterogeneous computing environments and the inability to effectively utilize the parallel processing capabilities of multi-core processors.

Method used

The design of the command parsing module and the queue management module is adopted, and the parallel processing of multiple command parsing units and command execution modules is realized to realize parallel processing of disk read and write commands, reducing dependence on the platform and processor cores.

Benefits of technology

It improves the efficiency and reliability of disk access, reduces dependence on the platform and processor core, adapts to different hardware and operating system platforms, and is highly scalable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550476B_ABST
    Figure CN118550476B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of disk access, and discloses an acceleration device and method for disk access. The present invention includes: a plurality of command parsing units, which respectively parse and split disk read and write commands to obtain at least one read and write command; each command parsing unit is respectively communicatively connected to a command execution module, and each command execution module includes a group of command execution units; the command parsing unit sends the read and write command to one of the command execution units in the corresponding command execution module; the command execution unit writes submission queue information into the submission queue, receives first completion information, and sends it to the queue management module; after receiving the first completion information, the queue management module sends submission queue update information to the disk controller. In this way, through the settings of the command parsing module and the command execution module, parallel processing of disk read and write commands is realized at the hardware level, the efficiency of disk access is improved, and at the same time, the dependence on the platform and processor cores is low.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of disk access, and particularly to an acceleration device and method for disk access. Background Art

[0002] As a management interface for communicating between a host and an NVMe disk, an NVMe (Non Volatile Memory Express) SSD (Solid State Disk) controller has an important impact on the performance of the NVMe disk. Currently, the acceleration of the NVMe disk is usually achieved based on SPDK (Storage Performance Development Kit). As an application software acceleration library, SPDK can provide a series of high-performance and scalable tools and libraries. However, due to the performance differences of SPDK on different hardware and operating system platforms, and the inability to effectively utilize the parallel processing capabilities of multi-core processors, the acceleration of the NVMe disk by SPDK has problems of platform dependence and processor core dependence. Summary of the Invention

[0003] In view of this, the present invention provides an acceleration device and method for disk access to solve the problems of platform dependence and processor core dependence existing in the current acceleration methods for disk access.

[0004] In a first aspect, the present invention provides an acceleration device for disk access, the device comprising:

[0005] A command parsing module, a plurality of command parsing modules, and a queue management module;

[0006] The command parsing module includes a plurality of command parsing units, and the plurality of command parsing units are used to respectively parse and split the received disk read and write commands to obtain at least one read and write command;

[0007] Each command parsing unit is respectively communicatively connected to a command parsing module, and each command parsing module includes a group of command parsing units; the command parsing unit is used to send the read and write command to one of the command parsing units in the corresponding command parsing module;

[0008] The command parsing unit is communicatively connected to the queue management module; the command parsing unit is used to write the submission queue information corresponding to the read and write command into the submission queue, and receive the first completion information returned by the submission queue and send it to the queue management module; the first completion information is used to indicate that the submission queue information has been written into the submission queue;

[0009] The queue management module is used to send commit queue update information to the disk controller after receiving the first completion information, so that the disk controller can obtain the commit queue information from the commit queue and execute read / write commands based on the commit queue information.

[0010] In this way, the command parsing unit in the command parsing module processes the received disk read / write commands respectively, so as to realize the parallel processing of disk read / write commands. At the same time, each command parsing unit is respectively communicatively connected to a command parsing module. Each command parsing module includes a group of command parsing units. The command parsing unit can send the read / write commands obtained by processing the disk read / write commands to one of the command parsing units. The command parsing unit can process multiple disk read / write commands and send them to different command parsing units for processing respectively, thus realizing the parallel processing of read / write commands. Therefore, through the setting of the command parsing module and the command parsing module, the parallel processing of disk read / write commands is realized at the hardware level, improving the efficiency of disk access and having low dependence on the platform and processor cores.

[0011] In an optional implementation manner, the device further includes a completion queue, and the completion queue is respectively communicatively connected to the disk controller and the queue management module;

[0012] The disk controller is used to execute the read / write commands to obtain execution results and write the completion queue information corresponding to the execution results into the completion queue;

[0013] The completion queue is used to receive and write the completion queue information, and send the written completion queue information to the queue management module;

[0014] The queue management module is further used to send the completion queue update information corresponding to the completion queue information to the disk controller after receiving the completion queue information to obtain the second completion information, and write the execution results into the result cache after obtaining the second completion information; the second completion information is used to indicate that the completion queue update information has been written into the disk controller.

[0015] In this way, after the disk controller executes the read / write commands to obtain the execution results, the execution results are written into the result cache through the completion queue and the queue management module, so as to obtain the execution results of the disk after completing the disk access and improve the reliability of disk access.

[0016] In an optional implementation manner, the queue management module includes multiple queue management units, and the multiple queue management units correspond to multiple disk controllers one by one;

[0017] The command parsing unit is used to send a resource application request to the queue management unit corresponding to the read / write command to obtain the commit queue resources corresponding to the read / write command, and determine the commit queue information based on the commit queue resources and the read / write command.

[0018] In an alternative embodiment, the command parsing unit includes a command execution cache; the command execution cache is used to save read and write commands when the submission queue resources are not obtained.

[0019] In this way, when the command parsing unit fails to obtain the submission queue resources, the read and write commands are saved, and at the same time, the next read and write command can be processed continuously. On the one hand, it avoids the loss of read and write commands, and on the other hand, it avoids blocking the execution of the next read and write command when the current read and write command fails to apply for the submission queue resources, thereby improving the execution efficiency of the read and write commands.

[0020] In an alternative embodiment, the queue management unit includes an arbitration subunit and a submission queue management subunit;

[0021] The arbitration subunit is used to determine a target application request from multiple received resource application requests;

[0022] The submission queue management subunit is used to allocate submission queue resources based on the target application request, return the submission queue resources to the command parsing unit corresponding to the target application request, and send submission queue update information to the disk controller after receiving the first completion information, so that the disk controller can obtain the submission queue information from the submission queue and execute read and write commands based on the submission queue information.

[0023] In this way, the target application request is determined by the arbitration subunit, and the submission queue resources are allocated to the command parsing unit corresponding to the target application request by the submission queue management subunit, thereby realizing the arbitration and coordination of multiple resource application requests.

[0024] In an alternative embodiment, the queue management unit includes a completion queue management subunit and a result output subunit;

[0025] The completion queue subunit is used to determine the completion queue update information corresponding to the completion queue information based on the completion queue information and send the completion queue update information to the disk controller;

[0026] The result output subunit is used to write the execution result into the result cache after obtaining the second completion information.

[0027] In an alternative embodiment, the resource application request includes the number of read and write commands; the submission queue management subunit is further used to update the allocated submission queue resources based on the completion queue information, and recycle the allocated submission queue resources when the number of received completion queue information is consistent with the number of read and write commands.

[0028] In this way, after all the disk read / write commands corresponding to the disk read / write commands are executed by the disk controller, the submission queue resources corresponding to the disk read / write commands are recycled, thereby releasing the used submission queue resources.

[0029] In an alternative embodiment, the apparatus further includes a first arbitration module; the first arbitration module is communicatively connected to a plurality of command parsing units and a submission queue respectively;

[0030] The first arbitration module is configured to receive submission queue information sent by a plurality of command parsing units, determine target submission queue information from the plurality of submission queue information, write the target submission queue information into the submission queue, and send a first completion message to the command parsing unit corresponding to the target submission queue information after writing the target submission queue information into the submission queue.

[0031] In an alternative embodiment, the apparatus further includes a second arbitration module; the second arbitration module is communicatively connected to a plurality of queue management units, a disk controller, and a result cache respectively;

[0032] The second arbitration module is configured to receive submission queue update information sent by a plurality of queue management units, determine target submission queue update information from the plurality of submission queue update information, and send the target submission queue update information to the disk controller;

[0033] The second arbitration module is further configured to receive completion queue update information sent by a plurality of queue management units, determine target completion queue update information from the plurality of completion queue update information, and send the target completion queue update information to the disk controller;

[0034] The second arbitration module is further configured to receive execution results sent by a plurality of queue management units, determine target execution results from the plurality of execution results, and send the target execution results to the result cache.

[0035] In an alternative embodiment, the apparatus further includes a command queue; the command queue is communicatively connected to a plurality of command parsing units respectively;

[0036] The command queue is configured to receive disk read / write commands and send the disk read / write commands to one of the command parsing units according to the status information of the plurality of command parsing units.

[0037] In this way, through the command queue, the disk read / write commands are sent to different command parsing units according to the status information of the command parsing units, thereby realizing parallel processing of the disk read / write commands.

[0038] In a second aspect, the present invention provides an acceleration method for disk access, the method including:

[0039] The command parsing module obtains disk read / write commands, parses and splits the disk read / write commands to obtain at least one read / write instruction;

[0040] Based on the status information of each command parsing unit in the command parsing module corresponding to the command parsing module, the command parsing module determines the target execution unit and sends the read / write command to the target execution unit;

[0041] The target execution unit determines the submission queue information corresponding to the read / write command and writes the submission queue information into the submission queue;

[0042] The target execution unit obtains the first completion information returned by the submission queue and sends the first completion information to the queue management module;

[0043] In response to the first completion information, the queue management module sends submission queue update information to the disk controller, so that the disk controller obtains the submission queue information from the submission queue and executes the read / write command based on the submission queue information.

[0044] In this way, the command parsing units in the command parsing module respectively process the received disk read / write commands, thereby realizing the parallel processing of disk read / write commands; at the same time, each command parsing unit is respectively communicatively connected to a command parsing module, and each command parsing module includes a group of command parsing units. The command parsing unit can send the read / write commands obtained by processing the disk read / write commands to one of the command parsing units. The command parsing unit can process multiple disk read / write commands and send them to different command parsing units for processing respectively, thereby realizing the parallel processing of read / write commands. Thus, through the setting of the command parsing module and the command parsing module, the parallel processing of disk read / write commands is realized at the hardware level, the efficiency of disk access is improved, and at the same time, the dependence on the platform and the processor core is low.

[0045] In an alternative embodiment, the target execution unit determines the submission queue information corresponding to the read / write command, including:

[0046] The target execution unit sends a resource application request to the queue management unit corresponding to the read / write command; the queue management module includes multiple queue management units, and the multiple queue management units are respectively in one-to-one correspondence with multiple disk controllers;

[0047] Based on the resource application request, the queue management unit allocates submission queue resources and returns the submission queue resources to the target execution unit;

[0048] The target execution unit determines the submission queue information based on the submission queue resources and the read / write command.

[0049] In an alternative embodiment, the method further includes:

[0050] The queue management unit obtains multiple resource application requests and determines a target application request from the multiple resource application requests;

[0051] Based on the target application request, the queue management unit obtains a submission queue resource from the preset queue resources;

[0052] The queue management unit sends the submission queue resource to the target execution unit corresponding to the target application request.

[0053] In this way, the target application request is determined from the multiple resource application requests, and the submission queue resource is allocated to the command parsing unit corresponding to the target application request, thereby realizing the arbitration and coordination of the multiple resource application requests.

[0054] In an alternative embodiment, after the queue management module sends the submission queue update information to the disk controller in response to the first completion information, it further includes:

[0055] The completion queue is obtained and the completion queue information is written, and the written completion queue information is sent to the queue management module; the completion queue information is obtained by the disk controller based on the execution result after executing the read / write command;

[0056] The queue management module parses the completion queue information to obtain the execution result, and sends the completion queue update information to the disk controller to obtain the second completion information returned by the disk controller after receiving the completion queue update information;

[0057] The queue management module sends the execution result to the result cache in response to the second completion information.

[0058] In this way, after the disk controller executes the read / write command to obtain the execution result, the execution result is written into the result cache through the completion queue and the queue management module, so that the execution result of the disk can be obtained after the disk access is completed, improving the reliability of the disk access.

[0059] In an alternative embodiment, after the completion queue is obtained and the completion queue information is written and the written completion queue information is sent to the queue management module, it further includes:

[0060] The queue management module updates the submission queue resource corresponding to the read / write command based on the completion queue information;

[0061] If the number of received completion queue information is consistent with the number of read / write commands, the queue management module releases the submission queue resource to the preset queue resources to recycle the submission queue resource.

[0062] Thus, after all disk read / write commands corresponding to the disk read / write commands are executed by the disk controller, the submission queue resources corresponding to the disk read / write commands are recycled, thereby releasing the used submission queue resources. Description of the Drawings

[0063] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0064] Figure 1 is a schematic structural diagram of an acceleration device for disk access according to an embodiment of the present invention;

[0065] Figure 2 is a schematic structural diagram of an acceleration device for disk access according to an embodiment of the present invention;

[0066] Figure 3 is a schematic flowchart of a specific embodiment of an acceleration method for disk access according to an embodiment of the present invention;

[0067] Figure 4 is a flowchart of an acceleration method for disk access according to an embodiment of the present invention;

[0068] Figure 5 is a schematic flowchart of another acceleration method for disk access according to an embodiment of the present invention;

[0069] Figure 6 is a schematic flowchart of yet another acceleration method for disk access according to an embodiment of the present invention;

[0070] The following further explains the reference numerals:

[0071] 1 - Command parsing module; 10 - Command parsing unit; 2 - Command execution module; 20 - Command execution unit; 3 - Queue management module. Detailed Embodiments

[0072] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.

[0073] The NVMe (Non-Volatile Memory Express) SSD (Solid State Disk) controller, as the management interface connecting the host and the NVMe disk, has a significant impact on the performance of the NVMe disk. Currently, the acceleration of NVMe disks is usually achieved based on SPDK (Storage Performance Development Kit). As an application software acceleration library, SPDK can provide a series of high-performance and scalable tools and libraries. However, SPDK has the following problems: On the one hand, the current software processing method based on SPDK has significant performance differences on different hardware and operating system platforms, resulting in the problem of platform dependence in the acceleration of NVMe disks by SPDK. Platform dependence will limit the widespread application of NVMe disks. Especially in heterogeneous computing environments, the software processing method needs to be customized and optimized for each platform, leading to a substantial increase in development costs and time. On the other hand, there is a problem of processor core dependence in the acceleration of NVMe disks by SPDK. With the continuous improvement of the performance of NVMe disks, the software processing method cannot effectively utilize the parallel processing capabilities of multi-core processors, which results in a waste of processor core resources. At the same time, with the increase in the number of attached disks and the increase in concurrent requests, the dependence on processor cores will be further exacerbated, thereby affecting the scalability of the system.

[0074] Based on this, on the one hand, an embodiment of the present invention provides an acceleration device for disk access. The device includes a command parsing module, multiple command parsing modules, and a queue management module. The command parsing module includes multiple command parsing units. The multiple command parsing units are used to respectively parse and split the received disk read / write commands to obtain at least one read / write command. Each command parsing unit is respectively communicatively connected to a command parsing module. Each command parsing module includes a group of command parsing units. The command parsing unit is used to send the read / write command to one of the command parsing units in the corresponding command parsing module. The command parsing unit is communicatively connected to the queue management module. The command parsing unit is used to write the submission queue information corresponding to the read / write command into the submission queue, and receive the first completion information returned by the submission queue and send it to the queue management module. The first completion information is used to indicate that the submission queue information has been written into the submission queue. The queue management module is used to send submission queue update information to the disk controller after receiving the first completion information, so that the disk controller can obtain the submission queue information from the submission queue and execute the read / write command based on the submission queue information. On the other hand, an acceleration method for disk access is provided. The method includes: the command parsing module obtains the disk read / write command, and parses and splits the disk read / write command to obtain at least one read / write instruction; the command parsing module determines the target execution unit based on the status information of each command parsing unit in the corresponding command parsing module of the command parsing module, and sends the read / write command to the target execution unit; the target execution unit determines the submission queue information corresponding to the read / write command and writes the submission queue information into the submission queue; the target execution unit obtains the first completion information returned by the submission queue and sends the first completion information to the queue management module; the queue management module, in response to the first completion information, sends submission queue update information to the disk controller, so that the disk controller can obtain the submission queue information from the submission queue and execute the read / write command based on the submission queue information. In this way, by using the command parsing units in the command parsing module to respectively process the received disk read / write commands, parallel processing of the disk read / write commands is achieved. At the same time, each command parsing unit is respectively communicatively connected to a command parsing module, and each command parsing module includes a group of command parsing units. The command parsing unit can send the read / write command obtained by processing the disk read / write command to one of the command parsing units. The command parsing unit can process multiple disk read / write commands and send them to different command parsing units for processing respectively, thereby achieving parallel processing of the read / write commands. Thus, through the setting of the command parsing module and the command parsing module, parallel processing of the disk read / write commands is realized at the hardware level, the efficiency of disk access is improved, and the dependence on the platform and processor cores is low.

[0075] On the one hand, in this embodiment, an acceleration device for disk access is provided. This device is used to implement the above embodiments and preferred implementation manners, and those that have been described will not be repeated here. As used hereinafter, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0076] This embodiment provides an acceleration device for disk access. As Figure 1 shown, the device includes: a command parsing module 1, a plurality of command execution modules 2, and a queue management module 3. Among them, the command parsing module 1 is used to parse and split the received disk read / write command to obtain a read / write command; the command execution module 2 is used to write the submission queue information corresponding to the read / write command into the submission queue, so that the disk controller can obtain the submission queue information corresponding to the read / write command from the submission queue; the queue management module 3 is used to manage the submission queue and instruct the disk controller to obtain the submission queue information from the submission queue. Thus, by the command parsing module 1, the command execution module 2, and the queue management module 3 to process the commands and data streams for the disk, the acceleration of disk access is realized at the hardware level, which is more general than the software solution.

[0077] In the embodiment of the present invention, the command parsing module 1 includes a plurality of command parsing units 10, and the plurality of command parsing units 10 are used to respectively parse and split the received disk read / write command to obtain at least one read / write command. Among them, the disk read / write command is an IO command for the NVMe disk, and the disk read / write command at least includes information related to the command for creating the submission queue and the number of the queue management unit corresponding to the disk read / write command, or the disk number in the disk array; the read / write command is an IO command for a specific disk in the disk array. That is to say, the command parsing unit 10 parses and splits the IO command for the disk array into an IO command for a specific disk in the disk array.

[0078] In the embodiment of the present invention, each command parsing unit 10 is respectively communicatively connected to a command execution module 2, and each command execution module 2 includes a group of command execution units 20. If the number of command parsing units 10 included in the command parsing module 1 is L then the number of command execution modules 2 is also L and the number of command execution units 20 included in each command execution module 2 is M i.e., the first command execution unit - the M command execution unit, then the acceleration device for disk access altogether includes L ×M command execution units 20.

[0079] In an embodiment of the present invention, the command parsing unit 10 is configured to send a read / write command to one of the command execution units 20 in the corresponding command execution module 2. Specifically, according to the status information of each command execution unit 20 in the command execution module 2 corresponding to the command parsing unit 10, the corresponding command execution unit 20 is determined, and then the read / write command is sent to the corresponding command execution module 2.

[0080] In an alternative embodiment, the command parsing unit 10 may include a command parsing cache, which is used to store the received disk read / write commands.

[0081] In an embodiment of the present invention, the command execution unit 20 is communicatively connected to the queue management module 3. The command execution unit 20 is configured to write the submission queue information corresponding to the read / write command into the submission queue (Submission Queue, SQ), and receive the first completion information returned by the submission queue and send it to the queue management module 3. The first completion information is used to indicate that the submission queue information has been written into the submission queue. The submission queue is a data structure for storing tasks or data to be processed soon, that is, the submission queue information. The submission queue information includes information related to the read / write command, the starting address of the submission queue corresponding to the read / write command, and the command identifier (Command Identifier, CID).

[0082] In an embodiment of the present invention, the queue management module 3 is configured to, after receiving the first completion information, send submission queue update information to the disk controller, so that the disk controller obtains the submission queue information from the submission queue and executes the read / write command based on the submission queue information.

[0083] In an alternative embodiment, Figure 2 is a schematic structural diagram of an acceleration device for disk access according to an embodiment of the present invention, as Figure 2As shown in the figure, the device further includes a Completion Queue (CQ). The Completion Queue is set relative to the Submission Queue and is used in conjunction with the Submission Queue. It is a data structure for storing tasks or data that have completed processing, that is, recording the processing results, status, and outputs of tasks, so as to notify that the tasks in the Submission Queue have been completed. The Completion Queue is communicatively connected to the disk controller and the Queue Management Module 3 respectively. Correspondingly, the disk controller is used to execute read and write commands to obtain execution results and write the corresponding Completion Queue information of the execution results into the Completion Queue. Among them, the execution results at least include information related to the read and write commands and the status information of the execution results. The Completion Queue is used to receive and write the Completion Queue information and send the written Completion Queue information to the Queue Management Module 3. The Queue Management Module 3 is further used to, after receiving the Completion Queue information, send the corresponding Completion Queue update information of the Completion Queue information to the disk controller to obtain the second Completion information, and write the execution results into the result cache after obtaining the second Completion information. The second Completion information is used to represent that the Completion Queue update information has been written into the disk controller. Thus, after the disk controller executes read and write commands to obtain execution results, the execution results are written into the result cache through the Completion Queue and the Queue Management Module 3, so as to obtain the execution results of the disk after completing disk access, improving the reliability of disk access.

[0084] In an optional implementation manner, as Figure 2 shown, the Queue Management Module 3 includes multiple queue management units, and the multiple queue management units correspond to multiple disk controllers one by one. If the disk array contains N disks, N each disk corresponds to N a disk controller, then the Queue Management Module 3 contains N queue management units, N each of the N queue management units corresponds to Figure 2 a disk one by one, and is used to manage the read and write commands executed by the disk controller of the corresponding disk, that is, to manage the submission queue information written to the disk controller of the corresponding disk. Taking N as an example, N each of the N disks corresponds to N a disk controller, that is, the first disk controller - the N th disk controller. The Queue Management Module 3 is provided with N queue management units, that is, the first queue management unit - theN Manage the submission queue information of read and write commands of the disk controller. Thus, there is no binding relationship among the command parsing unit 10, the command execution unit 20, and the queue management unit, and they can be highly reused. The number can be arbitrarily increased or decreased according to performance metrics and the number of attached disks, with high scalability.

[0085] In an alternative embodiment, the read and write commands received by the command execution unit 20 include the relevant information of the read and write commands, the number of the queue management unit corresponding to the read and write commands, and the number of read and write commands obtained by splitting the disk read and write commands. According to the number of the queue management unit corresponding to the read and write commands, determine the queue management unit corresponding to the read and write commands, so as to obtain the submission queue resources corresponding to the read and write commands from the corresponding queue management unit, so as to obtain the submission queue information. Specifically, the command execution unit 20 sends a resource application request to the queue management unit corresponding to the read and write commands to obtain the submission queue resources corresponding to the read and write commands, and determines the submission queue information based on the submission queue resources and the read and write commands. Among them, the resource application request at least includes the number of read and write commands obtained by splitting, so that the queue management unit can determine the starting address of the allocated submission queue; the submission queue resources include the starting address of the submission queue and the command identifier. Based on the obtained starting address of the submission queue, the command identifier, the relevant information of the read and write commands, and other information related to creating the submission queue, determine the submission queue information. Other information related to creating the submission queue may include HPRP (Host PRP, host physical (memory) region page), HPRP conversion, etc.

[0086] In an alternative embodiment, the command execution unit 20 includes a command execution cache; the command execution cache is used to save the read and write commands when the submission queue resources are not obtained. In this way, when the command execution unit 20 does not obtain the submission queue resources, the read and write commands are saved, and at the same time, the next read and write command can be processed continuously. On the one hand, it avoids the loss of read and write commands, and on the other hand, it avoids blocking the execution of the next read and write command when the current read and write command cannot apply for the submission queue resources, thereby improving the execution efficiency of the read and write commands.

[0087] In an alternative embodiment, such as Figure 2As shown, the queue management unit can overall manage the submission queue and the completion queue. The queue management unit may include an arbitration subunit and a submission queue management subunit. Among them, the arbitration subunit is used to determine a target application request from multiple received resource application requests; the submission queue management subunit is used to allocate submission queue resources based on the target application request, return the submission queue resources to the command execution unit 20 corresponding to the target application request, and send submission queue update information to the disk controller after receiving the first completion information, so that the disk controller can obtain submission queue information from the submission queue and execute read and write commands based on the submission queue information. Since the queue management unit manages all resource application requests for all read and write commands pointing to its corresponding disk controller and the allocation of submission queue resources, it is necessary to determine a target application request from the multiple received resource application requests through the arbitration subunit, and then the submission queue management subunit allocates submission queue resources to the command execution unit 20 corresponding to the target application request, thereby realizing the arbitration and coordination of multiple resource application requests and ensuring the efficiency of disk access.

[0088] In an alternative embodiment, the arbitration subunit is further configured to determine a target first completion information from the multiple received first completion information, so as to determine the first completion information processed by the submission queue management subunit, and enable the submission queue management subunit to send submission queue update information to the disk controller based on the target first completion information.

[0089] In an alternative embodiment, the submission queue management subunit is used to maintain the address allocation of the submission queue, which includes the head pointer and the tail pointer of the submission queue with a preset depth. The initial values of the head pointer and the tail pointer are both 0, and the head pointer and the tail pointer are maintained based on the NVMe protocol. At the same time, the submission queue management subunit is further used to maintain a preset number of resource IDs, and maintain a cache of the resource ID status corresponding to the preset number of resource IDs. The depth of the cache of the resource ID status is the same as the number of resource IDs, that is, the preset number; among them, the resource ID status at least includes a command identifier, the number of completion queue information fed back by the command identifier, and the initial value of the number of completion queue information is 0. When the submission queue management subunit allocates submission queue resources, it also allocates resource IDs at the same time.

[0090] In an alternative embodiment, such as Figure 2As shown in the figure, the queue management unit may further include a completion queue management subunit and a result output subunit. Among them, the completion queue subunit is used to determine the completion queue update information corresponding to the completion queue information based on the completion queue information, and send the completion queue update information to the disk controller; the result output subunit is used to write the execution result into the result cache after obtaining the second completion information.

[0091] In an alternative embodiment, the completion queue management subunit includes a completion queue cache, which is used to store the completion queue information dispatched by the completion queue. After receiving the completion queue information sent by the completion queue, the completion queue subunit parses the completion queue information, determines the completion queue update information corresponding to the completion queue information, and sends the completion queue update information to the disk controller. The completion queue management subunit is also used to maintain the tail pointer of the completion queue. The initial value of the tail pointer is 0, and the tail pointer is maintained based on the NVMe protocol.

[0092] In an alternative embodiment, when the queue management unit receives a completion queue information, the submission queue management subunit in the queue management unit will update the allocated submission queue resources based on the completion queue information, and recycle the allocated submission queue resources when the number of received completion queue information is the same as the number of read / write commands. Specifically, the submission queue management subunit updates the submission queue resources allocated to the read / write commands corresponding to the completion queue information by updating the number of completion queue information fed back by the command identifier corresponding to the read / write command, increasing the number of completion queue information in the resource ID status by 1 and rewriting it into the cache of the submission queue management subunit. When the number of completion queue information is the same as the number of read / write commands, the submission queue resources are recycled. Thus, after the disk controller executes all the read / write commands corresponding to the disk read / write commands, the submission queue resources of the read / write commands corresponding to the disk read / write commands are recycled, thereby releasing the used submission queue resources and improving the reliability of disk access at the same time.

[0093] In an alternative embodiment, as Figure 2 shown in the figure, the queue management unit may further include a register file, which is used to configure information of the NVMe disk managed by the queue management unit, the start address and range of result output, the start address and range of the submission queue, performance statistics, running status, etc. through software; among them, the information of the NVMe disk includes the start address of the submission queue update information corresponding to the NVMe disk, the start address of the completion queue update information, etc.

[0094] In an alternative embodiment, as Figure 2As shown in the figure, the device further includes a first arbitration module. The first arbitration module is respectively communicatively connected to a plurality of command execution units 20 and a submission queue. The first arbitration module is configured to receive submission queue information sent by the plurality of command execution units 20, determine target submission queue information from the plurality of submission queue information, write the target submission queue information into the submission queue, and send a first completion message to the command execution unit 20 corresponding to the target submission queue information after writing the target submission queue information into the submission queue. The first arbitration module arbitrates and coordinates the plurality of submission queue information to ensure the efficiency of disk access.

[0095] In an alternative embodiment, as Figure 2 shown in the figure, the device further includes a second arbitration module. The second arbitration module is respectively communicatively connected to a plurality of queue management units, a disk controller, and a result cache; the second arbitration module is configured to receive submission queue update information sent by the plurality of queue management units, determine target submission queue update information from the plurality of submission queue update information, and send the target submission queue update information to the disk controller; the second arbitration module is further configured to receive completion queue update information sent by the plurality of queue management units, determine target completion queue update information from the plurality of completion queue update information, and send the target completion queue update information to the disk controller; the second arbitration module is further configured to receive execution results sent by the plurality of queue management units, determine target execution results from the plurality of execution results, and send the target execution results to the result cache. The second arbitration module arbitrates and coordinates the plurality of submission queue update information, completion queue update information, and execution results to ensure the efficiency of disk access.

[0096] In an alternative embodiment, caches are respectively provided in the first arbitration module and the second arbitration module, and after arbitrating and authorizing the received information, the authorized submission queue update information, completion queue update information, submission queue information, or execution results are saved.

[0097] In an alternative embodiment, as Figure 2 shown in the figure, the device further includes a command queue. The command queue is respectively communicatively connected to a plurality of command parsing units 10. The command queue is configured to receive disk read / write commands and send the disk read / write commands to one of the command parsing units 10 according to the status information of the plurality of command parsing units 10. In this way, through the command queue, the disk read / write commands are sent to different command parsing units 10 according to the status information of the command parsing units 10, thereby realizing parallel processing of the disk read / write commands.

[0098] In an alternative embodiment, in order to enable the communication between the disk access acceleration device and the outside, an external bus is further included outside the disk access acceleration device, which is specifically divided into bus BUS0, bus BUS1, and bus BUS2. Among them, bus BUS0 is used to receive disk read / write commands issued by external hardware or software, completion queue information fed back by the disk controller, and provide a software access interface; bus BUS1 is used for the disk access acceleration device to access the disk controller and the result cache; bus BUS2 is used for the disk access acceleration device to output submission queue information.

[0099] In an alternative embodiment, the disk access acceleration device can be used as a branch of the hardware device and embedded into the NVMe disk controller, and function expansion can be performed on the basis of the disk access acceleration device, such as expanding the definition of interrupts, exceptions, QoS, Debug&Trace, etc., so as to improve the availability of the disk access acceleration device.

[0100] An acceleration device for disk access provided by an embodiment of the present invention includes a command parsing module 1, a plurality of command execution modules 2, and a queue management module 3. The command parsing module 1 includes a plurality of command parsing units 10, which are used to parse and split the received disk read / write commands respectively to obtain at least one read / write command. Each command parsing unit 10 is communicatively connected to a command execution module 2 respectively, and each command execution module 2 includes a group of command execution units 20. The command parsing unit 10 is used to send the read / write command to one of the command execution units 20 in the corresponding command execution module 2. The command execution unit 20 is communicatively connected to the queue management module 3. The command execution unit 20 is used to write the submission queue information corresponding to the read / write command into the submission queue, and receive the first completion information returned by the submission queue and send it to the queue management module 3. The first completion information is used to indicate that the submission queue information has been written into the submission queue. The queue management module 3 is used to send submission queue update information to the disk controller after receiving the first completion information, so that the disk controller can obtain the submission queue information from the submission queue and execute the read / write command based on the submission queue information. In this way, by using the command parsing units 10 in the command parsing module 1 to process the received disk read / write commands respectively, parallel processing of the disk read / write commands is realized. At the same time, each command parsing unit 10 is communicatively connected to a command execution module 2 respectively, and each command execution module 2 includes a group of command execution units 20. The command parsing unit 10 can send the read / write command obtained by processing the disk read / write command to one of the command execution units 20. The command parsing unit 10 can process multiple disk read / write commands and send them to different command execution units 20 for processing respectively, thus realizing parallel processing of the read / write commands. Therefore, through the setting of the command parsing module 1 and the command execution module 2, parallel processing of the disk read / write commands is realized at the hardware level, the efficiency of disk access is improved, and at the same time, the dependence on the platform and the processor core is low.

[0101] On the other hand, according to an embodiment of the present invention, Figure 3 is a schematic flowchart of a specific embodiment of an acceleration method for disk access according to an embodiment of the present invention. As Figure 3 shown, an embodiment of an acceleration method for disk access is provided. The following will make specific descriptions in combination with Figure 3 related embodiments. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0102] In this embodiment, an acceleration method for disk access is provided, which can be used for the above-mentioned acceleration device for disk access. Figure 4is a flowchart of an acceleration method for disk access according to an embodiment of the present invention, as Figure 3 and Figure 4 shown. The process includes the following steps:

[0103] Step S401, the command parsing module obtains a disk read / write command, parses and splits the disk read / write command to obtain at least one read / write instruction.

[0104] In an embodiment of the present invention, multiple command parsing units 10 in the command parsing module 1 respectively receive the disk read / write command sent by the command queue, and parse the disk read / write command based on the RAID Controller or software to obtain at least one read / write command. Among them, the disk read / write command is an IO command for the NVMe disk, and the disk read / write command includes at least the relevant information for creating a submission queue command and the number of the queue management unit corresponding to the disk read / write command; the read / write command is a disk IO command for a specific disk in the disk array, and the read / write command contains the relevant information of the read / write command, the number of the queue management unit corresponding to the read / write command, and the number of read / write commands obtained by splitting the disk read / write command.

[0105] In an alternative embodiment, after receiving the disk read / write command, the command queue sends the disk read / write command to one of the command parsing units 10 according to the status information of the multiple command parsing units 10. Among them, the status of the command parsing unit 10 at least includes the empty / full status of the cache and the size of the available cache resources.

[0106] Step S402, the command parsing module determines a target execution unit based on the status information of each command parsing unit in the command parsing module corresponding to the command parsing module, and sends the read / write command to the target execution unit.

[0107] In an embodiment of the present invention, each command parsing unit 10 in the command parsing module 1 determines a target execution unit according to the status information of each command execution unit 20 in the corresponding command execution module 2, and sends the read / write command to the target execution unit. Among them, the status information of the command execution unit 20 at least includes the empty / full status of the command execution cache and the size of the available cache resources.

[0108] Step S403, the target execution unit determines the submission queue information corresponding to the read / write command and writes the submission queue information into the submission queue.

[0109] In an embodiment of the present invention, the target execution unit sends a resource application request to the queue management module 3 to obtain submission queue resources from the queue management module 3, thereby obtaining the submission queue information corresponding to the read / write command, and writing the submission queue information into the submission queue.

[0110] In an alternative embodiment, the target execution unit applies for arbitration authorization from the first arbitration module. After the first arbitration module authorizes the arbitration of the submission queue information sent by the target execution unit, the submission queue information is written into the submission queue.

[0111] Step S404, the target execution unit obtains the first completion information returned by the submission queue and sends the first completion information to the queue management module.

[0112] In the embodiment of the present invention, after the first arbitration module authorizes the arbitration of the submission queue information of the target execution unit and writes the submission queue information into the submission queue, the first completion information is returned to the target execution unit and the first completion information is sent to the queue management module 3 to instruct the queue management module 3 to issue submission queue update information.

[0113] Step S405, the queue management module sends submission queue update information to the disk controller in response to the first completion information, so that the disk controller obtains the submission queue information from the submission queue and executes read and write commands based on the submission queue information.

[0114] In the embodiment of the present invention, the queue management module 3 sends submission queue update information to the disk controller in response to the first completion information, so that the disk controller obtains the submission queue information from the submission queue and executes read and write commands based on the submission queue information. Among them, the submission queue update information may be a Doorbell signal corresponding to the submission queue.

[0115] In an alternative embodiment, the queue management module 3 applies for arbitration authorization from the second arbitration module. After the second arbitration module authorizes the arbitration of the submission queue update information sent by the queue management module 3, the submission queue update information is sent to the disk controller.

[0116] In this embodiment, an acceleration method for disk access is provided, which can be used in the above-mentioned acceleration device for disk access. Figure 5 It is a flowchart of another acceleration method for disk access according to the embodiment of the present invention, as Figure 3 and Figure 5 shown, and the process includes the following steps:

[0117] Step S501, the command parsing module obtains the disk read and write command, parses and splits the disk read and write command to obtain at least one read and write instruction. For details, please refer to Figure 4 Step S401 of the embodiment shown, which will not be elaborated here.

[0118] Step S502, the command parsing module determines the target execution unit based on the status information of each command execution unit 20 in the command parsing module corresponding to the command parsing module, and sends the read and write command to the target execution unit. For details, please refer toFigure 4 Step S402 of the illustrated embodiment will not be elaborated herein.

[0119] In step S503, the target execution unit determines the submission queue information corresponding to the read / write command and writes the submission queue information into the submission queue.

[0120] Specifically, step S503 includes:

[0121] In step S5031, the target execution unit sends a resource application request to the queue management unit corresponding to the read / write command.

[0122] In the embodiment of the present invention, the queue management module 3 includes a plurality of queue management units, and the plurality of queue management units correspond to a plurality of disk controllers one by one. The target execution unit sends a resource application request to the queue management unit corresponding to the read / write command. Among them, the resource application request includes at least the number of read / write commands obtained by splitting.

[0123] In step S5032, the queue management unit allocates submission queue resources based on the resource application request and returns the submission queue resources to the target execution unit.

[0124] In the embodiment of the present invention, the queue management unit allocates submission queue resources based on the resource application request and returns the submission queue resources to the target execution unit. Among them, the submission queue resources include the starting address of the submission queue and the command identifier.

[0125] In an optional implementation manner, when the queue management unit allocates submission queue resources, the arbitration subunit in the queue management unit obtains a plurality of resource application requests and determines a target application request from the plurality of resource application requests; the submission queue management subunit in the queue management unit obtains submission queue resources from the preset queue resources based on the target application request and sends the submission queue resources to the target execution unit corresponding to the target application request. Thus, the target application request is determined from the plurality of resource application requests, and the submission queue resources are allocated to the command execution unit 20 corresponding to the target application request, thereby realizing the arbitration and coordination of the plurality of resource application requests.

[0126] In an optional implementation manner, if the target execution unit fails to apply for the submission queue resources, the read / write command is temporarily stored in the command execution cache of the target execution unit, so as to save the read / write command when the command execution unit 20 fails to obtain the submission queue resources, and at the same time, the next read / write command can be processed continuously. On the one hand, the loss of the read / write command is avoided, and on the other hand, the execution of the next read / write command is blocked when the current read / write command fails to apply for the submission queue resources, thereby improving the execution efficiency of the read / write command.

[0127] Step S5033: The target execution unit determines the submission queue information based on the submission queue resources and the read / write commands.

[0128] In the embodiment of the present invention, the target execution unit determines the submission queue information based on the obtained starting address of the submission queue, the command identifier, the relevant information of the read / write commands, and other information related to creating the submission queue. The other information related to creating the submission queue may include information such as HPRP (Host PRP, host physical (memory) region page) and HPRP conversion.

[0129] Step S504: The target execution unit obtains the first completion information returned by the submission queue and sends the first completion information to the queue management module. For details, please refer to Figure 4 Step S404 in the illustrated embodiment, which will not be elaborated here.

[0130] Step S505: In response to the first completion information, the queue management module sends submission queue update information to the disk controller, so that the disk controller obtains the submission queue information from the submission queue and executes the read / write commands based on the submission queue information. For details, please refer to Figure 4 Step S405 in the illustrated embodiment, which will not be elaborated here.

[0131] In this embodiment, an acceleration method for disk access is provided, which can be used in the above-mentioned acceleration device for disk access. Figure 6 It is a flowchart of another acceleration method for disk access according to the embodiment of the present invention. As shown in Figure 3 and Figure 6 shown, this process includes the following steps:

[0132] Step S601: The command parsing module obtains the disk read / write commands, parses and splits the disk read / write commands to obtain at least one read / write instruction. For details, please refer to Figure 4 Step S401 in the illustrated embodiment, which will not be elaborated here.

[0133] Step S602: The command parsing module determines the target execution unit based on the status information of each command parsing unit in the command parsing module corresponding to the command parsing module, and sends the read / write commands to the target execution unit. For details, please refer to Figure 4 Step S402 in the illustrated embodiment, which will not be elaborated here.

[0134] Step S603: The target execution unit determines the submission queue information corresponding to the read / write commands and writes the submission queue information into the submission queue. For details, please refer to Figure 4 Step S403 in the illustrated embodiment, which will not be elaborated here.

[0135] Step S604, the target execution unit obtains the first completion information returned by the submission queue and sends the first completion information to the queue management module. For details, please refer to Figure 4 Step S404 of the embodiment shown, which will not be elaborated here.

[0136] Step S605, in response to the first completion information, the queue management module sends submission queue update information to the disk controller, so that the disk controller obtains submission queue information from the submission queue and executes read / write commands based on the submission queue information. For details, please refer to Figure 4 Step S405 of the embodiment shown, which will not be elaborated here.

[0137] Step S606, the completion queue obtains and writes completion queue information, and sends the written completion queue information to the queue management module.

[0138] In the embodiment of the present invention, the completion queue information is obtained by the disk controller based on the execution result after executing the read / write command. After receiving the extraction queue update information, the disk controller reads the extraction queue information from the extraction queue, parses it, and executes the parsed read / write command, thereby completing the operation of accessing the disk and obtaining the execution result. The execution result at least includes relevant information of the read / write command and status information of the execution result. Then, the execution result is written into the completion queue as the completion queue information. The completion queue obtains and writes the completion queue information, and sends the written completion queue information to the queue management unit corresponding to the disk controller in the queue management module 3.

[0139] Step S607, the queue management module parses the completion queue information to obtain the execution result, and sends completion queue update information to the disk controller to obtain the second completion information returned by the disk controller after receiving the completion queue update information.

[0140] In the embodiment of the present invention, after receiving the completion queue information sent by the completion queue, the completion queue subunit in the queue management unit parses the completion queue information, determines the completion queue update information corresponding to the completion queue information, and sends the completion queue update information to the disk controller. At the same time, the disk controller will return the second completion information after receiving the completion queue update information, and the completion queue subunit obtains the second completion information.

[0141] In an alternative embodiment, the queue management unit applies for arbitration authorization from the second arbitration module. After the second arbitration module arbitrates and authorizes the completion queue update information sent by the queue management unit, the completion queue update information is sent to the disk controller.

[0142] In an alternative embodiment, after obtaining the completion queue and writing the completion queue information, and sending the written completion queue information to the queue management module 3, the queue management module 3 updates the submission queue resources corresponding to the read / write command based on the completion queue information; if the number of received completion queue information is the same as the number of read / write commands, the queue management module 3 releases the submission queue resources to a preset queue resource to recycle the submission queue resources.

[0143] In an alternative embodiment, the submission queue management subunit in the queue management unit maintains a preset number of resource IDs, and maintains a cache of the resource ID status corresponding to the preset number of resource IDs. The depth of the cache of the resource ID status is the same as the number of resource IDs, that is, the preset number. Among them, the resource ID status at least includes a command identifier, the number of completion queue information fed back by the command identifier, and the initial value of the number of completion queue information is 0. When the submission queue management subunit allocates submission queue resources, it also allocates resource IDs at the same time. After the queue management unit receives the completion queue information, the submission queue management subunit updates the submission queue resources allocated to the read / write command corresponding to the completion queue information by updating the number of completion queue information fed back by the command identifier corresponding to the read / write command, increasing the number of completion queue information in the resource ID status by 1 and rewriting it into the cache of the submission queue management subunit. When the number of completion queue information is the same as the number of read / write commands, the submission queue resources are recycled.

[0144] Step S608, the queue management module sends an execution result to the result cache in response to the second completion information.

[0145] In the embodiment of the present invention, the queue management module 3 sends an execution result to the result cache in response to the second completion information. In this way, after the disk controller executes the read / write command to obtain the execution result, the execution result is written into the result cache through the completion queue and the queue management module 3, so that the execution result of the disk can be obtained after the disk access is completed, improving the reliability of the disk access.

[0146] In an alternative embodiment, the queue management unit applies for arbitration authorization from the second arbitration module, and after the second arbitration module arbitrates and authorizes the execution result sent by the queue management unit, the execution result is sent to the result cache.

[0147] The disk access acceleration method provided by the embodiment of the present invention includes: a command parsing module 1 obtains a disk read / write command, parses and splits the disk read / write command to obtain at least one read / write instruction; the command parsing module 1 determines a target execution unit based on the status information of each command execution unit 20 in the command execution module 2 corresponding to the command parsing module 1, and sends the read / write command to the target execution unit; the target execution unit determines the submission queue information corresponding to the read / write command and writes the submission queue information into the submission queue; the target execution unit obtains the first completion information returned by the submission queue and sends the first completion information to the queue management module 3; the queue management module 3 sends submission queue update information to the disk controller in response to the first completion information, so that the disk controller obtains the submission queue information from the submission queue and executes the read / write command based on the submission queue information. In this way, by the command parsing unit 10 in the command parsing module 1, the received disk read / write commands are processed respectively, so as to realize the parallel processing of the disk read / write commands; at the same time, each command parsing unit 10 is respectively communicatively connected to a command execution module 2, and each command execution module 2 includes a group of command execution units 20. The command parsing unit 10 can send the read / write command obtained by processing the disk read / write command to one of the command execution units 20. The command parsing unit 10 can process multiple disk read / write commands and send them to different command execution units 20 for processing respectively, so as to realize the parallel processing of the read / write commands. Thus, through the settings of the command parsing module 1 and the command execution module 2, the parallel processing of the disk read / write commands is realized at the hardware level, the disk access efficiency is improved, and at the same time, the dependence on the platform and the processor core is low.

[0148] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. In addition, the embodiments of the present invention are not directed to any particular programming language.

[0149] In the specification provided herein, a large number of specific details are set forth. It will be understood, however, that embodiments of the present invention may be practiced without these specific details. Similarly, in order to streamline the present invention and assist in understanding one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present invention, the various features of the embodiments of the present invention are sometimes grouped together in a single embodiment, figure, or description thereof.

[0150] Those skilled in the art will appreciate that the modules in the devices in the embodiments can be adaptively changed and disposed in one or more devices different from the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and in addition, they can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and / or processes or units are mutually exclusive.

[0151] The use of the words first, second, third, etc. does not denote any order. These words may be construed as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.

Claims

1. An acceleration device for disk access, characterized in that, The device includes: a command parsing module, multiple command execution modules, and a queue management module; The command parsing module includes multiple command parsing units, and the multiple command parsing units are respectively used for parsing and splitting the received disk read / write commands to obtain at least one read / write command; at least the number of the queue management unit corresponding to the disk read / write command is included in the disk read / write command, and the number of the queue management unit corresponds to the disk number of the disk array; the read / write command is a disk I / O command for a specific disk in the disk array; Each of the command parsing units is respectively communicatively connected to one of the command execution modules, and each of the command execution modules includes a group of command execution units; the command parsing unit is used for determining the corresponding command execution unit according to the status information of each command execution unit in the corresponding command execution module, and sending the read / write command to the corresponding command execution unit; The command execution unit is communicatively connected to the queue management module; the command execution unit is used for writing the submission queue information corresponding to the read / write command into the submission queue, and receiving the first completion information returned by the submission queue and sending it to the queue management module; the first completion information is used to indicate that the submission queue information has been written into the submission queue; The queue management module is used for, after receiving the first completion information, sending submission queue update information to the disk controller, so that the disk controller obtains the submission queue information from the submission queue and executes the read / write command based on the submission queue information; The queue management module includes multiple queue management units, and the multiple queue management units respectively correspond to multiple disk controllers one by one; the read / write command includes the number of the queue management unit corresponding to the read / write command.

2. The device according to claim 1, wherein, The device further includes a completion queue, and the completion queue is respectively communicatively connected to the disk controller and the queue management module; The disk controller is used for executing the read / write command to obtain an execution result, and writing the completion queue information corresponding to the execution result into the completion queue; The completion queue is used for receiving and writing the completion queue information, and sending the written completion queue information to the queue management module; The queue management module is further used for, after receiving the completion queue information, sending the completion queue update information corresponding to the completion queue information to the disk controller to obtain second completion information, and writing the execution result into the result cache after obtaining the second completion information; The second completion information is used to indicate that the completion queue update information has been written into the disk controller.

3. The device according to claim 2, characterized in that, The command execution unit is used for sending a resource application request to the queue management unit corresponding to the read / write command to obtain the submission queue resource corresponding to the read / write command, and determining the submission queue information based on the submission queue resource and the read / write command.

4. The device according to claim 3, wherein The command execution unit includes a command execution cache; the command execution cache is used for saving the read / write command when the submission queue resource has not been obtained.

5. The device according to claim 3, characterized in that The queue management unit includes an arbitration subunit and a submission queue management subunit; The arbitration subunit is configured to determine a target application request from multiple received resource application requests; The submission queue management subunit is configured to allocate the submission queue resources based on the target application request, return the submission queue resources to the command execution unit corresponding to the target application request, and send submission queue update information to the disk controller after receiving the first completion information, so that the disk controller obtains the submission queue information from the submission queue and executes the read / write command based on the submission queue information.

6. The device according to claim 3, characterized in that, The queue management unit includes a completion queue management subunit and a result output subunit; The completion queue subunit is configured to determine completion queue update information corresponding to the completion queue information based on the completion queue information, and send the completion queue update information to the disk controller; The result output subunit is configured to write the execution result into the result cache after obtaining the second completion information.

7. The device according to claim 3, characterized in that, The resource application request includes the number of the read / write commands; the submission queue management subunit is further configured to update the allocated submission queue resources based on the completion queue information, and recycle the allocated submission queue resources when the number of received completion queue information is consistent with the number of the read / write commands.

8. The device according to claim 1, characterized in that The apparatus further includes a first arbitration module; the first arbitration module is communicatively connected to multiple command execution units and the submission queue respectively; The first arbitration module is configured to receive submission queue information sent by multiple command execution units, determine target submission queue information from the multiple submission queue information, write the target submission queue information into the submission queue, and send the first completion information to the command execution unit corresponding to the target submission queue information after writing the target submission queue information into the submission queue.

9. The device according to claim 3, characterized in that, The apparatus further includes a second arbitration module; the second arbitration module is communicatively connected to multiple queue management units, the disk controller, and the result cache respectively; The second arbitration module is configured to receive submission queue update information sent by multiple queue management units, determine target submission queue update information from the multiple submission queue update information, and send the target submission queue update information to the disk controller; The second arbitration module is further configured to receive completion queue update information sent by multiple queue management units, determine target completion queue update information from the multiple completion queue update information, and send the target completion queue update information to the disk controller; The second arbitration module is further configured to receive execution results sent by multiple queue management units, determine target execution results from the multiple execution results, and send the target execution results to the result cache.

10. The device according to claim 1, characterized in that The apparatus further includes a command queue; the command queue is communicatively connected to multiple command parsing units respectively; The command queue is used to receive the disk read / write commands and send the disk read / write commands to one of the command parsing units according to the status information of multiple command parsing units.

11. A method for accelerating disk access, characterized in that, The method includes: The command parsing module obtains the disk read / write commands, parses and splits the disk read / write commands to obtain at least one read / write instruction; the disk read / write commands at least include the number of the queue management unit corresponding to the disk read / write commands, and the number of the queue management unit corresponds to the disk number of the disk array; the read / write commands are disk I / O commands for specific disks in the disk array; The command parsing module determines a target execution unit based on the status information of each command execution unit in the command execution module corresponding to the command parsing module, and sends the read / write commands to the target execution unit; The target execution unit determines the submission queue information corresponding to the read / write commands and writes the submission queue information into the submission queue; The target execution unit obtains the first completion information returned by the submission queue and sends the first completion information to the queue management module; The queue management module, in response to the first completion information, sends submission queue update information to the disk controller, so that the disk controller obtains the submission queue information from the submission queue and executes the read / write commands based on the submission queue information; the queue management module includes multiple queue management units, and multiple queue management units correspond to multiple disk controllers one by one; the read / write commands include the number of the queue management unit corresponding to the read / write commands.

12. The method according to claim 11, wherein The target execution unit determines the submission queue information corresponding to the read / write commands, including: The target execution unit sends a resource application request to the queue management unit corresponding to the read / write commands; the queue management module includes multiple queue management units, and multiple queue management units correspond to multiple disk controllers one by one; The queue management unit allocates submission queue resources based on the resource application request and returns the submission queue resources to the target execution unit; The target execution unit determines the submission queue information based on the submission queue resources and the read / write commands.

13. The method according to claim 12, wherein The method further includes: The queue management unit obtains multiple resource application requests and determines a target application request from the multiple resource application requests; The queue management unit obtains the submission queue resources from the preset queue resources based on the target application request; The queue management unit sends the submission queue resources to the target execution unit corresponding to the target application request.

14. The method according to claim 11, wherein After the queue management module, in response to the first completion information, sends submission queue update information to the disk controller, it further includes: Obtaining and writing the completion queue information into the completion queue, and sending the written completion queue information to the queue management module; the completion queue information is obtained by the disk controller based on the execution result after executing the read / write commands. The queue management module parses the completion queue information to obtain the execution result, and sends completion queue update information to the disk controller to obtain second completion information returned by the disk controller after receiving the completion queue update information; The queue management module sends the execution result to the result cache in response to the second completion information.

15. The method according to claim 14, wherein After the completion queue acquires and writes the completion queue information and sends the written completion queue information to the queue management module, it further includes: The queue management module updates the submission queue resources corresponding to the read / write command based on the completion queue information; If the number of received completion queue information is consistent with the number of read / write commands, the queue management module releases the submission queue resources into a preset queue resource to recycle the submission queue resources.

Citation Information

Patent Citations

  • Dish interface processor and method of processing disk operation command

    CN101046724A