Data transmission method and apparatus, network card, and device
By controlling the number of RDMA read requests sent in the network card and using a backpressure mechanism, the response congestion problem of device B in multi-device RDMA data transmission is solved, and the data reading efficiency is improved.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2025-12-24
- Publication Date
- 2026-07-09
AI Technical Summary
In multi-device RDMA data transmission, device B is prone to congestion due to receiving a large number of RDMA read responses, which affects data exchange efficiency.
By controlling the number of RDMA read requests sent through the network card, and employing batch sending of read requests, sending quota updates, and priority-based flow control backpressure mechanisms, a large number of read requests are avoided in a short period of time, ensuring that device A can process and respond in a timely manner.
This effectively avoids congestion in RDMA read responses and improves data reading efficiency and processing capabilities between devices.
Smart Images

Figure CN2025145165_09072026_PF_FP_ABST
Abstract
Description
A data transmission method, apparatus, network interface card and device
[0001] Cross-references to related applications
[0002] This application claims priority to Chinese Patent Application No. 202510027994.4, filed on January 6, 2025, entitled "A Data Transmission Method, Apparatus, Network Interface Card and Device", the entire contents of which are incorporated herein by reference. Technical Field
[0003] This application relates to the field of communication technology, and in particular to a data transmission method, apparatus, network interface card and device. Background Technology
[0004] Remote direct memory access (RDMA) is a technique that bypasses the operating system kernel of a remote device to access data in its memory. RDMA can reduce the processor's computing power usage on remote devices.
[0005] Taking device A writing data to device B via RDMA as an example, device A can first provide device B with the address of the data to be written in device A's memory. After obtaining the address, device B initiates a read request carrying that address. Upon receiving the read request, device A's network card reads the data from device A's memory based on the address, and then sends a read response carrying the data to device B.
[0006] In practical applications, multiple devices A can be deployed, and these multiple devices A can access device B in parallel, writing data to device B. This means that device B needs to send multiple read requests and receive multiple read responses from device A. Device B needs to both receive and process these multiple read responses. This can easily lead to congestion on device B, preventing it from processing the multiple read responses in a timely manner and affecting data interaction between device A and device B. Summary of the Invention
[0007] This application provides a data transmission method, apparatus, network interface card, and device for improving data reading efficiency between devices.
[0008] Firstly, this application provides a data transmission method, in which:
[0009] The network card of the first device obtains multiple RDMA read requests to be sent from the processor of the first device through the bus. The RDMA read request refers to the request initiated based on RDMAREAD. In this embodiment of the application, the RDMA read request can also be called a read request.
[0010] After acquiring the multiple RDMA read requests, the network interface card (NIC) needs to further select the RDMA read request to be sent. The NIC selects one or more RDMA read requests from the multiple RDMA read requests and sends the selected RDMA read requests to other devices communicating with the first device. The number of these other devices is not limited; there can be one or more.
[0011] For a network interface card (NIC), the number of RDMA read requests selected by the NIC does not exceed the current transmission limit of the RDMA read requests. In other words, the number of selected RDMA read requests is less than or equal to the number of RDMA read requests.
[0012] During the transmission of the selected RDMA read request, the network interface card (NIC) reduces its current transmission limit. Since each RDMA read request consumes one transmission limit, the amount reduced by the NIC is equal to the number of RDMA read requests currently being sent.
[0013] Using the above method, in the first device, after the network card obtains multiple RDMA read requests to be sent, it does not directly send the RDMA requests. Instead, it further selects from the multiple RDMA read requests, choosing those that meet the current sending limit (i.e., the number of RDMA read requests does not exceed the current sending limit), and then sends the selected RDMA read requests. The network card can control the number of RDMA read requests sent using the current sending limit. This prevents the first device from sending a large number of RDMA read requests in a short period of time, effectively avoiding congestion in RDMA read responses caused by sending too many RDMA read requests, ensuring that the first device can process RDMA read responses, and improving data reading efficiency.
[0014] In one possible implementation, the initial value of the transmission limit is related to the performance of the network card. The first device (such as a processor and a network card) determines the initial value of the transmission limit based on the performance of the network card. Furthermore, the initial value of the transmission limit is also related to the performance of the processor.
[0015] By using the above method, since the initial value of the transmission quota is related to the performance of the network card, when the network card uses the transmission quota to control the transmission of RDMA read requests, the network card's own performance can always support the transmission of RDMA read requests, ensuring that RDMA read requests can be transmitted to other devices.
[0016] In one possible implementation, when the network card of the first device obtains multiple RDMA read requests to be sent from the processor of the first device via the bus, it can obtain multiple RDMA read requests from the processor in multiple steps; that is, the multiple RDMA read requests include multiple sets of RDMA read requests, and the network card obtains one set of RDMA read requests from the processor each time.
[0017] For any set of RDMA read requests, the network card selects one or more RDMA read requests from the set of RDMA read requests and sends the selected RDMA read requests, wherein the number of selected RDMA read requests does not exceed the current sending limit.
[0018] By using the above method, since the network card obtains multiple RDMA read requests from the processor in multiple steps, the sending of these multiple RDMA read requests by the network card can be controlled at the group level, further ensuring control over the number of RDMA read requests sent by the network card.
[0019] In one possible implementation, the target data to be read includes sub-data, and each RDMA read request is used to request the reading of one sub-data of the target data, the RDMA read request carrying the sub-data address.
[0020] By using the above method, the large amount of data to be read is broken down into smaller data segments, thereby improving the efficiency of reading large amounts of data.
[0021] In one possible implementation, after the network interface card (NIC) sends the selected RDMA read request, it receives the response to the RDMA read request and increases its current transmission limit. Upon receiving the response to the RDMA read request, indicating that the data requested by the RDMA read request has been received, the current transmission limit is increased to allow for the transmission of other RDMA read requests.
[0022] In one possible implementation, if a target condition is met, the network card sends a backpressure signal, which indicates that the response to the RDMA read request should be postponed. The target condition is that the current transmission limit is not greater than the limit threshold.
[0023] Using the above method, when the network card's current transmission capacity is insufficient, it uses a backpressure signal to notify other devices to temporarily suspend the transmission of RDMA read request responses, ensuring that the first device can promptly process the responses to the currently received RDMA read requests.
[0024] Secondly, this application also provides a computing device, the beneficial effects and details of which can be found in the relevant description in the first aspect, and are only briefly described here. This computing device includes a processor and a network interface card (NIC).
[0025] The processor is used to send multiple RDMA read requests to the network card via the bus;
[0026] The network interface card (NIC) is used to obtain multiple RDMA read requests from the processor via the bus; select one or more RDMA read requests from the multiple RDMA read requests; and send the selected RDMA read requests to other devices communicating with the computing device, wherein the number of selected RDMA read requests does not exceed the current transmission limit of the RDMA read requests; and reduce the current transmission limit during the transmission of the selected RDMA read requests.
[0027] In one possible implementation, the network interface card (NIC) determines an initial value for the transmission limit based on its performance. Alternatively, the processor can also determine this initial transmission limit based on the NIC's performance and transmit it to the NIC.
[0028] In one possible implementation, the network card obtains multiple RDMA read requests from the processor in multiple steps.
[0029] Multiple RDMA read requests include multiple sets of RDMA read requests; the network card obtains one set of RDMA read requests from the processor each time.
[0030] For any set of RDMA read requests, the network card selects one or more RDMA read requests from the set of RDMA read requests and sends the selected RDMA read requests, wherein the number of selected RDMA read requests does not exceed the current sending limit.
[0031] In one possible implementation, the processor splits the address of the target data to be read into multiple sub-data addresses; generates multiple RDMA read requests, each RDMA read request corresponding to one of the multiple sub-data addresses.
[0032] In one possible implementation, the network card receives a response to an RDMA read request and increases the current transmission limit.
[0033] In one possible implementation, when the target condition is met, the network card sends a backpressure signal, which indicates that the response to the RDMA read request should be postponed. The target condition is that the current transmission amount is not greater than the amount threshold.
[0034] Thirdly, this application also provides a network interface card (NIC), the beneficial effects and details of which can be found in the relevant description in the first aspect, and are only briefly described here. This NIC includes an acquisition module, a transmission module, and an adjustment module; optionally, it also includes a receiving module.
[0035] The acquisition module is used to acquire multiple Remote Direct Memory Access (RDMA) read requests to be sent from the processor of the first device via the bus.
[0036] The sending module is used to select one or more RDMA read requests from a plurality of RDMA read requests and send the selected RDMA read requests to other devices communicating with the first device, wherein the number of selected RDMA read requests does not exceed the current sending limit of the RDMA read requests.
[0037] The adjustment module is used to reduce the current transmission limit during the transmission of the selected RDMA read request.
[0038] In one possible implementation, the sending module determines an initial value for the sending limit based on the network card's performance.
[0039] In one possible implementation, the acquisition module acquires multiple RDMA read requests from the processor in multiple steps; each time the acquisition module acquires a set of RDMA read requests from the processor, and the multiple RDMA read requests include multiple sets of RDMA read requests.
[0040] For any given set of RDMA read requests, the sending module selects one or more RDMA read requests from the set of RDMA read requests and sends the selected RDMA read requests, wherein the number of selected RDMA read requests does not exceed the current sending limit.
[0041] In one possible implementation, the target data to be read includes multiple sub-data, and each RDMA read request is used to request the reading of one sub-data of the target data. The RDMA read request corresponds to the address of one of the multiple sub-data.
[0042] In one possible implementation, the network interface card (NIC) further includes a receiving module that receives a response to an RDMA read request. During the period while the receiving module receives the response to the RDMA read request, an adjustment module increases the current transmission limit.
[0043] In one possible implementation, the sending module sends a backpressure signal when the target condition is met. The backpressure signal indicates that the response to the RDMA read request should be postponed. The target condition is that the current sending amount is not greater than the amount threshold.
[0044] Fourthly, embodiments of this application also provide a data device that has the function of implementing the first device behavior in the method example of the first aspect described above. The beneficial effects can be found in the description of the first aspect and will not be repeated here. The function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions. In one possible design, the device structure includes a processing module (for generating multiple RDMA read requests and sending multiple RDMA read requests to the network card), and an interface module (for selecting one or more RDMA read requests from the multiple RDMA read requests and sending the selected RDMA read request; during the sending of the RDMA read request, the current quota is reduced; this module is deployed in the network card and performs the operations performed by the network card). These modules can perform the corresponding functions in the method example of the first aspect described above, as detailed in the method example, and will not be repeated here.
[0045] Fifthly, this application proposes a data transmission method, which is executed by the processor and network card in the first device. The beneficial effects can be found in the relevant description of the first aspect, and will not be repeated here.
[0046] The network card of the first device obtains multiple RDMA read requests to be sent from the processor of the first device via the bus.
[0047] The network card selects one or more RDMA read requests from multiple RDMA read requests and sends the selected RDMA read requests to other devices communicating with the first device, wherein the number of selected RDMA read requests does not exceed the current sending limit of the RDMA read requests.
[0048] The network card reduces its current transmission limit while sending the selected RDMA read request.
[0049] In one possible implementation, the first device determines an initial value for the transmission limit based on the performance of the network interface card.
[0050] In one possible implementation, the network card of the first device obtains multiple RDMA read requests from the processor in multiple steps;
[0051] Multiple RDMA read requests comprise multiple sets of RDMA read requests; the network interface card (NIC) retrieves one set of RDMA read requests from the processor at a time.
[0052] For any set of RDMA read requests, the network card selects one or more RDMA read requests from the set of RDMA read requests and sends the selected RDMA read requests, wherein the number of selected RDMA read requests does not exceed the current sending limit.
[0053] In one possible implementation, the processor splits the address of the target data to be read into multiple sub-data addresses;
[0054] The processor generates multiple RDMA read requests, each RDMA read request corresponding to one of the multiple sub-data addresses.
[0055] In one possible implementation, after the network card sends the selected RDMA read request, the network card receives the response to the RDMA read request and increases the current transmission limit.
[0056] In one possible implementation, if a target condition is met, the network card sends a backpressure signal, which indicates that the response to the RDMA read request should be postponed. The target condition is that the current transmission limit is not greater than the limit threshold.
[0057] In a sixth aspect, this application also provides a network interface card (NIC), which includes a processing chip and a power supply circuit. The power supply circuit supplies power to the processing chip, which is used to execute the methods described in the first aspect and various possible implementations of the first aspect.
[0058] In a seventh aspect, this application also provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the methods described in the first aspect and various possible implementations of the first aspect.
[0059] Eighthly, this application also provides a computer program product containing instructions that, when run on a computer, cause the computer to perform the methods described in the first aspect and various possible implementations of the first aspect.
[0060] Ninthly, this application also provides a computer chip connected to a memory, the chip being used to read and execute a software program stored in the memory, and to execute the methods described in the first aspect and various possible implementations of the first aspect.
[0061] For the technical effects that can be achieved by the second to ninth aspects mentioned above, please refer to the description of the technical effects that can be achieved by the corresponding design schemes in the first aspect mentioned above. This application will not repeat them here. Attached Figure Description
[0062] Figure 1 is a schematic diagram of a data transmission system provided in this application;
[0063] Figure 2 is a structural schematic diagram of a first device provided in this application;
[0064] Figure 3 is a schematic diagram of an RDMA interaction process provided in this application;
[0065] Figure 4 is a schematic diagram of a data transmission method provided in this application;
[0066] Figure 5 is a schematic diagram of the PCF back pressure principle provided in this application;
[0067] Figure 6 is a schematic diagram of the structure of a transmission device provided in this application. Detailed Implementation
[0068] Before introducing a data transmission method provided in the embodiments of this application, let's clarify the concept involved in the embodiments of this application—remote direct memory access (RDMA):
[0069] RDMA is a technique that bypasses the operating system kernel of a remote device to access its data in memory. Because it does not go through the operating system, it not only saves a lot of processor resources, but also improves system throughput and reduces system network communication latency. It is especially suitable for widespread use in large-scale parallel computer clusters.
[0070] RDMA has several key features: (1) Data is transmitted between the network and remote devices; (2) No operating system kernel is involved, and all content related to sending and transmitting is offloaded to the smart network card; (3) Data is transmitted directly between the user space virtual memory and the smart network card without involving the operating system kernel, and there is no additional data movement or copying.
[0071] RDMA transmission modes include both bilateral and unilateral operations. SEND / RECEIVE is a bilateral operation, meaning the remote application needs to be aware of and participate in the transmission to complete the message. READ and WRITE are unilateral operations; the local end only needs to know the address of the data at the remote end. The remote application does not need to be aware of the communication; data reading or storage is handled by the remote network interface card (NIC), which then encapsulates the data into a message and returns it to the local end. In practice, SEND / RECEIVE is often used to transmit control messages (such as transmitting the location information of target data mentioned below), while data messages are mostly transmitted using READ / WRITE (such as transmitting requests carrying the location information of target data mentioned below).
[0072] Here, the two ends that need to exchange information are referred to as device A and device B, respectively. Device A and device B can interact via RDMA. Below are two examples of how device A and device B can interact via RDMA.
[0073] In the first scenario, device A reads data from device B via bilateral RDMA.
[0074] In a bilateral RDMA read operation, device A does not know the location of the target data in device B's memory. Therefore, the request initiated by device A to read the target data does not include the target data's location information. Instead, the request indicates the identifier of the data set (such as a file, object, or data block) to which the target data belongs, its offset, and the length of the target data. Upon receiving this message, device B's processor queries the target data's location information and returns it to device A. Device A then initiates another request to device B to read the target data, this time including the target data's location information. Device B's network interface card (NIC) reads and returns the target data based on this location information.
[0075] The second method involves device A writing data to device B via bilateral RDMA.
[0076] Device A is unaware of the target data's location in Device B's memory. Therefore, the request initiated by Device A to write data does not include the target data's location information. Instead, the request indicates the identifier of the data set (such as a file, object, or data block) to which the target data belongs, its offset, and the length of the target data. Upon receiving this request, Device B's processor queries the target data's location information and returns it to Device A. Device A then sends another request to Device B to write the target data, this time including the target data's location information and the target data itself. Device B's network interface card (NIC) saves the target data based on its location information.
[0077] As shown in Figure 1, a data transmission system provided in an embodiment of this application is provided. The data transmission system includes a first device 100 and at least one second device 200.
[0078] The first device 100 and the second device 200 are two types of devices capable of data transmission in this data transmission system. In this embodiment, the first device 100 is described as the data requester and the second device 200 as the data provider. The second device 200 refers to other devices communicating with the first device 100. This embodiment does not limit the number of other devices communicating with the first device 100; there can be one or more, meaning the data transmission system may include one or more second devices 200.
[0079] The first device 100 can send an RDMA read request to one or more second devices 200. This RDMA read request is a request sent based on RDMA READ. Hereinafter, the RDMA read request will be simply referred to as a read request. This read request is used to request the reading of data (which may be sub-data from a target dataset) from the second device 200. Upon receiving the read request, the second device 200 acquires the data and sends a read response back to the first device 100, carrying the data in the read response.
[0080] In this embodiment, the first device 100 can send multiple read requests to other devices communicating with it to read data from those other devices. This embodiment does not limit the number of other devices communicating with the first device 100; there can be one or more. Taking the second device 200 as an example, when there is only one second device 200 communicating with the first device 100, the first device 100 can send multiple read requests to that single second device 200. Each time the second device 200 receives a read request, it processes the request and sends a response back to the first device 100 (in this embodiment, the response to the read request can be simply referred to as a read response). When the first device 100 can transmit data with multiple second devices 200, the second device 200 can send a read request to each of the multiple second devices 200; any one of the multiple second devices 200 receives the read request and sends a read response to the first device 100, the read response carrying first data.
[0081] Since the first device 100 can send multiple read requests, it needs to be able to process multiple read responses. When the first device 100 sends a large number of read requests, it means that it will also receive a large number of read responses. If the number of read responses is large, exceeding the processing capacity of the first device 100, it will cause read response congestion and affect the processing efficiency of read responses.
[0082] In this embodiment of the application, the first device 100 reduces congestion in the read response and improves data transmission efficiency through some or all of the following three mechanisms.
[0083] Mechanism 1: Batch sending mechanism for read requests.
[0084] When the first device 100 needs to send multiple read requests, it can send the multiple read requests in batches. In other words, the first device 100 divides the multiple read requests into multiple groups and sends one group of read requests at a time.
[0085] Through mechanism one, the first device 100 can control the number of read requests that need to be sent each time. In this way, the number of read responses received by the first device 100 will also be reduced, avoiding congestion of read responses, improving the processing efficiency of read responses, and thus ensuring the data transmission efficiency between the first device 100 and the second device 200.
[0086] Mechanism 2: Mechanism for updating the sending limit of read requests.
[0087] The first device 100 is configured with a sending limit for read requests. The current sending limit describes the upper limit of the number of read requests that can be sent at present. The sending limit will decrease as read requests are sent and increase as read responses are processed. The sending limit is a value that changes over time. Therefore, the first device 100 needs to query the current sending limit when sending a read request.
[0088] For example, when the first device 100 needs to send a read request, it first checks its current sending limit. If the current sending limit is greater than a certain threshold, the first device 100 can send a number of read requests not exceeding the difference in limit. The difference in limit is the difference between the current sending limit and the threshold. Since each read request uses one unit of the current sending limit, this current sending limit can be reduced during the sending of read requests. For example, the current sending limit is decreased by one for each read request sent. If the current sending limit is not greater than the certain threshold, the first device 100 will not send any more read requests; it will only start sending read requests when the current sending limit is greater than the certain threshold. When the first device 100 receives a read response (i.e., a response to a read request), it increases the current sending limit.
[0089] Through mechanism two, the first device 100 can control the number of read requests sent, while also ensuring the efficiency of read response processing.
[0090] Mechanism 3: Priority-based flow control (PCF) backpressure mechanism.
[0091] When the first device 100 determines that the target conditions are met, it triggers the PCF backpressure mechanism, that is, it sends a backpressure signal to the second device 200. The backpressure signal is used to instruct the second device 200 to postpone sending the read response.
[0092] The target condition can be that the number of read responses to be processed by the first device 100 is greater than the number threshold, or the target condition can be that the current sending amount is less than the amount threshold.
[0093] Mechanism 3 enables the first device 100 to promptly postpone sending a read response by the second device 200 when it is unable or about to be unable to process the read response. This reduces the number of read responses received by the first device 100 and lowers the possibility of congestion caused by the read response.
[0094] The first device 100 can effectively control the number of read requests sent through some or all of the three mechanisms mentioned above, thereby achieving the effect of controlling the number of read responses received.
[0095] This application does not impose many restrictions on the second device 200; any device that can interact with the first device 100 can be used as the second device 200.
[0096] The structure of the first device will be described below from a hardware perspective. Figure 2 shows a schematic diagram of the structure of a first device according to an embodiment of this application. The first device 100 includes a processor 110, a network interface card (NIC) 120, and a memory 130. The NIC 120 is used to communicate with a second device located outside the processor 110. The first device 100 and the second device 200 are devices with computer functions, including but not limited to personal computers, servers, mobile phones, tablets, or smart cars.
[0097] In this embodiment, the processor 110 can transmit data through the network interface card 120. The network interface card 120 can send read requests from the processor 110 to the network interface card 120, and can also select read requests to be sent to the second device 200 based on the current sending capacity. For the remaining unsent read requests, the network interface card 120 can postpone the sending of the read requests until the current sending capacity supports the sending of the remaining read requests.
[0098] Processor 110 is the computing and control core of the first device 100. It can be a central processing unit (CPU) or other specific integrated circuits. Processor 110 can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0099] Memory 130 refers to internal memory that directly exchanges data with processor 110, and can serve as temporary data storage for the operating system or other running programs. Memory 130 may include random access memory (RAM) or read-only memory (ROM). For example, the random access memory may be dynamic random access memory (DRAM) or storage class memory (SCM). Memory 130 may also include other types of random access memory, such as static random access memory (SRAM). Memory 130 may also include dual in-line memory modules or dual in-line memory modules (DIMMs). This application embodiment does not limit the specific type of memory 130 or the types of memory included in memory 130. The memory 130 can serve as the main memory of the first device. Although not shown, the first device may also include "external storage," such as a hard disk, to achieve persistent storage.
[0100] Within the first device 100, both the processor 110 and the network interface card 120 possess data processing capabilities. The processor 110 is the main processing core of the first device 100, capable of performing operations required by the first device 100 (such as sending read requests, receiving and processing read responses). In this embodiment, the network interface card 120 in the first device 100 can replace the processor 110 in data transmission, or can assist the processor 110 in performing some functions in data transmission.
[0101] The network interface card 120 is connected to the processor 110 and can be deployed inside the first device 100, such as on the motherboard or backplane of the first device 100. The network interface card 120 (e.g., the processing chip 121 in the network interface card 120) exchanges data with the processor 110 through a bus 140. The bus 140 can be a Peripheral Component Interconnect Express (PCIe) bus, or a Compute Express Link (CXL), Universal Serial Bus (USB) protocol, or a bus using other protocols. The processing chip 121 is, for example, a... In addition to the processing chip 121, the network interface card 120 may also include a power supply circuit, and optionally, a memory 122, which may be RAM. The structure of the network interface card 120 will be described below.
[0102] In other words, the network interface card 120 is a smart network interface card. Besides possessing the functions of a traditional network interface card, it can also function as a data processing module attached to the first device 100, undertaking some of the functions of the processor 110. That is, some functions of the processor 110 are offloaded to the network interface card 120, which performs some operations on behalf of the processor 110, thereby reducing the workload of the processor 110 and freeing up its computing power. In this embodiment, the network interface card 120 can replace the processor 110 in controlling the timing and quantity of read requests. The network interface card 120 is hardware for communication between computers, installed on the computer motherboard via an interface; for example, the network interface card 120 can be a data processing unit (DPU).
[0103] In this embodiment, the sending of the read request can be implemented by the network interface card 120, that is, the network interface card 120 sends the read request. Correspondingly, the receiving of the read response can also be implemented by the network interface card 120, that is, the network interface card 120 can receive the read response from the second device. The processing of the read response, that is, parsing the read response and obtaining the data in the read response, can be implemented by the processor 110 or by the network interface card 120.
[0104] The entities responsible for implementing the three mechanisms mentioned above are as follows:
[0105] Mechanism 1: The processor 110 can implement the aforementioned mechanism 1, that is, the processor 110 can send multiple read requests to be sent to the network card 120 in multiple batches. For example, the processor 110 can group the multiple read requests, which include multiple groups of read requests. The processor 110 sends one group of read requests to the network card 120 each time to instruct the network card 120 to send the group of read requests.
[0106] Mechanism Two: Network interface card 120 can implement the aforementioned Mechanism Two, that is, network interface card 120 maintains a transmission limit for read requests, the initial value of which is related to the performance of network interface card 120. Network interface card 120 selects one or more read requests to send to the second device based on the current transmission limit. During the period of sending a read request, network interface card 120 decreases the current transmission limit. During the period of receiving a read response, network interface card 120 increases the current limit.
[0107] Mechanism 3: Network card 120 can implement the aforementioned mechanism 3, that is, when the target conditions are met, network card 120 notifies the second device to postpone sending the read response through the PFC backpressure mechanism.
[0108] The internal structure of network card 120 is described below.
[0109] The network interface card 120 includes a processing chip 121, and optionally, a memory 122. The processing chip 121 and the memory 122 are connected via a bus, which can be a PCIe-based line, or a bus based on CXL, USB, or other protocols. Although not shown, the network interface card 120 may also include a power supply circuit that supplies power to the processing chip 121.
[0110] The processing chip 121 is the main processing unit of the network card 120 and its core unit, undertaking the main functions of the network card 120. For example, the data transmission operations required by the network card 120 can be performed by the processing chip 121. The processing chip 121 can execute some methods required by the first device 100 in the embodiment shown in Figure 4 below by calling computer program instructions in the memory 122.
[0111] This application does not limit the specific type of the processing chip. The processing chip 121 can be a data processing unit (DPU) chip, DSP, ASIC, FPGA, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Any component with processing functions can be used as the processing chip 121.
[0112] The memory 122 is capable of supporting the operation of the processing chip 121, and the memory 122 is used to store the data and / or computer program instructions required to perform the operation.
[0113] The type of memory 122 is similar to that of memory 130, as detailed above, and will not be repeated here. Memory 122 can be understood as the memory of network card 120.
[0114] As can be seen from the foregoing, data transmission is possible between the first device 100 and the second device 200; that is, the first device 100 can initiate a read request, and the second device 200 can provide a read response. This application embodiment does not limit the specific scenario of data transmission between the first device 100 and the second device 200. Any scenario where data transmission is achieved between different devices through message interaction is applicable to this application embodiment. The following is an example of a data transmission scenario—a data transmission scenario based on RDMA.
[0115] Figure 3 illustrates a data transmission scenario according to an embodiment of this application, showing a first device 100 and a second device 200. The first device 100 and the second device 200 can interact via RDMA.
[0116] Assuming the first device 100 is a storage-side device, the first device 100 can respond to data access from a computing-side device (such as the second device 200), such as writing data to the first device 100 or reading data from the first device 100.
[0117] From the perspective of the computing side (i.e., the second device 200), the second device 200 accesses the first device 100 mainly in two modes: one is write input / output (IO), that is, the second device 200 stores data in the first device 100; the other is read IO, that is, the second device 200 reads data from the first device 100.
[0118] Figure 3(a) illustrates the read I / O interaction flow. The second device 200 sends a SEND message (①) to the first device 100. This SEND message carries a first address, which is the address in the memory of the second device 200. Specifically, the SEND message is sent by the second device 200 via SEND in RDMA. This SEND message is initiated using SEND in RDMA.
[0119] First device 100 sends a SEND response (②) to second device 200, indicating that the SEND message has been received. First device 100 then sends a WRITE message (③) to second device 200, indicating that data D is to be written. The WRITE message carries a first address and the data D.
[0120] After receiving the WRITE message, the network card 120 on the second device 200 writes the data D into the memory of the second device 200 according to the first address, and sends a WRITE response (④) to the first device 100. The WRITE response indicates that the data D was successfully written.
[0121] During this process, the processor 110 (i.e., the core of the processor 110) on the second device 200 side does not need to participate. Instead, the network card 120 on the second device 200 side writes the data D into the memory of the second device 200.
[0122] Figure 3(b) illustrates the write I / O interaction flow. The second device 200 sends a SEND message (①) to the first device 100. This SEND message carries a second address, which is the address of data D in the memory of the second device 200.
[0123] First device 100 sends a SEND response (②) to second device 200, which indicates that the SEND message has been received. First device 100 sends a READ message (③) to second device 200, which indicates that data D is to be read and carries a second address.
[0124] After receiving the READ message, the network card 120 on the second device 200 reads the data D from the memory of the second device 200 according to the second address and sends a READ response (④) to the first device 100. The READ response carries the data D.
[0125] During this process, the processor 110 on the second device 200 side does not need to participate. Instead, the network card 120 on the second device 200 side reads the data D from the memory and feeds it back to the first device 100.
[0126] As can be seen from the write I / O interaction flow shown in Figure 3, the first device 100 can read data D from the second device 200 by sending a READ message. When there are multiple second devices 200, the first device 100 can send READ messages to each second device 200 respectively to request to read data from each second device 200.
[0127] In the write IO interaction process in this scenario, when the first device 100 needs to send multiple READ messages, it can control the number of READ messages sent by using some or all of the three mechanisms mentioned above, thereby controlling the number of READ responses received and reducing the congestion probability of READ responses.
[0128] The following describes a data transmission method provided by an embodiment of this application with reference to Figure 4. The method is illustrated by taking the interaction between the first device 100 and the second device 200 based on RDMA as an example.
[0129] Step 400: The first device 100 configures the initial value of the sending quota.
[0130] In this application embodiment, the concept of "sending limit" is introduced. As can be seen from the aforementioned description of Mechanism 2, the sending limit is a value that changes with the sending of read requests and the processing of read responses. The sending limit is the sending limit for read requests, which is the upper limit of read requests that can be sent.
[0131] If the first device 100 needs to implement mechanism two, an initial value for the transmission limit needs to be configured before the first device 100 communicates with the second device 200. This initial value for the transmission limit is related to the performance of the first device 100. Here, "performance" mainly refers to the first device 100's ability to send read requests and its ability to process read responses. The stronger the first device 100's ability to send read requests synchronously and the stronger its ability to process read responses, the larger the initial value of the transmission limit should be.
[0132] This application does not limit the specific method by which the first device 100 configures the initial value of the transmission limit. Any method of configuring the initial value of the transmission limit based on the performance of the first device 100 is applicable to this application.
[0133] Here are a few examples of initial values for the sending quota configured on the first device (100):
[0134] Example 1: When the sending of read requests and the processing of read responses are controlled by the processor 110 within the first device 100, the first device 100 (i.e., the processor 110) can configure the initial value of the sending limit based on the performance of the processor 110. In this embodiment of the application, "controlling the sending of read requests" refers to controlling the number of read requests sent using some or all of the three mechanisms mentioned above.
[0135] In this case, the processor 110 can maintain the transmission limit, that is, update the transmission limit as read requests are sent and read responses are processed.
[0136] Example 2: When the network card 120 controls the sending of read requests and the processor 110 completes the processing of read responses within the first device 100, the processor 110 in the first device 100 can configure the initial value of the current sending limit based on the network card 120 and the performance of the processor 110.
[0137] In this scenario, after configuring an initial value for the transmission limit, the processor 110 can transmit that initial value to the network interface card 120. The network interface card 120 can maintain this transmission limit, updating it as read requests are sent and read responses are processed. For example, during the sending of a read request, the current transmission limit is decreased; during the submission of a read response to the processor 110, the current transmission limit is increased.
[0138] Example 3: When the network card 120 controls the sending of read requests and the processor 110 completes the processing of the first read response, the network card 120 in the first device 100 can configure the initial value of the current sending limit based on the performance of the network card 120.
[0139] In this example, when configuring the initial value of the transmission limit in the network card 120 of the first device 100, the network card 120 may only consider the performance of the network card 120 itself, or it may configure the initial value of the concurrency based on the performance of the network card 120 and other relevant information.
[0140] Other relevant information includes, but is not limited to: the networking specifications of the first device 100, the bandwidth of the first device 100, the data transmission requirements of the first device 100, and the granularity of IO splitting.
[0141] The networking specification of the first device 100 indicates the number of second devices 200 that the first device 100 can connect to. The more second devices 200 the first device 100 connects to, the more complex the networking specification of the first device 100. The initial value of the transmission limit needs to be adapted to the networking specification of the first device 100. The simpler the networking specification of the first device 100, the fewer the number of first devices 100 connected to. In this case, a higher initial value of the transmission limit can be configured to ensure that the first device 100 can communicate with more connected second devices 200.
[0142] The bandwidth of the first device 100 describes the amount of data that the first device 100 can transmit per unit time. The larger the bandwidth of the first device 100, the greater the number of read requests that can be sent. This is because when configuring the initial value of the sending quota, the initial value of the sending quota can also be set to a higher value.
[0143] The data transmission requirements of the first device 100 describe the desired effect of data transmission, such as latency priority (i.e., ensuring efficient data transmission between the first device 100 and the second device 200) or bandwidth priority (i.e., ensuring efficient bandwidth utilization of the first device 100). When the data transmission requirement of the first device 100 is latency priority, it requires timely processing of read responses. In this case, a smaller initial value for the transmission limit can be configured. When the data transmission requirement of the first device 100 is bandwidth priority, it requires sending as many read requests as possible to improve bandwidth utilization. In this case, a larger initial value for the transmission limit can be configured.
[0144] IO splitting granularity involves the IO splitting mechanism. The "IO splitting mechanism" refers to the process where, when a first device 100 needs to read a large amount of data from a second device 200, it can split this large amount into multiple smaller amounts of data (smaller amounts refer to smaller data sets). This allows the first device 100 to read these smaller data sets separately from the second device 200, instead of reading the entire large amount of data at once. This IO splitting mechanism enables the first device 100 to concurrently read multiple smaller data sets, ensuring data transmission efficiency. IO splitting granularity indicates the degree to which the "large amount of data" is split into multiple "smaller amounts of data." This IO splitting mechanism will also be mentioned below. A larger IO splitting granularity indicates a larger amount of smaller data sets. In this case, the initial value of the sending threshold can be appropriately reduced to ensure that the first device 100 can process the read responses promptly. Conversely, a smaller IO splitting granularity indicates a smaller amount of smaller data sets. In this case, the initial value of the sending threshold can be appropriately increased to ensure that the first device 100 can receive and process a larger number of read responses.
[0145] Within the first device 100, the processor 110 can transmit the other relevant information to the network interface card (NIC) 120. After obtaining the other relevant information, the NIC 120 configures an initial value for the current transmission limit based on the other relevant information and the performance of the NIC 120. After configuring the initial value of the current transmission limit, the NIC 120 maintains the transmission limit. The method by which the NIC 120 maintains the transmission limit can be found in the foregoing description and will not be repeated here.
[0146] The following description uses the example of the first device 100 where the network card 120 controls the sending of read requests and the processor 110 completes the response to the read requests.
[0147] Step 401: The first device 100 establishes a connection with the second device 200. Optionally, the first device 100 configures the IO splitting granularity.
[0148] Establishing a connection is a necessary preparatory step before data transmission occurs between the first device 100 and the second device 200. During the connection establishment process, the first device 100 and the second device 200 exchange the parameters required for communication.
[0149] Taking RDMA as an example, during the connection establishment process, the first device 100 and the second device 200 need to exchange information about their respective queue pairs (QPs), such as the number of QP pairs and the identifier of the QP pairs. This ensures that there is a corresponding relationship between the QPs of the first device 100 and the QPs of the second device 200. That is, the read request to be sent in the send queue (SQ) of the QP of the first device 100 can be transmitted to the receive queue (RQ) of the QP of the second device 200.
[0150] In RDMA, the first device 100 can maintain multiple queue pairs, which means that the first device 100 can send multiple read requests concurrently through these multiple queue pairs.
[0151] The second device 200 can write second data into the first device 100 by writing I / O. Steps 402 to 410 are the interaction process between the second device 200 and the first device 100.
[0152] Step 402: The second device 200 sends an address message to the first device 100. This address message informs the first device 100 of the address of the target data. The address of the target data is the address of the data in the memory of the second device 200.
[0153] Step 403: The first device 100 splits the address of the target data into multiple sub-data addresses, generating multiple read requests. Each read request requests to read one sub-data, and each read request corresponds to one of the multiple sub-data addresses. This sub-data address is the address of the sub-data in the memory of the second device 200. This step can be executed by the processor 110 in the first device 100. The target data is the data that the first device 100 needs to read from the second device 200.
[0154] After receiving the address message, the first device 100 obtains the address of the target data on the second device 200 side. When the amount of the target data is large, the first device 100 can implement an IO splitting mechanism to split the second device 200 into multiple sub-data with smaller amounts of data.
[0155] In the first device 100, after generating multiple read requests, the processor 110 can transmit these read requests to the network interface card (NIC) 120 to instruct the NIC 120 to send the requests. Upon receiving the read requests, the NIC 120 selects one or more read requests from them, ensuring the number of selected requests does not exceed the current transmission limit. While sending the selected read requests, the NIC 120 reduces the current transmission limit. For unselected read requests, the NIC 120 can temporarily cache them. If the current transmission limit supports the sending of the unselected read requests (e.g., the current transmission limit is greater than a threshold), the NIC 120 continues to select one or more read requests from the cached requests, sends the selected read requests, and reduces the current transmission limit. The following description uses Mechanism 1, Mechanism 2, and Mechanism 3 within the first device 100 to control the sending process of read requests.
[0156] Within the first device 100, after generating multiple read requests, the processor 110 can directly transmit these multiple read requests to the network interface card 120, instructing the network interface card 120 to send the multiple read requests. Alternatively, the processor 110 can implement mechanism one, sending the multiple read requests to the network interface card 120 in stages; for details, please refer to step 404.
[0157] Step 404: The processor 110 of the first device 100 transmits the multiple read requests to the network card 120 in multiple installments. That is, the first device 100 transmits the multiple read requests to the network card 120 in multiple installments, sending a portion of the multiple read requests to the network card 120 each time. For ease of explanation, each read request sent by the first device 100 is referred to as a set of read requests. In other words, in step 404, the multiple read requests include multiple sets of read requests, and the first device 100 sequentially sends multiple sets of read requests to the second device 200.
[0158] There are many ways for the processor 110 of the first device 100 to transmit the multiple read requests to the network card 120 in multiple batches. One such method is listed here:
[0159] The processor 110 divides the multiple read requests into multiple groups of read requests. This application does not limit the way the processor 110 divides the multiple read requests. For example, the first device 100 may divide the multiple read requests into multiple groups of read requests based on the number of QP pairs on the first device 100 side, wherein the number of read requests included in each group of read requests is equal to the number of QP pairs.
[0160] Within the first device 100, after receiving a set of read requests, the network interface card 120 can directly send the set of read requests to the second device 200. Alternatively, the network interface card 120 can implement mechanism two, sending the set of read requests based on the current sending quota. For details, please refer to steps 405 to 406.
[0161] Step 405: After receiving a set of read requests, network interface card 120 selects one or more read requests from the set of read requests based on its current sending capacity. The selected read requests are the read requests that network interface card 120 can currently send.
[0162] The current sending limit describes the upper limit of read requests that the network card 120 can send at present. Therefore, the number of read requests that the network card 120 can send at present cannot exceed the current sending limit.
[0163] There are many ways for the network interface card 120 to select read requests from the group of read requests based on the current sending limit. For example, the network interface card 120 can select a number of read requests equal to the current sending limit as target read requests from the group of read requests. Another example is that the network interface card 120 can select a number of read requests equal to a set value as target read requests from the group of read requests. This set value can be a limit difference, which is the difference between the current sending limit and a threshold. Alternatively, the set value can be the product of the current sending limit and a set percentage (such as 50% or 80%).
[0164] Step 406: Network card 120 sends the selected read request and reduces the current sending limit.
[0165] After selecting a read request, the network interface card 120 sends the selected read request. The network interface card 120 then reduces its current transmission limit by subtracting a first quantity value from the current transmission limit. This first quantity value represents the number of read requests sent. The network interface card 120 can reduce the current transmission limit by one for each read request sent.
[0166] For the remaining read requests in this group of read requests, excluding the selected read request, the network interface card 120 can cache these remaining read requests. If the current transmission limit allows for the transmission of these remaining read requests, then the remaining read requests can be sent. In other words, for the remaining read requests, the network interface card 120 can select a read request from the remaining read requests based on the current transmission limit. If it cannot select one, such as if the current transmission limit becomes zero, or if the set value is equal to zero, it must wait for the current transmission limit to be updated until it can select a read request from the remaining read requests based on the current transmission limit.
[0167] Step 407: The second device 200 receives a read request from the first device 100. For any read request received, the second device 200 reads sub-data according to the read request.
[0168] Step 408: The second device 200 sends a read response to the first device 100, which carries sub-data.
[0169] Step 409: The first device 100 receives the read response and increases the current sending limit.
[0170] When the read response is processed by the processor 110 within the first device 100, the network interface card 120, upon receiving the read response, can submit it to the processor 110. During the submission of the read response to the processor 110, the network interface card 120 can increment its current transmission limit by a second value, which is the data of the read vector submitted by the network interface card 120 to the processor 110. The network interface card 120 can increment its current transmission limit by one for each read response submitted to the processor 110.
[0171] When processing a read response, the processor 110 parses the read response, obtains sub-data from it, and stores the sub-data (e.g., first stores the sub-data in the memory of the first device 100, and then persists the sub-data to the external memory of the first device 100).
[0172] When the read response is received within the first device 100, the network interface card (NIC) 120 processes it. During this processing, the NIC 120 increments the current transmission limit by a third value, which represents the data of the read vector processed by the NIC 120. The NIC 120 can increment the current transmission limit by one for each read response processed. The way the NIC 120 processes the read response is similar to that of the processor 110; details can be found in the foregoing description and will not be repeated here.
[0173] The first device 100 also supports mechanism 3. The implementation of mechanism 3 is explained below. For details, please refer to step 410.
[0174] Step 410: The first device 100 determines whether the target conditions are met. If the target conditions are met, the PFC backpressure mechanism is triggered. That is, the first device 100 sends a backpressure signal to the second device 200, informing the second device 200 to postpone reading the response. This step can be performed by the network card 120.
[0175] The embodiments of this application do not limit the specific content of the target condition. For example, the target condition is related to the processing progress of the read response, and the target condition can be that the number of read responses to be processed is greater than a quantity threshold. As another example, the target condition is related to the current sending limit, and the target condition can be that the current sending limit is less than a limit threshold.
[0176] Here, taking the target condition of the current sending amount being less than the threshold as an example, the network card 120 can periodically determine whether the target condition is met. For example, the network card 120 periodically checks the current sending amount. When it detects that the current sending amount is less than the threshold, it determines that the target condition is met and triggers the PFC backpressure mechanism.
[0177] Priority-based flow control (PFC) is a technology that uses priority to control traffic. Here's a simplified explanation of its principle: As shown in Figure 5, the transmitting interface of device A is divided into eight priority queues, while the receiving interface of device B has eight receive buffers. Each priority queue of device A corresponds to one receive buffer. When a receive buffer on device B's receiving interface becomes congested, device B can send a backpressure signal to device A. Upon receiving this backpressure signal, device A can stop transmitting traffic (i.e., data) from the priority queue corresponding to the congested receive buffer. In this embodiment, priority queues are not involved; the first device 100 can send a backpressure signal to the second device 200 when the target condition is determined.
[0178] Based on the same inventive concept as the method embodiments, this application also provides a transmission device for executing the method performed by the network card of the first device in the method embodiments shown in FIG4. Related features can be found in the above method embodiments, and will not be repeated here. This transmission device can be understood as a software form of the network card mentioned in the foregoing description. As shown in FIG6, the transmission device 600 includes an acquisition module 601, a transmission module 602, and an adjustment module 603.
[0179] The acquisition module 601 is used to acquire multiple remote direct memory access (RDMA) read requests to be sent from the processor of the first device via a bus.
[0180] The sending module 602 is configured to select one or more RDMA read requests from a plurality of RDMA read requests and send the selected RDMA read requests to other devices communicating with the first device, wherein the number of selected RDMA read requests does not exceed the current sending limit of the RDMA read requests.
[0181] Adjustment module 603 is used to reduce the current transmission amount during the transmission of the selected RDMA read request.
[0182] As one possible implementation, the sending module 602 determines the initial value of the sending quota based on the performance of the network card.
[0183] As one possible implementation, the acquisition module 601 acquires multiple RDMA read requests from the processor in multiple steps; each time, it acquires one set of RDMA read requests from the processor, and the multiple RDMA read requests include multiple sets of RDMA read requests.
[0184] For any given set of RDMA read requests, the sending module 602 selects one or more RDMA read requests from the set of RDMA read requests and sends the selected RDMA read requests, wherein the number of selected RDMA read requests does not exceed the current sending limit.
[0185] As one possible implementation, the target data to be read includes multiple sub-data, and each RDMA read request is used to request the reading of one sub-data of the target data. The RDMA read request corresponds to the address of one of the multiple sub-data.
[0186] In one possible implementation, the network card also includes a receiving module 604, which receives a response to an RDMA read request; and an adjustment module 603, during the period when the receiving module 604 receives a response to an RDMA read request, increases the current transmission limit.
[0187] As one possible implementation, the sending module sends a backpressure signal when the target condition is met. The backpressure signal indicates that the response to the RDMA read request should be postponed. The target condition is that the current sending amount is not greater than the amount threshold.
[0188] The transmission device 600 of this application embodiment can correspond to the method executed by the network card of the first device described in this application embodiment, and the above and other operations and / or functions of each module in the transmission device 600 are respectively to implement the corresponding process of the first device in FIG4. For the sake of brevity, they will not be described in detail here.
[0189] It should be noted that the module division in this embodiment is illustrative and represents only one logical functional division; in actual implementation, there may be other division methods. The functional modules in this embodiment can be integrated into one module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules can be implemented in hardware or as software functional modules.
[0190] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive (SSD).
[0191] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0192] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more blocks of the flowchart illustrations and / or one or more blocks of the block diagrams.
[0193] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.
[0194] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.
[0195] Those skilled in the art can make various modifications and variations to this application without departing from the scope of this application, and this application is also intended to include such modifications and variations.
Claims
1. A remote direct memory access data transfer method, characterized in that, The method includes: The network card of the first device obtains multiple Remote Direct Memory Access (RDMA) read requests to be sent from the processor of the first device via the bus. The network interface card selects one or more RDMA read requests from the plurality of RDMA read requests and sends the selected RDMA read requests to other devices communicating with the first device, wherein the number of selected RDMA read requests does not exceed the current sending limit of the RDMA read requests; The network card reduces the current transmission limit while sending the selected RDMA read request.
2. The method as described in claim 1, characterized in that, The method further includes: The initial value of the transmission limit is determined based on the performance of the network card.
3. The method as described in claim 1 or 2, characterized in that, The network interface card (NIC) of the first device obtains multiple Remote Direct Memory Access (RDMA) read requests to be sent from the processor of the first device via the bus, including: The network interface card obtains the multiple RDMA read requests from the processor in multiple transactions; The network interface card selects multiple RDMA read requests from the multiple RDMA read requests, including: Each time, the network card obtains a set of RDMA read requests from the processor, and the multiple RDMA read requests include multiple sets of RDMA read requests. For any set of RDMA read requests, the network interface card selects one or more RDMA read requests from the set of RDMA read requests and sends the selected RDMA read requests, wherein the number of selected RDMA read requests does not exceed the current sending limit.
4. The method according to any one of claims 1 to 3, characterized in that, The target data to be read includes sub-data, and each RDMA read request is used to request the reading of one of the sub-data, the RDMA read request carrying the address of the sub-data.
5. The method according to any one of claims 1 to 4, characterized in that, After the network card sends the selected RDMA read request, it also includes: The network card receives the response to the RDMA read request and increases the current transmission limit.
6. The method according to any one of claims 1 to 4, characterized in that, The method further includes: When the target condition is met, the network card sends a backpressure signal, which indicates that the response to the RDMA read request should be postponed. The target condition is that the current sending amount is not greater than the amount threshold.
7. A transmission device, characterized in that, The transmission device is deployed on the network interface card (NIC) of the computing device, and the transmission device includes: The acquisition module is used to acquire multiple Remote Direct Memory Access (RDMA) read requests to be sent from the processor of the first device via the bus; The sending module is configured to select one or more RDMA read requests from the plurality of RDMA read requests and send the selected RDMA read requests to other devices communicating with the first device, wherein the number of selected RDMA read requests does not exceed the current sending limit of the RDMA read requests; An adjustment module is used to reduce the current transmission amount during the transmission of the selected RDMA read request.
8. The apparatus as claimed in claim 7, characterized in that, The sending module is further configured to: The initial value of the transmission limit is determined based on the performance of the network card.
9. The apparatus as claimed in claim 7 or 8, characterized in that, The acquisition module is used for: The plurality of RDMA read requests are obtained from the processor in multiple steps; each time, a set of RDMA read requests is obtained from the processor, and the plurality of RDMA read requests include multiple sets of RDMA read requests; The sending module is configured to select one or more RDMA read requests from any set of RDMA read requests and send the selected RDMA read requests, wherein the number of selected RDMA read requests does not exceed the current sending limit.
10. The apparatus according to any one of claims 7 to 9, characterized in that, The target data to be read includes multiple sub-data. Each RDMA read request is used to request the reading of one of the sub-data. The RDMA read request corresponds to the address of one of the multiple sub-data.
11. The apparatus according to any one of claims 7 to 10, characterized in that, The network interface card further includes a receiving module, the receiving module being used for: Receive the response to the RDMA read request; The adjustment module is also used to increase the current transmission quota during the period when the receiving module receives the response to the RDMA read request.
12. The apparatus according to any one of claims 7 to 11, characterized in that, The sending module is further configured to: If the target condition is met, a backpressure signal is sent, which indicates that the response to the RDMA read request should be postponed. The target condition is that the current sending amount is not greater than the amount threshold.
13. A network interface card (NIC), characterized in that, The network interface card includes a processing chip and a power supply circuit. The power supply circuit is used to supply power to the processing chip, and the processing chip is used to execute the method as described in any one of claims 1 to 6.
14. A computing device, characterized in that, The computing device includes a network interface card and a processor: The processor is configured to send multiple RDMA read requests to be sent to the network card via the bus; The network interface card is used to obtain the plurality of RDMA read requests from the processor via the bus; Select one or more RDMA read requests from the plurality of RDMA read requests, and send the selected RDMA read requests to other devices communicating with the computing device, wherein the number of selected RDMA read requests does not exceed the current sending limit of RDMA read requests; During the transmission of the selected RDMA read request, the current transmission limit is reduced.
15. The device as claimed in claim 14, characterized in that, The network interface card is also used for: The initial value of the transmission limit is determined based on the performance of the network card.
16. The device as claimed in claim 14 or 15, characterized in that, The network interface card is used for: The plurality of RDMA read requests are obtained from the processor in multiple batches; Each time, a set of RDMA read requests is obtained from the processor, wherein the plurality of RDMA read requests includes multiple sets of RDMA read requests; For any set of RDMA read requests, select one or more RDMA read requests from the set of RDMA read requests and send the selected RDMA read requests, wherein the number of selected RDMA read requests does not exceed the current sending limit.
17. The device according to any one of claims 14 to 16, characterized in that, The processor is also used for: The address of the target data to be read is split into multiple sub-data addresses; The plurality of RDMA read requests are generated, and each RDMA read request corresponds to one of the plurality of sub-data addresses.
18. The device according to any one of claims 14 to 17, characterized in that, The network interface card is also used for: Upon receiving a response to an RDMA read request, the current transmission limit is increased.
19. The device according to any one of claims 14 to 18, characterized in that, The network interface card is also used for: When the target condition is met, the network card sends a backpressure signal, which indicates that the response to the RDMA read request should be postponed. The target condition is that the current sending amount is not greater than the amount threshold.