Data migration method and device based on DPU, electronic equipment and storage medium
By setting independent request and completion queues in the DPU card, bidirectional data movement between the host side and the on-chip system side is realized, which solves the problem of low efficiency of one-way movement in the existing technology and improves the efficiency of data movement processing and parallel execution. ability.
Patent Information
- Application Number
- CN202410775957.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2024-10-18
AI Technical Summary
In the existing technology, data migration processing between the host side and the on-chip system side can only realize one-way migration, which seriously restricts the efficiency of data migration processing.
Adopting a DPU-based data movement solution, by setting up multiple data movement channels in the DPU card, each channel contains an independent request queue and completion queue, allowing bidirectional data movement operations between the host side and the on-chip system side, and also supports Scatter -Gather DMA and direct DMA operation instructions to achieve parallel execution.
It improves the efficiency of data movement processing, expands the application scenarios of DMA operations, reduces the resource overhead of processor interrupt processing, significantly reduces processing delays, and makes full use of the bandwidth of external interfaces.
Smart Images

Figure CN118796738A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of data transmission, and in particular to a DPU-based data migration method, device, electronic device and storage medium. Background Art
[0002] Direct Memory Access (DMA) is a memory access technology in computer science that allows data to be sent directly from an attached device (such as a disk drive) to the host memory without the intervention of the central processing unit (CPU). Therefore, DMA is a fast data transfer method under the same processor load. In addition, DMA allows data to be moved between hardware devices with different read and write speeds without relying on a large number of interrupt loads on the central processor.
[0003] In the related art, when executing data movement processing between the host side (HOST side) and the system on chip side (SoC side), only one-way data movement can be achieved within the same period of time, that is, data is moved from the host side to the system on chip side (HOST toSoC) or from the system on chip side to the host side (SoC toHOST), which seriously restricts the data movement processing efficiency between the host side and the system on chip side. Summary of the invention
[0004] In view of this, an embodiment of the present disclosure provides a DPU-based data migration solution, which allows bidirectional data migration between a host side and a system-on-chip side to be performed simultaneously, thereby improving data migration processing efficiency.
[0005] According to a first aspect of an embodiment of the present disclosure, a DPU-based data migration method is provided, which is applied to a DPU card including multiple data migration channels, wherein the multiple data migration channels couple a host end and an on-chip system end, each data migration channel includes at least one queue group, and each queue group consists of a request queue and a completion queue. The method includes: in response to a data migration request from a request initiator, in a request queue of a first queue group of the multiple queue groups, creating a migration request entry of the data migration request, wherein the request initiator is any one of the host end and the on-chip system end; in response to a reading result of the migration request entry, performing a data migration operation of the data migration request through a first migration channel corresponding to the first queue group among the multiple data migration channels; in response to a determination result that the data migration operation is completed, creating a migration completion entry of the data migration request in the completion queue of the first queue group; in response to a reading result of the migration completion entry, performing a resource release operation of the data migration request to obtain a determination result that the data migration request is completed.
[0006] According to a second aspect of an embodiment of the present disclosure, there is provided a DPU-based data migration device, which is applied to a DPU card including multiple data migration channels, wherein the multiple data migration channels couple a host end and a system-on-chip end, each data migration channel includes at least one queue group, and each queue group consists of a request queue and a completion queue. The device includes: a request initiation management module, which, in response to a data migration request from any request initiator end of the host end and the system-on-chip end, creates a migration request entry of the data migration request in a request queue of a first queue group of the multiple queue groups, and executes a data migration operation of the data migration request through a first migration channel corresponding to the first queue group among the multiple data migration channels; a request completion management module, which, in response to a determination result of the completion of the data migration operation, creates a migration completion entry of the data migration request in the completion queue of the first queue group, and executes a resource release operation of the data migration request to obtain a determination result of the completion of the data migration request.
[0007] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the method described in the first aspect is implemented.
[0008] According to a fourth aspect of an embodiment of the present disclosure, a computer storage medium is provided, wherein the computer storage medium stores a computer program code, and when the computer program code is executed by a processor, the processor is caused to execute the method described in the first aspect.
[0009] In summary, the DPU-based data movement solution provided by various aspects of the present disclosure allows simultaneous execution of bidirectional data movement operations between the host side and the on-chip system side by setting independent request queues and completion queues for each data transfer channel, and by setting the request queues and completion queues separately, the processing efficiency of a single data movement operation and the parallel execution of multiple movement instructions can be ensured. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present disclosure. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0011] Figures 1 to 3 The system architecture diagram is suitable for implementing different embodiments of the DPU-based data migration solution disclosed in the present invention.
[0012] Figure 4The present invention is a processing flow chart of a DPU-based data migration method according to an exemplary embodiment of the present invention.
[0013] Figure 5 The figure is a schematic diagram of a data migration application according to an exemplary embodiment of the present disclosure.
[0014] Figure 6 The present invention is a processing flow chart of a DPU-based data migration method according to another exemplary embodiment of the present invention.
[0015] Figure 7 It is a structural block diagram of a DPU-based data migration device according to an exemplary embodiment of the present disclosure.
[0016] Figure 8 It is a structural block diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0017] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. All other embodiments obtained by ordinary technicians in the field based on the embodiments in the embodiments of the present disclosure should fall within the scope of protection of the embodiments of the present disclosure.
[0018] Direct Memory Access (DMA) allows data to be sent directly from an attached device (such as a disk drive) to the host memory without the need for the central processing unit (CPU) to intervene. Therefore, under the same level of processor burden, DMA is a fast data transfer method.
[0019] However, when DMA technology is used to perform data movement processing between the host side (HOST side) and the system on chip side (SoC side), only one-way DMA movement of data can be achieved within the same period of time, which affects the data movement efficiency between the two.
[0020] In view of this, the embodiments of the present disclosure propose a bidirectional DMA operation coexistence solution between the host side and the on-chip system side, which can be used in the HOST-SOC DMA bidirectional coexistence scenario, and can make DMA performance no longer a system performance bottleneck (generally, system performance depends on the maximum bandwidth of the external interface), thereby improving data movement processing efficiency.
[0021] The specific implementation of each embodiment of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0022] Figures 1 to 3 A schematic diagram of a hardware architecture of a DPU-based data migration solution suitable for implementing the various embodiments of the present disclosure.
[0023] As shown in the figure, the system architecture 100 mainly includes a host end 120 (or called HOST end), a system-on-chip end 130 (or called SoC end), and a DPU (Data Processing Unit) card 110 connected to the host end 120 and the system-on-chip end 130.
[0024] The host end 120 may be any suitable device for storing information, data, programs and / or any other suitable type of content, including but not limited to: a storage system device, a server cluster, a cloud server, etc.
[0025] refer to Figure 5 In some embodiments, the host side 120 may include a host side memory 122, and the system-on-chip side 130 may include a system-on-chip memory 132. Exemplarily, the host side memory 122 and the system-on-chip memory 132 may include, but are not limited to, DDR (double data rate synchronous dynamic random access memory).
[0026] The DPU card 110 can be respectively connected to the host side 120 and the system-on-chip side 130 for communication, and is used to transfer data from the host side 120 to the system-on-chip side 130 (or called HOST to SoC data transfer), or to transfer data from the system-on-chip side 130 to the host side 120 (or called SoC to HOST data transfer), so as to allow two-way data transfer services between the host side 120 and the system-on-chip side 130.
[0027] refer to Figure 3 The DPU card 110 can be communicated with the host end 120 and the system-on-chip end 130 respectively through a PCIE (Peripheral Component Interconnect Express) unit.
[0028] The DPU card 110 may be provided with a plurality of data transfer channels 112A, 112B, ..., 112N, each of which is respectively coupled to the host terminal 120 and the system-on-chip terminal 130. Exemplarily, each of the data transfer channels 112A-112N may be a DMA channel (direct memory access channel).
[0029] In some embodiments, the DPU card 110 may include one or more DMA controllers 111, and each DMA controller 111 may support one or more DMA channels. Figure 2In the example shown, the DMA controller 111 can simultaneously support the data transfer channel 112A and the data transfer channel 112B, wherein the DMA controller 111 can transfer data from the system-on-chip end 130 through the data transfer channel 112A, and transfer data from the host end 120 through the data transfer channel 112BA.
[0030] In this embodiment, each data transport channel includes at least one queue group, and each queue group may be composed of a request queue and a completion queue. Figure 2 In the illustrated example, the data transport channel 112A includes a queue group 1120A consisting of a request queue 1122A and a completion queue 1124A, and the data transport channel 112B includes a queue group 1120B consisting of a request queue 1122B and a completion queue 1124B.
[0031] refer to Figure 2 and Figure 3 , the DMA controller 111 may include a function register 1112, a DMA engine 1114, and an interrupt unit 1116 (or INT unit). The function register 1112 is responsible for transmitting control flows (control instructions related to data transfer requests) with the host end 120 and / or the system-on-chip end 120. The DMA engine 1114 is responsible for transmitting data flows (transfer data related to data transfer requests) with the host end 120 and / or the system-on-chip end 120. The interrupt unit 1116 is responsible for transmitting interrupt signals with the host end 120 and / or the system-on-chip end 120.
[0032] refer to Figure 4 , based on the above Figures 1 to 3 In the system architecture 100 shown, an embodiment of the present disclosure provides a DPU-based data migration method 400, which mainly includes the following steps:
[0033] Step 402: In response to a data migration request from a request initiator, create a migration request entry for the data migration request in a request queue of a first queue group of multiple queue groups.
[0034] In this embodiment, the request initiator of the data transfer request can be any one of the host end 120 and the system on chip end 130, that is, the host end 120 (HOST end) and the system on chip end 130 (SoC end) can both be the initiator of the data transfer request, and the host end 120 and the system on chip end 130 can simultaneously initiate the data transfer request. Among them, the host end 120 can initiate the data transfer request from HOST to SoC and SoC to HOST, and the system on chip end 130 can initiate the data transfer request from SoC to HOST and HOST to SoC.
[0035] For example, in Figure 2 In the example shown, according to the data move request initiated by the system-on-chip terminal 130 , a move request entry of the data move request may be created in the request queue 1122A of the queue group 1120A.
[0036] In some embodiments, the data movement request of the request initiator (host 120 or system on chip 130) may support one of an SG DMA (Scatter-Gather Direct Memory Access) operation instruction and a direct DMA (Direct Memory Access) operation instruction.
[0037] Step 404 : In response to the read result of the move request entry, execute the data move operation of the data move request through a first move channel corresponding to the first queue group among the multiple data move channels.
[0038] For example, according to the reading result of the move request entry in the request queue 1122A, the data move operation of the move request entry may be performed through the data moving channel 112A corresponding to the queue group 1120A.
[0039] In some embodiments, the on-chip system-side memory 132 and the host-side memory 122 may be accessed through the DMA engine 1114 of the DMA controller 111 to perform a data move operation of the move request entry.
[0040] In some embodiments, the move request entry may be parsed, wherein, when the data move request corresponding to the parsed move request entry includes a direct DMA operation instruction, the data move operation of the direct DMA operation instruction is directly executed; when the data move request corresponding to the parsed move request entry includes an SG DMA operation instruction, each direct DMA operation instruction pointed to by the SG DMA data move request may be obtained according to the descriptor information of the data move request, and the data move operation of each direct DMA operation instruction is executed (refer to Figure 5 ).
[0041] Step 406: In response to the determination result that the data move operation is completed, create a move completion entry of the data move request in the completion queue of the first queue group.
[0042] In some embodiments, after detecting that the data move operation of the data move request is completed, a move completion entry of the data move request may be created in the completion queue 1124A of the queue group 1120A.
[0043] Step 408: In response to the read result of the migration completion entry, a resource release operation of the data migration request is executed to obtain a confirmation result that the data migration request is executed successfully.
[0044] In some embodiments, an interrupt request can be sent to the request initiating end (system on chip end 130) based on the reading result of the move request entry in the completion queue 1122A, and the resource release operation of the data move request is executed by the request initiating end. After completing the resource release operation, a definite result that the execution of the data move request is completely completed can be obtained.
[0045] In some embodiments, the DMA controller 111 may send an interrupt request to the corresponding request initiator for each move completion entry created in the completion queue.
[0046] In some embodiments, the DMA controller 111 may also obtain multiple target completion entries that meet the preset aggregation number from each move completion entry in the completion queue according to the preset aggregation number, and send an interrupt execution request to the request initiator of each target completion entry in batches. For example, an interrupt request is sent once for every N move completion entries in the completion queue, thereby reducing the resource overhead of the processor for executing interrupt processing.
[0047] In summary, the data transfer solution of this embodiment, by setting multiple data transfer channels in the DPU card and setting independent request queues and completion queues for each data transfer channel, can allow the bidirectional data transfer operations between the host side and the on-chip system side to be executed simultaneously, thereby expanding the application scenarios of DMA operations. At the same time, by setting the request queue and the completion queue separately, the processing efficiency of a single data transfer operation can be ensured, and the parallel execution of multiple transfer instructions can be realized, further improving the data transfer processing efficiency.
[0048] In addition, the technical solution of this embodiment can simultaneously support data movement of SG DMA operation instructions and direct DMA operation instructions. Among them, for data movement scenarios with large data volume and low latency requirements, it can be implemented through the SG DMA method, thereby significantly reducing processing delays and making full use of the bandwidth of the external interface to improve data transfer efficiency.
[0049] In addition, this embodiment configures aggregation parameters to support sending interrupt requests in batches, which can strike a balance between request completion delay and interrupt execution overhead, and can reduce the processor's overhead for processing interrupt programs without affecting data transfer execution efficiency.
[0050] Figure 6 The processing flow of the DPU-based data migration method according to another embodiment of the present disclosure is shown. As shown in the figure, the method 600 of this embodiment mainly includes:
[0051] Step 602: In response to the data move request from the request initiator, create a move request entry for the data move request in the request queue of the first queue group, and update the tail pointer position of the request queue based on the creation result of the move request entry.
[0052] Exemplarily, according to the data move request submitted by the host end 110, a corresponding move request entry can be created in the request queue 1122B of the queue group 1120B, and based on the creation result of the move request entry, the tail pointer position (also referred to as the pi pointer position) of the request queue 1122B is updated.
[0053] In some embodiments, when the request queue 1122B is not full, the move request entries of the data move request may be submitted sequentially to the free positions of the request queue.
[0054] In some embodiments, the function register unit 1112 is used to manage the head pointer position and the tail pointer position of each request queue and each completion queue. For example, the tail pointer register value (or pi register value) corresponding to the request queue 1122B in the function register unit 1112 may be updated according to the creation result of the move request entry in the request queue 1122B.
[0055] Step 604: read the move request entry from the request queue according to the tail pointer position of the request queue, and in response to the determination result that the move request entry is read, clear the move request entry from the request queue and update the head pointer position of the request queue.
[0056] In some embodiments, the DMA engine 1114 may read a move request entry from the request queue according to the tail pointer position of the request queue 1122B, and save it to an internal cache unit (not shown) of the DMA engine 1114, and based on the determination result that the update request queue 1122B is read to the internal cache unit of the DMA engine 1114, the move request entry may be cleared from the request queue 1122B, and the head pointer position of the request queue 1122B may be updated. For example, the head pointer register value (or ci register value) corresponding to the request queue 1122B in the function register unit 1112 is updated.
[0057] In this embodiment, the DMA engine 1114 may determine the move request entry to be executed in the request queue 1122B according to the difference between the current head pointer position and the tail pointer position of the request queue 1122B.
[0058] Step 606: parse the migration request entry and execute the data migration operation of the data migration request.
[0059] In some embodiments, the move request entry may be parsed. If the data move request corresponding to the parsed move request entry is an SG DMA operation instruction, each direct DMA operation instruction pointed to by the SG DMA data move request is obtained according to the descriptor information of the data move request, and the DMA engine 1114 executes the data move operation of each direct DMA (abbreviated as DDMA) operation instruction; if the data move request corresponding to the parsed move request entry is a direct DMA operation instruction, the DMA engine 1114 may directly execute the data move operation of the direct DMA operation instruction (refer to Figure 5 ).
[0060] Step 608: In response to the determination result that the data move operation is completed, create a move completion entry of the data move request in the completion queue of the first queue group, and update the tail pointer position of the completion queue based on the creation result of the move completion entry.
[0061] In some embodiments, after determining that the DMA engine 1114 has completed the data move operation, a corresponding move completion entry may be created for the completion queue 1124B of the queue group 1120B, and based on the creation result of the move completion entry in the completion queue 1124B, the tail pointer register value (or pi register value) corresponding to the completion queue 1124B in the function register unit 1112 may be updated.
[0062] Step 610: read the move completion entry in the completion queue according to the tail pointer position of the completion queue, and initiate an interrupt request for the move completion entry to the request initiator to execute a resource release operation of the data move request.
[0063] In some embodiments, based on the tail pointer position of the completion queue 1124B, a move completion entry can be selected from the completion queue 1124B, and based on the identification result that the request initiator corresponding to the move completion entry is the host side 120, an interrupt request is sent to the host side 120. After receiving the interrupt request, the host side 120 enters the interrupt service program to execute the resource release operation of the data move request.
[0064] In some embodiments, N move completion entries may be obtained from each move completion entry in the completion queue 1124B according to a preset aggregation quantity, and interrupt execution requests may be sent in batches to the request initiators of the N move completion entries at one time.
[0065] Step 612: In response to the result of determining that the resource release operation is completed, the move completion entry is cleared from the completion queue, and the head pointer position of the completion queue is updated to obtain the result of determining that the data move request is completed.
[0066] In this embodiment, after the resource release operation of the data move request is obtained, the move completion entry can be cleared from the completion queue, and the head pointer register value (or called ci register value) corresponding to the completion queue 1124B in the function register unit 1112 is updated to obtain a definite result that the execution of this data move request is completed.
[0067] In summary, the data migration scheme of this embodiment can realize a lock-free multi-channel DMA command interaction mode by setting independent request and completion queues for each data migration channel, and separate DMA command requests and command completions, which can significantly improve the data processing efficiency in bidirectional DMA transmission scenarios.
[0068] Furthermore, this embodiment can support the SG DMA data movement operation mode to allow data to be transferred to multiple memory areas in a single DMA process, which is equivalent to stringing together multiple simple DMA requests, thereby reducing the resource consumption caused by the central processor performing multiple input and output interrupt processing and data copying tasks.
[0069] In addition, this embodiment supports aggregate processing of interrupt requests of completion queues, which can reduce the interrupt processing overhead of the central processing unit.
[0070] Figure 7 4 is a structural block diagram of a DPU-based data migration device 700 according to an exemplary embodiment of the present disclosure.
[0071] refer to Figure 2 The data transfer device 700 of this embodiment can be applied to a DPU card 110 including a plurality of data transfer channels 112A to 112N, wherein the plurality of data transfer channels 112A to 112N couple a host end 120 and a system-on-chip end 130, and each data transfer channel includes at least one queue group, and each queue group is composed of a request queue and a completion queue.
[0072] The data migration device 700 of this embodiment mainly includes:
[0073] The request queue management module 702, in response to a data transfer request from any one of the request initiators of the host end 120 and the system-on-chip end 130, creates a transfer request entry of the data transfer request in a request queue of a first queue group of the plurality of queue groups, and executes a data transfer operation of the data transfer request through a first transfer channel corresponding to the first queue group of the plurality of data transfer channels;
[0074] The completion queue management module 704, in response to the determination result that the data move operation is completed, creates a move completion entry for the data move request in the completion queue of the first queue group, and executes a resource release operation for the data move request to obtain a determination result that the data move request is completed.
[0075] In some embodiments, the request queue management module 702 is also used to: create a move request entry for the data move request in the request queue of the first queue group in response to the data move request; and update the tail pointer position of the request queue based on the creation result of the move request entry.
[0076] In some embodiments, the request queue management module 702 is also used to: read the move request entry from the request queue according to the tail pointer position of the request queue; in response to the determination result that the move request entry is read, clear the move request entry from the request queue and update the head pointer position of the request queue; parse the move request entry and execute the data move operation of the data move request.
[0077] In some embodiments, the data movement request includes one of an SG DMA operation instruction and a direct DMA operation instruction.
[0078] In some embodiments, the request queue management module 702 is also used to: parse the move request entry, and when the data move request corresponding to the move request entry includes a direct DMA operation instruction, directly execute the data move operation of the direct DMA operation instruction; when the data move request corresponding to the move request entry includes an SGDMA operation instruction, obtain each direct DMA operation instruction pointed to by the SG DMA data move request according to the descriptor information of the data move request, and execute the data move operation of each direct DMA operation instruction.
[0079] In some embodiments, the completion queue management module 704 is also used to: in response to the determination result of the completion of the data move operation, create a move completion entry for the data move request in the completion queue of the first queue group; and based on the creation result of the move completion entry, update the tail pointer position of the completion queue.
[0080] In some embodiments, the completion queue management module 704 is also used to: read the move completion entry in the completion queue according to the tail pointer position of the completion queue, initiate an interrupt request for the move completion entry to the request initiator to execute the resource release operation of the data move request; in response to the determination result of the completion of the resource release operation, clear the move completion entry from the completion queue, and update the head pointer position of the completion queue to obtain the determination result of the completion of the data move request.
[0081] In some embodiments, according to a preset aggregation quantity, multiple target completion entries that meet the preset aggregation quantity are obtained from each move completion entry of the completion queue; and interrupt execution requests are sent to request initiators of the multiple target completion entries in batches.
[0082] An embodiment of the present disclosure provides a computer storage medium storing a computer program code. When the computer program code is executed by a processor, the processor executes the DPU-based data migration method described in each embodiment of the present disclosure.
[0083] The exemplary embodiments of the present disclosure provide an electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication. The memory stores a computer program that can be executed by the at least one processor, and when the computer program is executed by the at least one processor, the electronic device performs the DPU-based data migration method according to each exemplary embodiment of the present disclosure.
[0084] Please refer to Figure 8 , a block diagram of an electronic device 800 that can serve as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0085] like Figure 8As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a cache unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0086] A plurality of components in the electronic device 800 are connected to the I / O interface 805, including: an input unit 806, an output unit 807, a cache unit 808, and a communication unit 809. The input unit 806 may be any type of device capable of inputting information to the electronic device 800, and the input unit 806 may receive input digital or character information, and generate key signal inputs related to user settings and / or function control of the electronic device. The output unit 807 may be any type of device capable of presenting information, and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The cache unit 808 may include, but is not limited to, a disk, an optical disk. The communication unit 809 allows the electronic device 800 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks, and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0087] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above. For example, in some embodiments, the DPU-based data migration method described above may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a cache unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 800 via the ROM 802 and / or the communication unit 809. In some embodiments, the computing unit 801 may be configured to perform the DPU-based data migration method described above in any other appropriate manner (e.g., by means of firmware).
[0088] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, implements the functions / operations specified in the flow chart and / or block diagram. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0089] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0090] As used in this disclosure, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0091] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0092] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a DPU-based data mover), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0093] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and the server relationship is generated by computer programs running on respective computers and having a client-server relationship with each other.
[0094] It should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present disclosure can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present disclosure.
[0095] The above implementation methods are only used to illustrate the embodiments of the present disclosure, and are not limitations of the embodiments of the present disclosure. Ordinary technicians in the relevant technical field may make various changes and modifications without departing from the spirit and scope of the embodiments of the present disclosure. Therefore, all equivalent technical solutions also belong to the scope of the embodiments of the present disclosure. The scope of patent protection of the embodiments of the present disclosure should be defined by the claims.
Claims
1. A data migration method based on DPU, characterized in that: Applied to a DPU card including a plurality of data transport channels, the plurality of data transport channels are coupled to a host end and an on-chip system end, each data transport channel includes at least one queue group, each queue group is composed of a request queue and a completion queue, the method includes: In response to a data move request from a request initiator, creating a move request entry of the data move request in a request queue of a first queue group of the plurality of queue groups, wherein the request initiator is any one of the host end and the system on chip end; In response to a reading result of the migration request entry, executing a data migration operation of the data migration request through a first migration channel corresponding to a first queue group among the plurality of data migration channels; In response to a determination result that the data move operation is completed, creating a move completion entry of the data move request in a completion queue of the first queue group; In response to the read result of the migration completion entry, a resource release operation of the data migration request is performed to obtain a determination result that the data migration request is executed successfully.
2. The method according to claim 1, characterized in that In response to the data migration request from the request initiator, creating a migration request entry of the data migration request in a request queue of a first queue group of the multiple queue groups, comprising: In response to the data move request, creating a move request entry of the data move request in the request queue of the first queue group; Based on the creation result of the move request entry, the tail pointer position of the request queue is updated.
3. The method according to claim 2, characterized in that The step of executing the data migration operation of the data migration request through a first migration channel corresponding to a first queue group among the plurality of data migration channels in response to the read result of the migration request entry comprises: Reading the move request entry from the request queue according to the tail pointer position of the request queue; In response to a determination result that the move request entry is read, clearing the move request entry from the request queue and updating a head pointer position of the request queue; The migration request entry is parsed, and a data migration operation of the data migration request is executed.
4. The method according to claim 3, characterized in that The data move request includes one of an SG DMA operation instruction and a direct DMA operation instruction; And wherein, the parsing the migration request entry and executing the data migration operation of the data migration request includes: parsing the move request entry, When the data move request corresponding to the parsed move request entry includes a direct DMA operation instruction, directly executing the data move operation of the direct DMA operation instruction; When the data move request corresponding to the parsed move request entry includes an SG DMA operation instruction, each direct DMA operation instruction pointed to by the SG DMA data move request is obtained according to the descriptor information of the data move request, and the data move operation of each direct DMA operation instruction is executed.
5. The method according to any one of claims 1 to 4, characterized in that In response to the determination result that the data move operation is completed, creating a move completion entry of the data move request in the completion queue of the first queue group, including: In response to a determination result that the data move operation is completed, creating a move completion entry of the data move request in a completion queue of the first queue group; Based on the creation result of the move completion entry, the tail pointer position of the completion queue is updated.
6. The method according to claim 5, characterized in that The step of executing the resource release operation of the data migration request in response to the read result of the migration completion entry to obtain a determination result that the data migration request is completed includes: Reading the move completion entry in the completion queue according to the tail pointer position of the completion queue, and initiating an interrupt request of the move completion entry to the request initiator to execute a resource release operation of the data move request; In response to the determination result that the resource release operation is completed, the move completion entry is cleared from the completion queue, and the head pointer position of the completion queue is updated to obtain the determination result that the data move request is completed.
7. The method according to claim 5 or 6, characterized in that: The method further comprises: According to a preset aggregation quantity, obtaining a plurality of target completion items that meet the preset aggregation quantity from each move completion item in the completion queue; Sending interrupt execution requests to request initiators of the plurality of target completion entries in batches.
8. A data migration device based on DPU, characterized in that: The device is applied to a DPU card including a plurality of data transport channels, wherein the plurality of data transport channels are coupled to a host end and an on-chip system end, each data transport channel includes at least one queue group, each queue group is composed of a request queue and a completion queue, and the device includes: a request queue management module, in response to a data transfer request from any one of the host end and the system-on-chip end, creating a transfer request entry of the data transfer request in a request queue of a first queue group of the plurality of queue groups, and executing a data transfer operation of the data transfer request through a first transfer channel corresponding to the first queue group among the plurality of data transfer channels; The completion queue management module, in response to the determination result of the completion of the data move operation, creates a move completion entry for the data move request in the completion queue of the first queue group, and executes a resource release operation for the data move request to obtain the determination result of the completion of the data move request.
9. An electronic device, characterized in that: include: A memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the method according to any one of claims 1 to 7 is implemented.
10. A computer storage medium, characterized in that: The computer storage medium stores a computer program code, and when the computer program code is executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 7.
Citation Information
Cited By
Acceleration method of matrix multiplication, electronic equipment and storage medium
CN119988811A
An acceleration method for matrix multiplication, an electronic device, and a storage medium
CN119988811B
PCIe (Peripheral Component Interconnect Express) endpoint equipment communication method, device and equipment based on software defined interconnection
CN121542207A
