Disk access acceleration device and method
By introducing the parallel processing mechanism of the command parsing module and the queue management module into the NVMe disk acceleration method, the problem of platform and processor core dependency is solved, the disk access efficiency and reliability are improved, and it is suitable for heterogeneous computing environments.
Patent Information
- Application Number
- CN202411018212.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-07-29
AI Technical Summary
Existing NVMe disk acceleration methods are platform- and processor-core dependent and cannot effectively utilize the parallel processing capabilities of multi-core processors, resulting in performance differences and increased development costs.
A disk access acceleration device and method are designed, which realizes parallel processing of disk read and write commands through the combination of command parsing module and queue management module. The command parsing module contains multiple command parsing units, and the queue management module manages the submission queue and completion queue to ensure effective allocation and recycling of resources and reduce dependence on the platform and processor core.
It improves the efficiency and reliability of disk access, reduces the dependence on the platform and processor core, achieves more efficient disk access performance, and is suitable for heterogeneous computing environments.
Smart Images

Figure CN118550476A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of disk access, and in particular to a disk access acceleration device and method. Background Art
[0002] NVMe (Non Volatile Memory Express) SSD (SolidState Disk) controller is the management interface for communication between the host and NVMe disk, which has an important impact on the performance of NVMe disk. Currently, NVMe disk acceleration is usually 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 differences in performance of SPDK on different hardware and operating system platforms, and the inability to effectively utilize the parallel processing capabilities of multi-core processors, SPDK's acceleration of NVMe disks has platform dependence and processor core dependence. Summary of the invention
[0003] In view of this, the present invention provides a disk access acceleration device and method to solve the problem of platform dependence and processor core dependence in the current disk access acceleration method.
[0004] In a first aspect, the present invention provides a disk access acceleration device, the device comprising: A command parsing module, multiple command parsing modules and a queue management module; The command parsing module includes a plurality of command parsing units, and the plurality of command parsing units are used to parse and split the received disk read and write commands respectively to obtain at least one read and write command; Each command parsing unit is respectively connected to a command parsing module for communication, and each command parsing module includes a group of command parsing units; the command parsing unit is used to send the read and write commands to one of the command parsing units in the corresponding command parsing module; The command parsing unit is in communication with the queue management module; the command parsing unit is used to write the submission queue information corresponding to the read and write commands 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 obtains submission queue information from the submission queue and executes the read and write commands based on the submission queue information.
[0005] In this way, the command parsing units in the command parsing module process the received disk read and write commands respectively, thereby realizing parallel processing of disk read and write commands; at the same time, each command parsing unit is respectively connected to a command parsing module for communication, and each command parsing module includes a group of command parsing units. The command parsing unit can send the read and write commands obtained by processing the disk read and write commands to one of the command parsing units. The command parsing unit can process multiple disk read and write commands and send them to different command parsing units for processing respectively, thereby realizing parallel processing of read and write commands. Therefore, through the command parsing module and the setting of the command parsing module, the parallel processing of disk read and write commands is realized from the hardware level, the efficiency of disk access is improved, and the dependence on the platform and processor core is low.
[0006] In an optional implementation, the device further comprises a completion queue, and the completion queue is respectively communicatively connected with the disk controller and the queue management module; The disk controller is used to execute the read and write commands to obtain the execution results, and write the completion queue information corresponding to the execution results into the completion queue; The completion queue is used to receive and write completion queue information, and send the written completion queue information to the queue management module; The queue management module is also used to send the completion queue update information corresponding to the completion queue information to the disk controller after receiving the completion queue information, so as to obtain the second completion information, and write 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.
[0007] In this way, after the disk controller executes the read and write commands and obtains the execution results, the execution results are written into the result cache through the completion queue and the queue management module, so that the execution results of the disk are obtained after the disk access is completed, thereby improving the reliability of the disk access.
[0008] In an optional implementation, the queue management module includes a plurality of queue management units, and the plurality of queue management units correspond one-to-one to the plurality of disk controllers respectively; 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 submission queue resources corresponding to the read / write command, and determine the submission queue information based on the submission queue resources and the read / write command.
[0009] In an optional implementation, the command parsing unit 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 acquired.
[0010] In this way, when the command parsing unit fails to obtain the submission queue resources, the read-write command is saved and the next read-write command can continue to be processed. 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 avoided when the current read-write command cannot apply for the submission queue resources, thereby improving the execution efficiency of the read-write commands.
[0011] In an optional implementation, the queue management unit includes an arbitration subunit and a submission queue management subunit; The arbitration subunit is used to determine a target application request from among a plurality of 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 parsing unit corresponding to the target application request, and 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 read and write commands based on the submission queue information.
[0012] In this way, the target application request is determined by the arbitration subunit, and the submission queue management subunit allocates submission queue resources to the command parsing unit corresponding to the target application request, thereby achieving arbitration and coordination of multiple resource application requests.
[0013] In an optional implementation, the queue management unit includes a completion queue management subunit and a result output subunit; The completion queue subunit is used 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 used to write the execution result into the result cache after acquiring the second completion information.
[0014] In an optional embodiment, the resource application request includes the number of read and write commands; the submission queue management subunit is also used to update the allocated submission queue resources based on the completion queue information, and to recycle the allocated submission queue resources when the number of received completion queue information is consistent with the number of read and write commands.
[0015] In this way, after the disk controller executes all read and write commands corresponding to the disk read and write commands, the submission queue resources of the read and write commands corresponding to the disk read and write commands are recycled, thereby releasing the used submission queue resources.
[0016] In an optional implementation, the device further includes a first arbitration module; the first arbitration module is respectively connected to the plurality of command parsing units and the submission queue for communication; The first arbitration module is used to receive submission queue information sent by multiple command parsing units, determine target submission queue information from the multiple submission queue information, write the target submission queue information into the submission queue, and send a first completion information to the command parsing unit corresponding to the target submission queue information after writing the target submission queue information into the submission queue.
[0017] In an optional implementation, the device further includes a second arbitration module; the second arbitration module is respectively connected to the plurality of queue management units, the disk controller, and the result cache for communication; The second arbitration module is used for receiving submission queue update information sent by multiple queue management units, determining target submission queue update information from the multiple submission queue update information, and sending the target submission queue update information to the disk controller; The second arbitration module is also used to receive the completion queue update information sent by the multiple queue management units, determine the 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 used to receive the execution results sent by the multiple queue management units, determine the target execution result from the multiple execution results, and send the target execution result to the result cache.
[0018] In an optional implementation, the device further includes a command queue; the command queue is respectively connected to the plurality of command parsing units for communication; The command queue is used to receive disk read and write commands, and send the disk read and write commands to one of the command parsing units according to status information of the multiple command parsing units.
[0019] In this way, the disk read and write commands are sent to different command parsing units through the command queue according to the status information of the command parsing unit, thereby realizing parallel processing of the disk read and write commands.
[0020] In a second aspect, the present invention provides a method for accelerating disk access, the method comprising: The command parsing module obtains the disk read and write commands, and parses and splits the disk read and write commands to obtain at least one read and write instruction; 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 and write commands to the target execution unit; The target execution unit determines the submission queue information corresponding to the read and 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 sends submission queue update information to the disk controller in response to the first completion information, so that the disk controller obtains submission queue information from the submission queue and executes the read and write commands based on the submission queue information.
[0021] In this way, the command parsing units in the command parsing module process the received disk read and write commands respectively, thereby realizing parallel processing of disk read and write commands; at the same time, each command parsing unit is respectively connected to a command parsing module for communication, and each command parsing module includes a group of command parsing units. The command parsing unit can send the read and write commands obtained by processing the disk read and write commands to one of the command parsing units. The command parsing unit can process multiple disk read and write commands and send them to different command parsing units for processing respectively, thereby realizing parallel processing of read and write commands. Therefore, through the command parsing module and the setting of the command parsing module, the parallel processing of disk read and write commands is realized from the hardware level, the efficiency of disk access is improved, and the dependence on the platform and processor core is low.
[0022] In an optional implementation, the target execution unit determines submission queue information corresponding to the read / write command, including: The target execution unit sends a resource application request to the queue management unit corresponding to the read and write command; the queue management module includes multiple queue management units, and the multiple queue management units correspond to the 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 submission queue information based on submission queue resources and read and write commands.
[0023] In an optional embodiment, 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 submission queue resources from preset queue resources based on the target application request; The queue management unit sends the submitted queue resources to the target execution unit corresponding to the target application request.
[0024] In this way, a target application request is determined from multiple resource application requests, and a submission queue resource is allocated to a command parsing unit corresponding to the target application request, thereby achieving arbitration and coordination of multiple resource application requests.
[0025] In an optional implementation, after the queue management module sends submission queue update information to the disk controller in response to the first completion information, the process further includes: The completion queue obtains and writes the completion queue information, and sends 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 and write commands; The queue management module parses the completion queue information, obtains 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; The queue management module sends the execution result to the result cache in response to the second completion information.
[0026] In this way, after the disk controller executes the read and write commands and obtains the execution results, the execution results are written into the result cache through the completion queue and the queue management module, so that the execution results of the disk are obtained after the disk access is completed, thereby improving the reliability of the disk access.
[0027] In an optional implementation, after the completion queue acquires and writes the completion queue information and sends the written completion queue information to the queue management module, the method further includes: The queue management module updates the submission queue resources corresponding to the read and write commands based on the completion queue information; If the number of received completion queue information is consistent with the number of read and write commands, the queue management module releases the submission queue resources to the preset queue resources to recycle the submission queue resources.
[0028] In this way, after the disk controller executes all read and write commands corresponding to the disk read and write commands, the submission queue resources of the read and write commands corresponding to the disk read and write commands are recycled, thereby releasing the used submission queue resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0030] Figure 1 is a schematic diagram of the structure of a disk access acceleration device according to an embodiment of the present invention; Figure 2 is a schematic diagram of the structure of a disk access acceleration device according to an embodiment of the present invention; Figure 3 is a flowchart of a specific embodiment of a method for accelerating disk access according to an embodiment of the present invention; Figure 4is a flow chart of a method for accelerating disk access according to an embodiment of the present invention; Figure 5 is a flow chart of another method for accelerating disk access according to an embodiment of the present invention; Figure 6 is a flow chart of another method for accelerating disk access according to an embodiment of the present invention; The following is a further description of the reference numerals: 1- command parsing module; 10- command parsing unit; 2- command execution module; 20- command execution unit; 3- queue management module. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0032] NVMe (Non Volatile Memory Express) SSD (Solid State Disk) controller is the management interface between the host and the NVMe disk, which has an important impact on the performance of the NVMe disk. Currently, NVMe disk acceleration 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 SPDK-based software processing method has significant performance differences on different hardware and operating system platforms, resulting in the platform dependency of SPDK's acceleration of NVMe disks. Platform dependency 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, resulting in a significant increase in development costs and time; on the other hand, SPDK's acceleration of NVMe disks has the problem of processor core dependency. As the performance of NVMe disks continues to improve, the software processing method cannot effectively utilize the parallel processing capabilities of multi-core processors, which leads to a waste of processor core resources. At the same time, with the increase in the number of mounted disks and the increase in concurrent requests, the dependence on processor cores will be further aggravated, thereby affecting the scalability of the system.
[0033] Based on this, an embodiment of the present invention provides, on the one hand, a disk access acceleration device, which includes a command parsing module, multiple command parsing modules and a queue management module; the command parsing module includes multiple command parsing units, and the multiple command parsing units are used to parse and split the received disk read and write commands respectively to obtain at least one read and write command; each command parsing unit is communicated with a command parsing module respectively, and each command parsing module includes a group of command parsing units; the command parsing unit is used to send the read and write commands to one of the command parsing units in the corresponding command parsing module; the command parsing unit and the queue management module are communicated; the command parsing unit is used to write the submission queue information corresponding to the read and write commands 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 obtains the submission queue information from the submission queue and executes the read and write commands based on the submission queue information. On the other hand, a method for accelerating disk access is provided, which includes: a command parsing module obtains disk read and write commands, and parses and splits the disk read and write commands to obtain at least one read and write instruction; 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 and write commands to the target execution unit; the target execution unit determines the submission queue information corresponding to the read and 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 sends the 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 and write commands based on the submission queue information. In this way, the command parsing units in the command parsing module process the received disk read and write commands respectively, thereby realizing parallel processing of disk read and write commands; at the same time, each command parsing unit is respectively connected to a command parsing module for communication, and each command parsing module includes a group of command parsing units. The command parsing unit can send the read and write commands obtained by processing the disk read and write commands to one of the command parsing units. The command parsing unit can process multiple disk read and write commands and send them to different command parsing units for processing respectively, thereby realizing parallel processing of read and write commands. Therefore, through the command parsing module and the setting of the command parsing module, the parallel processing of disk read and write commands is realized from the hardware level, the efficiency of disk access is improved, and the dependence on the platform and processor core is low.
[0034] On the one hand, in this embodiment, a disk access acceleration device is provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0035] This embodiment provides a disk access acceleration device, such as Figure 1 As shown, the device includes: a command parsing module 1, multiple 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 and write commands to obtain read and write commands; the command execution module 2 is used to write the submission queue information corresponding to the read and write commands into the submission queue, so that the disk controller can obtain the submission queue information corresponding to the read and write commands 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. Therefore, the command and data flow to the disk are processed by the command parsing module 1, the command execution module 2 and the queue management module 3, and the acceleration of disk access is realized from the hardware level, which is more versatile than the software solution.
[0036] In an 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 parse and split the received disk read and write commands respectively to obtain at least one read and write command. Among them, the disk read and write commands are IO commands for the NVMe disk, and the disk read and write commands at least include relevant information for creating a submission queue command and the number of the queue management unit corresponding to the disk read and write command, or the disk number in the disk array; the read and write commands are disk IO commands for specific disks in the disk array. In other words, the command parsing unit 10 parses and splits the IO commands for the disk array into IO commands for specific disks in the disk array.
[0037] In the embodiment of the present invention, each command parsing unit 10 is respectively connected to a command execution module 2 for communication, 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 The number of command execution units 20 included in each command execution module 2 is M , i.e. the first command execution unit - M Command execution unit, then the disk access acceleration device contains a total of L ×M A command execution unit 20.
[0038] In an embodiment of the present invention, the command parsing unit 10 is used to send the read and write commands to one of the command execution units 20 in the corresponding command execution module 2. Specifically, the corresponding command execution unit 20 is determined based on the status information of each command execution unit 20 in the command execution module 2 corresponding to the command parsing unit 10, and then the read and write commands are sent to the corresponding command execution module 2.
[0039] In an optional implementation, the command parsing unit 10 may include a command parsing cache, and the command parsing cache is used to store received disk read and write commands.
[0040] In an embodiment of the present invention, the command execution unit 20 is connected to the queue management module 3 in communication, and the command execution unit 20 is used to write the submission queue information corresponding to the read and write commands 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. Among them, the first completion information is used to indicate that the submission queue information has been written into the submission queue. The submission queue is used to store the data structure of the task or data to be processed, that is, the submission queue information, which contains the relevant information of the read and write commands, the starting address of the submission queue corresponding to the read and write commands, and the command identifier (Command Identifier, CID).
[0041] In the embodiment of the present invention, 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 obtains submission queue information from the submission queue and executes read and write commands based on the submission queue information.
[0042] In an optional embodiment, Figure 2 is a schematic diagram of the structure of a disk access acceleration device according to an embodiment of the present invention. Figure 2As shown, the device also includes a completion queue (CQ), which is set relative to the submission queue and used in conjunction with the submission queue to store the data structure of the tasks or data that have been processed, that is, to record the processing results, status and output of the tasks, so as to notify that the tasks in the submission queue have been completed. The completion queue is respectively connected to the disk controller and the queue management module 3. Correspondingly, the disk controller is used to execute the read and write commands to obtain the execution results, and write the completion queue information corresponding to the execution results into the completion queue; wherein the execution results at least include the relevant information of 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 also used to send the completion queue update information corresponding to the completion queue information to the disk controller after receiving the completion queue information, so as to obtain the second completion information, and write 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. Therefore, after the disk controller executes the read / write command and obtains the execution result, the execution result is written into the result cache through the completion queue and queue management module 3, so that the execution result of the disk is obtained after the disk access is completed, thereby improving the reliability of the disk access.
[0043] In an optional embodiment, if Figure 2 As 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. N disks, N The disks correspond to N disk controller, the queue management module 3 includes N Queue management unit, N The queue management units are respectively N Each disk has a one-to-one correspondence, 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. Figure 2 For example, N The disks correspond to N Disk controller, i.e. first disk controller - N The disk controller and queue management module 3 are provided with N A queue management unit, namely the first queue management unit - N The queue management unit manages the submission queue information of the read and write commands directed to the first disk controller, the second queue management unit manages the submission queue information of the read and write commands directed to the second disk controller, and so on. N The queue management unit points to theN The read and write commands of the disk controller are managed by the submission queue information. Therefore, the command parsing unit 10, the command execution unit 20 and the queue management unit are not bound to each other, and are highly reused. The number can be increased or decreased at will according to the performance index and the number of hanging disks index, and the scalability is high.
[0044] In an optional implementation, the read-write command received by the command execution unit 20 includes 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. According to the number of the queue management unit corresponding to the read-write command, the queue management unit corresponding to the read-write command is determined, so as to obtain the submission queue resource corresponding to the read-write command from the corresponding queue management unit 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-write command to obtain the submission queue resource corresponding to the read-write command, and determines the submission queue information based on the submission queue resource and the read-write command. Among them, the resource application request at least includes the number of read-write commands obtained by splitting, so that the queue management unit can determine the assigned submission queue starting address; the submission queue resource includes the submission queue starting address and the command identifier, based on the submission queue starting address and the command identifier obtained by the application, the relevant information of the read-write command, and other information related to the creation of the submission queue, the submission queue information is determined, and other information related to the creation of the submission queue may include HPRP (Host PRP, host physical (memory) area page), HPRP conversion and other information.
[0045] In an optional implementation, 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 the next read and write command can be processed at the same time, which avoids the loss of the read and write commands on the one hand, and avoids the blocking of the execution of the next read and write command when the current read and write command cannot apply for the submission queue resources on the other hand, thereby improving the execution efficiency of the read and write commands.
[0046] In an optional embodiment, if Figure 2As shown, the queue management unit can manage the submission queue and the completion queue in a coordinated manner. The queue management unit may include an arbitration subunit and a submission queue management subunit. Among them, the arbitration subunit is used to determine the target application request from the multiple resource application requests received; the submission queue management subunit is used to allocate submission queue resources based on the target application request, and return the submission queue resources to the command execution unit 20 corresponding to the target application request, and 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 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 the target application request from the multiple resource application requests received through the arbitration subunit, and then the submission queue management subunit allocates the submission queue resources to the command execution unit 20 corresponding to the target application request, thereby realizing arbitration and coordination of multiple resource application requests and ensuring the efficiency of disk access.
[0047] In an optional embodiment, the arbitration sub-unit is also used to determine the target first completion information from the multiple first completion information received, thereby determining the first completion information processed by the submission queue management sub-unit, so that the submission queue management sub-unit sends the submission queue update information to the disk controller based on the target first completion information.
[0048] In an optional embodiment, the submission queue management subunit is used to maintain the address allocation of the submission queue, which includes the head pointer and tail pointer of the submission queue of a preset depth, the initial values of the head pointer and tail pointer are both 0, and the head pointer and tail pointer are maintained based on the NVMe protocol. At the same time, the submission queue management subunit is also used to maintain a preset number of resource IDs, and maintain a cache of resource ID states corresponding to the preset number of resource IDs, the depth of the cache of the resource ID state is consistent with the number of resource IDs, that is, the preset number; wherein the resource ID state includes at least a command identifier and 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 allocating submission queue resources, the submission queue management subunit will also allocate resource IDs at the same time.
[0049] In an optional embodiment, if Figure 2As shown, the queue management unit may also include a completion queue management subunit and a result output subunit. 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.
[0050] In an optional implementation, the completion queue management subunit includes a completion queue cache, and the completion queue cache 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.
[0051] In an optional implementation, 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 consistent with the number of read-write commands. Specifically, the submission queue management subunit will update 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 state by 1 and rewriting it into the cache of the submission queue management subunit, and reclaiming the submission queue resources when the number of completion queue information is consistent with the number of read-write commands. 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.
[0052] In an optional embodiment, if Figure 2 As shown, the queue management unit may further include a register file, which is used to configure the information of the NVMe disk managed by the queue management unit through software, the starting address and range of the result output, the starting address and range of the submission queue, performance statistics and operating status, etc.; wherein, the information of the NVMe disk includes the starting address of the submission queue update information corresponding to the NVMe disk and the starting address of the completion queue update information, etc.
[0053] In an optional embodiment, if Figure 2As shown, the device also includes a first arbitration module. The first arbitration module is respectively connected to the plurality of command execution units 20 and the submission queue. The first arbitration module is used 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.
[0054] In an optional embodiment, if Figure 2 As shown, the device also includes a second arbitration module. The second arbitration module is respectively connected to multiple queue management units, a disk controller and a result cache; the second arbitration module is used to receive submission queue update information sent by multiple queue management units, and determine target submission queue update information from multiple submission queue update information, and send the target submission queue update information to the disk controller; the second arbitration module is also used to receive completion queue update information sent by multiple queue management units, and determine target completion queue update information from multiple completion queue update information, and send the target completion queue update information to the disk controller; the second arbitration module is also used to receive execution results sent by multiple queue management units, and determine target execution results from multiple execution results, and send the target execution results to the result cache. The second arbitration module arbitrates and coordinates multiple submission queue update information, completion queue update information and execution results to ensure the efficiency of disk access.
[0055] In an optional implementation, a cache is provided in the first arbitration module and the second arbitration module respectively, and after the received information is arbitrated and authorized, the authorized submission queue update information, completion queue update information, submission queue information or execution result is saved.
[0056] In an optional embodiment, if Figure 2 As shown, the device further includes a command queue, which is respectively connected to the plurality of command parsing units 10. The command queue is used to receive a disk read / write command, and send the disk read / write command to one of the command parsing units 10 according to the status information of the plurality of command parsing units 10. In this way, the disk read / write command is sent to different command parsing units 10 according to the status information of the command parsing unit 10 through the command queue, thereby realizing parallel processing of the disk read / write command.
[0057] In an optional implementation, in order to realize the communication between the disk access acceleration device and the outside, the disk access acceleration device also includes an external bus, which is specifically divided into bus BUS0, bus BUS1 and bus BUS2. Among them, bus BUS0 is used to receive disk read and 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 result cache; bus BUS2 is used for the disk access acceleration device to output submission queue information.
[0058] In an optional implementation, the disk access acceleration device can be embedded in the NVMe disk controller as a branch of the hardware device, and the functions of the disk access acceleration device can be expanded, such as extending the definition of interrupts, exceptions, QoS, Debug & Trace and other functions, thereby improving the availability of the disk access acceleration device.
[0059] The disk access acceleration device provided by the embodiment of the present invention includes a command parsing module 1, multiple command execution modules 2 and a queue management module 3; the command parsing module 1 includes multiple command parsing units 10, and the multiple command parsing units 10 are used to parse and split the received disk read and write commands respectively to obtain at least one read and write command; each command parsing unit 10 is respectively communicated with a command execution module 2, 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 and write command to one of the command execution units 20 in the corresponding command execution module 2; the command execution unit 20 is communicated with the queue management module 3; the command execution unit 20 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 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 obtains the submission queue information from the submission queue and executes the read and write command based on the submission queue information. In this way, the command parsing units 10 in the command parsing module 1 process the received disk read and write commands respectively, thereby realizing parallel processing of disk read and write commands; at the same time, each command parsing unit 10 is respectively connected to a command execution module 2 for communication, and each command execution module 2 includes a group of command execution units 20. The command parsing unit 10 can send the read and write commands obtained by processing the disk read and write commands to one of the command execution units 20. The command parsing unit 10 can process multiple disk read and write commands and send them to different command execution units 20 for processing respectively, thereby realizing parallel processing of read and write commands. Therefore, through the setting of the command parsing module 1 and the command execution module 2, the parallel processing of disk read and write commands is realized from the hardware level, the efficiency of disk access is improved, and the dependence on the platform and processor core is low.
[0060] On the other hand, according to an embodiment of the present invention, Figure 3 FIG. 1 is a flow chart of a specific embodiment of a method for accelerating disk access according to an embodiment of the present invention. Figure 3 As shown, an embodiment of a method for accelerating disk access is provided, and the following is combined with Figure 3 It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0061] In this embodiment, a disk access acceleration method is provided, which can be used for the above-mentioned disk access acceleration device. Figure 4is a flow chart of a method for accelerating disk access according to an embodiment of the present invention. Figure 3 and Figure 4 As shown, the process includes the following steps: Step S401: The command parsing module obtains a disk read / write command, and parses and splits the disk read / write command to obtain at least one read / write instruction.
[0062] In an embodiment of the present invention, the multiple command parsing units 10 in the command parsing module 1 respectively receive the disk read and write commands sent by the command queue, and parse the disk read and write commands based on the RAID Controller or software to obtain at least one read and write command. The disk read and write commands are IO commands for NVMe disks, and the disk read and write commands at least include relevant information for creating a submission queue command and the number of the queue management unit corresponding to the disk read and write command; the read and write commands are disk IO commands for specific disks in the disk array, and the read and write commands include 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.
[0063] In an optional implementation, 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. The status of the command parsing unit 10 includes at least the empty / full status of the cache and the size of the available cache resources.
[0064] Step S402: 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 and write commands to the target execution unit.
[0065] In the embodiment of the present invention, each command parsing unit 10 in the command parsing module 1 determines the 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 and write commands to the target execution unit. The status information of the command execution unit 20 at least includes the empty and full status of the command execution cache and the size of the available cache resources.
[0066] Step S403: The target execution unit determines submission queue information corresponding to the read / write command, and writes the submission queue information into the submission queue.
[0067] In the 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 submission queue information corresponding to the read and write commands, and writing the submission queue information into the submission queue.
[0068] In an optional implementation, the target execution unit applies for arbitration authorization to the first arbitration module, and after the first arbitration module performs arbitration authorization on the submission queue information sent by the target execution unit, the submission queue information is written into the submission queue.
[0069] 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.
[0070] In an embodiment of the present invention, after the first arbitration module arbitrates and authorizes the submission queue information of the target execution unit and writes the submission queue information into the submission queue, it returns the first completion information to the target execution unit and sends the first completion information to the queue management module 3 to instruct the queue management module 3 to issue the submission queue update information.
[0071] Step S405 : 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 the read and write commands based on the submission queue information.
[0072] 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 the read and write commands based on the submission queue information. The submission queue update information may be a doorbell signal corresponding to the submission queue.
[0073] In an optional implementation, the queue management module 3 applies for arbitration authorization from the second arbitration module, and after the second arbitration module performs arbitration authorization on the submission queue update information sent by the queue management module 3, the submission queue update information is sent to the disk controller.
[0074] In this embodiment, a disk access acceleration method is provided, which can be used for the above-mentioned disk access acceleration device. Figure 5 FIG. 4 is a flow chart of another method for accelerating disk access according to an embodiment of the present invention. Figure 3 and Figure 5 As shown, the process includes the following steps: Step S501: The command parsing module obtains a disk read / write command, and parses and splits the disk read / write command to obtain at least one read / write instruction. Figure 4 Step S401 of the illustrated embodiment will not be described in detail here.
[0075] 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 commands to the target execution unit. Figure 4Step S402 of the illustrated embodiment will not be described in detail here.
[0076] Step S503: The target execution unit determines submission queue information corresponding to the read / write command, and writes the submission queue information into the submission queue.
[0077] Specifically, step S503 includes: Step S5031: The target execution unit sends a resource application request to the queue management unit corresponding to the read / write command.
[0078] In the embodiment of the present invention, the queue management module 3 includes multiple queue management units, and the multiple queue management units correspond to multiple disk controllers one by one. The target execution unit sends a resource application request to the queue management corresponding to the read and write commands, wherein the resource application request at least includes the number of read and write commands obtained by splitting.
[0079] 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.
[0080] 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, wherein the submission queue resources include the submission queue start address and the command identifier.
[0081] In an optional implementation, when the queue management unit allocates submission queue resources, the arbitration subunit in the queue management unit obtains multiple resource application requests and determines a target application request from the multiple resource application requests; the submission queue management subunit in the queue management unit obtains submission queue resources from 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 multiple resource application requests, and the submission queue resources are allocated to the command execution unit 20 corresponding to the target application request, thereby realizing arbitration and coordination of multiple resource application requests.
[0082] In an optional embodiment, if the target execution unit fails to apply for submission queue resources, the read-write commands are temporarily stored in the command execution cache of the target execution unit, thereby saving the read-write commands when the command execution unit 20 fails to obtain submission queue resources, and at the same time, the next read-write command can continue to be processed. On the one hand, the loss of read-write commands is avoided, and on the other hand, the execution of the next read-write command is avoided when the current read-write command cannot apply for submission queue resources, thereby improving the execution efficiency of the read-write commands.
[0083] Step S5033: The target execution unit determines submission queue information based on the submission queue resources and the read and write commands.
[0084] In an embodiment of the present invention, the target execution unit determines submission queue information based on the submission queue starting address and command identifier obtained in the application, relevant information of the read and write commands, and other information related to the creation of the submission queue. The other information related to the creation of the submission queue may include HPRP (Host PRP, host physical (memory) area page), HPRP conversion and other information.
[0085] 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. Figure 4 Step S404 of the illustrated embodiment will not be described in detail here.
[0086] 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 submission queue information from the submission queue and executes the read and write commands based on the submission queue information. Figure 4 Step S405 of the illustrated embodiment will not be described in detail here.
[0087] In this embodiment, a disk access acceleration method is provided, which can be used for the above-mentioned disk access acceleration device. Figure 6 is a flow chart of another method for accelerating disk access according to an embodiment of the present invention, such as Figure 3 and Figure 6 As shown, the process includes the following steps: Step S601: The command parsing module obtains a disk read / write command, and parses and splits the disk read / write command to obtain at least one read / write instruction. Figure 4 Step S401 of the illustrated embodiment will not be described in detail here.
[0088] 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 and write commands to the target execution unit. Figure 4 Step S402 of the illustrated embodiment will not be described in detail here.
[0089] Step S603: 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. Figure 4 Step S403 of the illustrated embodiment will not be described in detail here.
[0090] 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. Figure 4 Step S404 of the illustrated embodiment will not be described in detail here.
[0091] 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 the read and write commands based on the submission queue information. Figure 4 Step S405 of the illustrated embodiment will not be described in detail here.
[0092] Step S606, the completion queue obtains and writes the completion queue information, and sends the written completion queue information to the queue management module.
[0093] In an embodiment of the present invention, the completion queue information is obtained by the disk controller based on the execution result after executing the read and write commands. After receiving the extraction queue update information, the disk controller reads the extraction queue information from the extraction queue, parses it, executes the parsed read and write commands, thereby completing the operation of accessing the disk and obtaining the execution result, wherein the execution result at least includes the relevant information of the read and write commands and the status information of the execution result, and then writes the execution result 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.
[0094] Step S607: the queue management module parses the completion queue information to obtain an 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.
[0095] 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 returns the second completion information after receiving the completion queue update information, and the completion queue subunit obtains the second completion information.
[0096] In an optional implementation, the queue management unit applies for arbitration authorization to the second arbitration module, and after the second arbitration module performs arbitration authorization on the completion queue update information sent by the queue management unit, the completion queue update information is sent to the disk controller.
[0097] In an optional embodiment, after the completion queue obtains and writes the completion queue information and sends 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 and write commands based on the completion queue information; if the number of completion queue information received is consistent with the number of read and write commands, the queue management module 3 releases the submission queue resources to the preset queue resources to recycle the submission queue resources.
[0098] In an optional implementation, the submission queue management subunit in the queue management unit maintains a preset number of resource IDs, and maintains a cache of resource ID states corresponding to the preset number of resource IDs, and the depth of the cache of the resource ID states is consistent with the number of resource IDs, that is, the preset number. Among them, the resource ID state includes at least 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 allocating submission queue resources, the submission queue management subunit will also allocate resource IDs at the same time. After the queue management unit receives the completion queue information, the submission queue management subunit will update the submission queue resources allocated to the read and 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 and write commands, increasing the number of completion queue information in the resource ID state by 1 and rewriting it into the cache of the submission queue management subunit, and when the number of completion queue information is consistent with the number of read and write commands, the submission queue resources are recycled.
[0099] Step S608: The queue management module sends the execution result to the result cache in response to the second completion information.
[0100] In the embodiment of the present invention, the queue management module 3 sends the execution result to the result cache in response to the second completion information. In this way, after the disk controller executes the read and write commands 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 is obtained after the disk access is completed, thereby improving the reliability of the disk access.
[0101] In an optional implementation, the queue management unit applies for arbitration authorization to the second arbitration module, and after the second arbitration module performs arbitration authorization on the execution result issued by the queue management unit, the execution result is sent to the result cache.
[0102] The method for accelerating disk access provided by an embodiment of the present invention includes: a command parsing module 1 obtains a 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 1 determines a target execution unit based on status information of each command execution unit 20 in a 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 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, the command parsing units 10 in the command parsing module 1 process the received disk read and write commands respectively, thereby realizing parallel processing of disk read and write commands; at the same time, each command parsing unit 10 is respectively connected to a command execution module 2 for communication, and each command execution module 2 includes a group of command execution units 20. The command parsing unit 10 can send the read and write commands obtained by processing the disk read and write commands to one of the command execution units 20. The command parsing unit 10 can process multiple disk read and write commands and send them to different command execution units 20 for processing respectively, thereby realizing parallel processing of read and write commands. Therefore, through the setting of the command parsing module 1 and the command execution module 2, the parallel processing of disk read and write commands is realized from the hardware level, the efficiency of disk access is improved, and the dependence on the platform and processor core is low.
[0103] 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.
[0104] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. Similarly, in order to simplify the present invention and help understand one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, the various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof.
[0105] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and further may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive.
[0106] The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limiting the order of execution.
Claims
1. A disk access acceleration device, characterized in that: The device comprises: a command parsing module, a plurality of command execution modules and a queue management module; The command parsing module includes a plurality of command parsing units, and the plurality of command parsing units are used to parse and split the received disk read and write commands respectively to obtain at least one read and write command; Each of the command parsing units is respectively connected to a command execution module in communication, and each of the command execution modules includes a group of command execution units; the command parsing unit is used to send the read and write command to one of the command execution units in the corresponding command execution module; The command execution unit is in communication with the queue management module; the command execution 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 obtains the submission queue information from the submission queue and executes the read and write commands based on the submission queue information.
2. The device according to claim 1, characterized in that The device further comprises a completion queue, wherein the completion queue is respectively communicatively connected with the disk controller and the queue management module; The disk controller is used to execute the read and write commands to obtain execution results, and write completion queue information corresponding to the execution results into the completion queue; 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; The queue management module is further used to send completion queue update information corresponding to the completion queue information to the disk controller after receiving the completion queue information, so as to obtain second completion information, and write 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 queue management module includes a plurality of queue management units, and the plurality of queue management units correspond one-to-one to the plurality of disk controllers respectively; The command execution unit is used to send a resource application request to the queue management unit corresponding to the read / write command to obtain the submission queue resources corresponding to the read / write command, and determine the submission queue information based on the submission queue resources and the read / write command.
4. The device according to claim 3, characterized in that The command execution unit 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 acquired.
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 used to determine a target application request from among the received multiple resource application requests; The submission queue management subunit is used 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 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 and write commands 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 used 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 used to write the execution result into the result cache after acquiring the second completion information.
7. The device according to claim 3, characterized in that The resource application request includes the number of the read and write commands; the submission queue management subunit is also used to update the allocated submission queue resources based on the completion queue information, and to recycle the allocated submission queue resources when the number of the received completion queue information is consistent with the number of the read and write commands.
8. The device according to claim 1, characterized in that The device further comprises a first arbitration module; the first arbitration module is respectively connected to the plurality of command execution units and the submission queue for communication; The first arbitration module is used 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 device further comprises a second arbitration module; the second arbitration module is respectively connected to the plurality of queue management units, the disk controller and the result cache for communication; The second arbitration module is used 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 also used 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 the plurality of queue management units, determine a target execution result from the plurality of execution results, and send the target execution result to the result cache.
10. The device according to claim 1, characterized in that The device further comprises a command queue; the command queue is respectively connected to the plurality of command parsing units for communication; The command queue is used to receive the disk read / write command, and send the disk read / write command to one of the command parsing units according to the status information of the plurality of command parsing units.
11. A method for accelerating disk access, characterized in that: The method comprises: The command parsing module obtains the disk read and write command, and parses and splits the disk read and write command to obtain at least one read and write instruction; The command parsing module determines the 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 and write commands to the target execution unit; The target execution unit determines 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 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 and write commands based on the submission queue information.
12. The method according to claim 11, characterized in that The target execution unit determines submission queue information corresponding to the read / write command, including: 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 a plurality of queue management units, and the plurality of queue management units correspond to the plurality of disk controllers one by one respectively; 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 and write commands.
13. The method according to claim 12, characterized in that The method further comprises: 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 queue management unit acquires the submission queue resource from a preset queue resource based on the target application request; The queue management unit sends the submission queue resource to the target execution unit corresponding to the target application request.
14. The method according to claim 11, characterized in that After the queue management module sends submission queue update information to the disk controller in response to the first completion information, the queue management module further includes: The completion queue acquires and writes the completion queue information, and sends 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 and 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, characterized in that After the completion queue acquires and writes the completion queue information, and sends the written completion queue information to the queue management module, it also includes: The queue management module updates the submission queue resources corresponding to the read and write commands based on the completion queue information; If the number of the received completion queue information is consistent with the number of the read and write commands, the queue management module releases the submission queue resources to the preset queue resources to recycle the submission queue resources.
Citation Information
Patent Citations
Dish interface processor and method of processing disk operation command
CN101046724A
NVME command processing device and method, equipment and medium
CN117687692A
Service inspection tool based on self-developed openstack platform
CN117851163A
Task management method and device, equipment and storage medium
CN118051184A
Magnetic disk control system
JP1988188866A
