Method, device, and product for data transmission
Abstract
A method includes acquiring a first allocation request for a channel from a first thread. The method further includes locking a first group of channels for the first thread, where a plurality of channels in the first group of channels correspond to a plurality of remote direct memory access (RDMA) devices, the first thread submits first data to a first RDMA device corresponding to a first channel in the first group of channels, and a first completion channel corresponds to the first channel. The method further includes detecting whether the first data exists in the first completion channel. The method further includes releasing the first group of channels in response to the first data existing in the first completion channel. The method can improve the flexibility and transmission efficiency of data transmission for a scenario of synchronous data transmission.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 2 · Forward citations: 0.
Claims (20 — 3 Independent, 17 Dependent)
- Claim 1Independent Claim
A method for data transmission, comprising: acquiring a first allocation request for a channel from a first thread; locking a first group of channels for the first thread, wherein a plurality of channels in the first group of channels correspond to a plurality of remote direct memory access (RDMA) devices, the first thread submits first data to a first RDMA device corresponding to a first channel in the first group of channels, and a first completion channel corresponds to the first channel; detecting whether the first data exists in the first completion channel; and releasing the first group of channels in response to the first data existing in the first completion channel.
- Claim 2Depends on #1
The method according to claim 1, wherein the first group of channels is a first group of queue pairs, the first group of queue pairs is provided with an iterator, the iterator indicates a first queue pair, and the method further comprises: modifying the iterator of the first group of queue pairs to indicate a second queue pair in the first group of queue pairs in response to a failure in the first queue pair, wherein the second queue pair is different from the first queue pair; and submitting, by the first thread, the first data to a second RDMA device corresponding to the second queue pair.
- Claim 3Depends on #2
The method according to claim 2, wherein the first completion channel is a first completion queue corresponding to the first queue pair, the first thread is provided with a first list, the first list indicates a transmission state of each piece of data among the first data, and after detecting whether the first data exists in the first completion channel, the method further comprises: updating, in response to the first portion of data among the first data existing in the first completion queue, the first list to indicate successful transmission of the first portion of data, wherein the first portion of data comprises at least one piece of data; and submitting, by the first thread, the first data to the second RDMA device corresponding to the second queue pair comprises: submitting, by the first thread, data other than the first portion of data among the first data to the second RDMA device based on the first list.
- Claim 4Depends on #2
The method according to claim 2, wherein the iterator indicates the first queue pair, and the method further comprises: acquiring a second allocation request for a queue pair from the first thread; locking the first group of queue pairs for the first thread; modifying the iterator of the first group of queue pairs to indicate a third queue pair, wherein the third queue pair is different from the first queue pair, the first thread submits second data to a third RDMA device corresponding to the third queue pair, and a third completion queue corresponds to the third queue pair; detecting whether the second data exists in the third completion queue; and releasing the first group of queue pairs in response to the second data existing in the third completion queue.
- Claim 5Depends on #4
The method according to claim 4, further comprising: acquiring a third allocation request for a queue pair from a second thread; locking the first group of queue pairs for the second thread; modifying the iterator of the first group of queue pairs to indicate a fourth queue pair, wherein the fourth queue pair is different from the first queue pair, the second thread submits third data to a fourth RDMA device corresponding to the fourth queue pair, and a fourth completion queue corresponds to the fourth queue pair; detecting whether the third data exists in the fourth completion queue; and releasing the first group of queue pairs in response to the fourth RDMA device having transmitted the third data.
- Claim 6Depends on #2
The method according to claim 2, wherein the RDMA devices corresponding to each queue pair in the first group of queue pairs are different from each other.
- Claim 7Depends on #1
The method according to claim 1, wherein the first channel is a first queue pair, the first queue pair comprises a transmission queue, the first completion channel is a first completion queue corresponding to the first queue pair, and the method further comprises: detecting whether the first data exists in the transmission queue; determining that an RDMA device corresponding to the first queue pair has received the first data in response to the first data existing in the transmission queue; detecting whether a completion queue entity for the first data exists in the first completion queue in response to the first data not existing in the transmission queue; and determining that the first RDMA device has transmitted the first data in response to the completion queue entity for the first data existing in the first completion queue.
- Claim 8Depends on #7
The method according to claim 7, further comprising: detecting a transmission state of transmission data in the transmission queue; re-transmitting the transmission data in response to transmission failure of the transmission data in the transmission queue; and constructing a completion queue entity for the transmission data in the first completion queue in response to a successful transmission of the transmission data.
- Claim 9Depends on #8
The method according to claim 8, further comprising: accessing the first completion queue; retrieving a completion queue entity for each piece of data among the first data from the first completion queue; determining that the first data has been transmitted in response to the completion queue entity for each piece of data being retrieved; and eliminating the completion queue entity for each piece of data from the first completion queue.
- Claim 10Depends on #9
The method according to claim 9, further comprising: repeatedly performing retrieval in the first completion queue in response to the failure to retrieve the completion queue entity for each piece of data.
- Claim 11Independent Claim
An electronic device, comprising: a processor; and a memory coupled to the processor and having instructions stored thereon, wherein the instructions, when executed by the processor, cause the electronic device to perform actions comprising: acquiring a first allocation request for a channel from a first thread; locking a first group of channels for the first thread, wherein a plurality of channels in the first group of channels correspond to a plurality of remote direct memory access (RDMA) devices, the first thread submits first data to a first RDMA device corresponding to a first channel in the first group of channels, and a first completion channel corresponds to the first channel; detecting whether the first data exists in the first completion channel; and releasing the first group of channels in response to the first data existing in the first completion channel.
- Claim 12Depends on #11
The electronic device according to claim 11, wherein the first group of channels is a first group of queue pairs, the first group of queue pairs is provided with an iterator, the iterator indicates a first queue pair, and the actions further comprise: modifying the iterator of the first group of queue pairs to indicate a second queue pair in the first group of queue pairs in response to a failure in the first queue pair, wherein the second queue pair is different from the first queue pair; and submitting, by the first thread, the first data to a second RDMA device corresponding to the second queue pair.
- Claim 13Depends on #12
The electronic device according to claim 12, wherein the first completion channel is a first completion queue corresponding to the first queue pair, the first thread is provided with a first list, the first list indicates a transmission state of each piece of data among the first data, and after detecting whether the first data exists in the first completion channel, the actions further comprise: updating, in response to the first portion of data among the first data existing in the first completion queue, the first list to indicate successful transmission of the first portion of data, wherein the first portion of data comprises at least one piece of data; and submitting, by the first thread, the first data to the second RDMA device corresponding to the second queue pair comprises: submitting, by the first thread, data other than the first portion of data among the first data to the second RDMA device based on the first list.
- Claim 14Depends on #12
The electronic device according to claim 12, wherein the iterator indicates the first queue pair, and the actions further comprise: acquiring a second allocation request for a queue pair from the first thread; locking the first group of queue pairs for the first thread; modifying the iterator of the first group of queue pairs to indicate a third queue pair, wherein the third queue pair is different from the first queue pair, the first thread submits second data to a third RDMA device corresponding to the third queue pair, and a third completion queue corresponds to the third queue pair; detecting whether the second data exists in the third completion queue; and releasing the first group of queue pairs in response to the second data existing in the third completion queue.
- Claim 15Depends on #14
The electronic device according to claim 14, wherein the actions further comprise: acquiring a third allocation request for a queue pair from a second thread; locking the first group of queue pairs for the second thread; modifying the iterator of the first group of queue pairs to indicate a fourth queue pair, wherein the fourth queue pair is different from the first queue pair, the second thread submits third data to a fourth RDMA device corresponding to the fourth queue pair, and a fourth completion queue corresponds to the fourth queue pair; detecting whether the third data exists in the fourth completion queue; and releasing the first group of queue pairs in response to the fourth RDMA device having transmitted the third data.
- Claim 16Depends on #12
The electronic device according to claim 12, wherein the RDMA devices corresponding to each queue pair in the first group of queue pairs are different from each other.
- Claim 17Depends on #11
The electronic device according to claim 11, wherein the first channel is a first queue pair, the first queue pair comprises a transmission queue, the first completion channel is a first completion queue corresponding to the first queue pair, and the actions further comprise: detecting whether the first data exists in the transmission queue; determining that an RDMA device corresponding to the first queue pair has received the first data in response to the first data existing in the transmission queue; detecting whether a completion queue entity for the first data exists in the first completion queue in response to the first data not existing in the transmission queue; and determining that the first RDMA device has transmitted the first data in response to the completion queue entity for the first data existing in the first completion queue.
- Claim 18Depends on #17
The electronic device according to claim 17, wherein the actions further comprise: detecting a transmission state of transmission data in the transmission queue; re-transmitting the transmission data in response to transmission failure of the transmission data in the transmission queue; and constructing a completion queue entity for the transmission data in the first completion queue in response to a successful transmission of the transmission data.
- Claim 19Depends on #18
The electronic device according to claim 18, wherein the actions further comprise: accessing the first completion queue; retrieving a completion queue entity for each piece of data among the first data from the first completion queue; determining that the first data has been transmitted in response to the completion queue entity for each piece of data being retrieved; and eliminating the completion queue entity for each piece of data from the first completion queue.
- Claim 20Independent Claim
A non-volatile memory having machine-executable instructions stored therein, wherein the machine-executable instructions, when executed by a processor, cause the processor to perform actions comprising: acquiring a first allocation request for a channel from a first thread; locking a first group of channels for the first thread, wherein a plurality of channels in the first group of channels correspond to a plurality of remote direct memory access (RDMA) devices, the first thread submits first data to a first RDMA device corresponding to a first channel in the first group of channels, and a first completion channel corresponds to the first channel; detecting whether the first data exists in the first completion channel; and releasing the first group of channels in response to the first data existing in the first completion channel.
Technical Overview & Description
CROSS-REFERENCE TO RELATED APPLICATION This patent application claims priority, under 35 U.S.C. § 119, of Chinese Patent Application No. 202410516849.8, filed Apr. 26, 2024, which is incorporated by reference in its entirety. TECHNICAL FIELD The present disclosure relates to the field of computers, and more particularly relates to a method, device, and computer program product for data transmission. BACKGROUND Generally, network communication modes involve a large number of system context switches and data copies between user space and kernel space during data transmission, thereby resulting in a relatively high latency and CPU load. In contrast, Remote Direct Memory Access (RDMA) technology allows user programs to bypass an operating system kernel and directly interact with a network card for network communication, thereby significantly improving data transmission efficiency and reducing latency. Queue Pairs (QPs) play an important role in RDMA technology. Each QP consists of a transmission queue and a receiving queue, which are jointly responsible for data transmission and receiving. The use of QP enables RDMA communication to perform data transmission directly between memories without the intervention of an operating system. SUMMARY OF THE INVENTION Embodiments of the present disclosure provide a method, device, and computer program product for data transmission. In a first aspect of the embodiments of the present disclosure, a method for data transmission is provided. The method includes acquiring a first allocation request for a channel from a first thread. The method further includes locking a first group of channels for the first thread, where a plurality of channels in the first group of channels correspond to a plurality of remote direct memory access (RDMA) devices, the first thread submits first data to a first RDMA device corresponding to a first channel in the first group of channels, and a first completion channel corresponds to the first channel. The
Cited By — Indexed Forward Citations (0 of 0 total)
No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.
References Cited — Backward Prior Art (2)
| Patent | Title | Year | Citations |
|---|