A portion of the disclosure of this patent document contains material that is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure, as it appears in the Patent and Trademark Office patent file or records, but otherwise reserves all copyright rights whatsoever.
1. Field of the Invention
This invention relates to network arrangements and protocols for real-time communications. More particularly, this invention relates to interconnection and transfer of information or other signals between, memories, input/output devices or central processing units by remote direct memory access.
2. Description of the Related Art
The meanings of certain acronyms and abbreviations used herein are given in Table 1.
RDMA is a direct memory access from the memory of one computer into that of another without involving either one's operating system. Common RDMA implementations include RDMA over converged Ethernet (RoCE), InfiniBand and iWARP. RDMA supports a limited set of atomic operations:
(1) Fetch-and-add (FAAD). This atomically modifies the contents of a memory location: set x to x+a, where x is a memory location and a is some value.
Data in the location prior to the add operation is returned to the requestor. When this operation is executed in a concurrent environment, no other process ever sees an intermediate result.
(2) Compare-and-swap (CAS). This operation reads remote data, compares it with a compare value, and if they are equal, swaps the remote data with given swap data. Atomicity of the CAS operation assures that the new value is calculated based on up-to-date information; if the remote data had been updated by another thread in the meantime, the substitution would fail. The result of the operation should indicate whether the substitution succeeded or failed.
RDMA is often mediated by a message passing protocol. Message Passing Interface (MPI) is a communication protocol that is widely used for exchange of messages among processes in high-performance computing systems. Such systems typically use RDMA transport. With MPI, a user can define a group of processes, called a communicator. Each communicator has a unique communicator identifier (an integer) with respect to all other communicators on the system.
In one example, U.S. Patent Application Publication No. 2010/0106948 proposes management of a shared message queue that involves RDMA access to the queue. Processing devices cooperate to process the queue data. When one processing device successfully accesses queue data, the queue data is locked for the exclusive use of that processing device. The processing device is able to process the data and return processed queue data.
Embodiments of the present invention extend the currently supported atomic operations over RDMA transport by enabling atomic access to a generic object pool. The object pool can be accessed through a network by network interface controllers in a fully offloaded way, i.e., without any involvement by a host processor. Atomicity of the operation on the responder node is assured even in the presence of multiple agents accessing the same data structure. The object pool can contain a series of objects of any size or type, and the data can have any structure.
There is provided according to embodiments of the invention a method of communication, which is carried out in a fabric of network elements that includes a first network element and a second network element. The second network element has an object pool to be accessed stored in its memory. The method is carried out by initiating a request in the first network element for a remote direct memory access to the memory of the second network element, transmitting the request through the fabric to the second network element, accessing a designated member of the object pool by atomically executing the request, and returning a result of the execution of the request through the fabric to the first network element.
According to one aspect of the method, accessing the pool is performed by an atomic get operation that retrieves one of the objects of the pool.
According to yet another aspect of the method, the pool is arranged as a first-in-first-out queue, and returning a result includes retrieving the next object of the queue. The access may include dequeuing the next object.
According to still another aspect of the method, the pool is arranged as a last-in-first-out queue, and returning a result includes retrieving the next object of the queue. The access may include dequeuing the next object.
According to a further aspect of the method, accessing the pool is performed by adding a new object to the pool in an atomic push operation.
According to an additional aspect of the method, the pool is arranged as a first-in-first-out queue and adding a new object includes enqueuing the new object.
According to still another aspect of the method, the pool is arranged as a last-in-first-out queue and adding a new object includes enqueuing the new object.
According to another aspect of the method, atomically executing the request is controlled independently by a device connected to a host computer.
There is further provided according to embodiments of the invention a fabric of network elements including a first network element and a second network element. The second network element has a memory and a pool of objects stored in the memory. The first network element is operative for initiating a request for a remote direct memory access to the memory of the second network element, transmitting the request through the fabric to the second network element, accessing the pool by atomically executing the request, and returning a result of the execution of the request through the fabric to the first network element.
The first network element can include a network interface card. An atomic controller for controlling execution of atomic operations can be located in the network interface card.
For a better understanding of the present invention, reference is made to the detailed description of the invention, by way of example, which is to be read in conjunction with the following drawings, wherein like elements are given like reference numerals, and wherein:
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the various principles of the present invention. It will be apparent to one skilled in the art, however, that not all these details are necessarily always needed for practicing the present invention. In this instance, well-known circuits, control logic, and the details of computer program instructions for conventional algorithms and processes have not been shown in detail in order not to obscure the general concepts unnecessarily.
Documents incorporated by reference herein are to be considered an integral part of the application except that, to the extent that any terms are defined in these incorporated documents in a manner that conflicts with definitions made explicitly or implicitly in the present specification, only the definitions in the present specification should be considered.
A “switch fabric” or “fabric” refers to a network topology in in which network nodes interconnect via one or more network switches (such as crossbar switches), typically through many ports. The interconnections are configurable such that data is transmitted from one node to another node via designated ports. A common application for a switch fabric is a high performance backplane.
An “object pool” is a group of reachable data objects residing in a memory. When the group is ordered the “next object” in the pool is the object next to be accessed when the objects are processed in order.
An “atomic operation” acting on shared memory appears to complete in a single step relative to other processes or threads. When an atomic store is performed on a shared variable, no other thread or process can observe the modification half-complete. When an atomic load is performed on a shared variable, it reads the entire value as it appeared at a single moment in time. When an atomic modify operation is performed, no other thread or process can observe intermediate values.
Embodiments of the invention provide access to an object pool using an RDMA transport network. An object pool is a generic data structure used to organize data in a particular way. Common ways to organize data in the object pool include FIFO, LIFO and list:
An object in this context is a set of bits and can be at any size.
Fetch-and-add and compare-and-swap provide a limited functionally for RDMA applications. Application writers use them to implement semaphores or distributed access to arrays. However, these operations cannot be directly used to implement more complex algorithms, such as selecting the next integer from a pool of integers. This kind of selection can be used in MPI communicator creation to give the next communicator identifier in a fully offloaded way. In communicator creation, all of the communicator processes receive the next integer from an integer pool and use it as a communicator identifier. When a communicator is destroyed, the communicator identifier is returned to the integer pool.
In another example, an application prepares a global pool of data segments for use by remote processes in a fabric. Each process needing data obtains its next data segment from the global pool. When finished with one data segment, it can again access the global pool to obtain the next one. Conventionally, this is performed by the combination of a fetch-and-add operation followed by an RDMA read operation (RDMA_READ). This involves two round trips through the fabric, using the object pool. The requesting process then must process the atomic response, and create the RDMA_READ operation. As a result there are two dependent operations instead of one atomic operation.
Reference is now made to
Reference is now made to
Embodiments of the invention extend the RDMA atomic fetch-and-add and compare-and-swap operations by enabling atomic access to a generic object pool. The atomic access operations over RDMA transport are completely offloaded, i.e., they do not require software involvement of a host processor or by the host CPU. Rather, they are accomplished in an add-on device, such as an NIC that is linked to the host. The object pool can contain objects at any size or type, and the data can have any structure. Atomicity of the operation on a responder node of a network is assured in the presence of multiple agents or processes accessing the same data structure in the object pool. The inventive embodiments are indifferent to the organization of the object pool. For example, the object pool could be organized as a FIFO, LIFO or list. The object pool location can be in any network element, e.g., host memory, an NIC or in a switch.
Commands used to handle the object pool in accordance with an embodiment of the invention include, for example atomic-get and atomic-push operations, as well as other actions such as accessing the top of a queue without dequeuing and actions accessing a particular element in the queue. An atomic-get operation results in the “next object” in the pool being returned to the requester. The next object depends on the organization of the object pool. For example, if the object pool is an ordered list of objects {a1, a2, a3 . . . }, and the object a1 was the last object accessed prior to an atomic-get operation that is about to be executed on that object pool, then the object a2 is the next object and will be returned in the atomic-get operation. The next object for FIFO and LIFO object pools will be understood likewise and may, but not necessarily, involve dequeuing the next object.
A list of exemplary atomic operations that may be accomplished by application of the principles of the invention follows:
Reference is now made to
Reference is now made to
An application 72 comprises software code that uses a hardware driver 74 in order to access a remote or local memory object pool, such as the object pool 68, and to obtain the next object in the pool. When the object pool is unorganized, the atomic operations may result in access of a random element. In one embodiment, the driver 74 translates InfiniBand verbs into hardware-specific commands. An exemplary verb definition in an InfiniBand embodiment that implements an atomic operation directed to an object pool according to the principles of the invention is given in Listing 1.
lbv_exp_obj_pool_access(ibv_qp*qp, ibv_obj_pool pool, ibv_obj_pool_op operation, void*data) Listing 1
The parameters in Listing 1 are as follows:
Qp: the requester queue pair (QP) on which the operation is performed. The transport of the Qp must be reliable.
Pool: remote object pool the requester intends to access.
Op: operation to be performed on the object pool, e.g., pop/push/top.
Data: specific fields according to operations. For example, a push operation requires an object pointer that needs to be pushed. A pop operation requires a memory pointer to store the pop response.
InfiniBand verbs are described in the document Mellanox IB-Verbs API (VAPI), Mellanox Software Programmer's Interface for InfiniBand Verbs, (2001), available on the Internet or from Mellanox Technologies, Inc., 2900 Stender Way, Santa Clara, Calif. 95054, which is herein incorporated by reference. The driver 74 controls a packet sender 76, which is responsible to transmit data packets into a fabric. An atomic controller 78 handles atomic operations via the fabric, and is responsible for assuring atomicity of the operation. In addition, the atomic controller 78 passes information in response to the atomic operation to the packet sender 76 for relay to the requester of the operation.
In an atomic-get operation, the application 72 calls the corresponding function or verb, such as a suitably modified version of the standard verb ibv_post_sent, which is translated by the driver 74 into a command for an NIC or other network element. In the InfiniBand implementation, the command is a work queue element 80 (WQE). The work queue element 80 is communicated to the packet sender 76 and thence to an object pool, e.g., object pool 68, in a remote target (not shown) via the fabric. Alternatively the work queue element 80 could access a local object pool, in which case the packet sender 76 executes a loopback operation.
At the remote target the atomic controller 78 controls the timing of the execution of the atomic-get, coordinating the execution with regard to other atomic operations that are being performed on the object pool 68. When the atomic controller 78 determines that the atomic-get can be executed, the atomic controller 78 reads the next object from the object pool 68 using RDMA, according to the particular organization of the objects in the pool, as described above. When the next object is fetched, the atomic controller 78 passes it to the packet sender 76 for relay to the requester, which in this example is the application 72.
The sequence for an atomic-push operation is similar to the atomic-get, except that a new element is inserted into the object pool 68. In the case of FIFO and LIFO queues, the atomic push operation enqueues a new object. In another example, the atomic push operation may insert an element into a linked list. The atomic controller 78 relays the result of the atomic-push operation to the requester, e.g., the status of the object pool 68, which may be empty, full, or somewhere in between.
Reference is now made to
The request for the atomic operation 82 waits in the wait queue 86 for its turn to be served. An atomic operation can be served if there is no other operation ahead in the queue that is directed to the same area of the object pool. In other words, different atomic operations directed to disjoint areas of the object pool can execute concurrently, because none of the different operations influences the outcomes of the others. The required atomic ordering is enforced by logic in the atomic controller 78 that controls the wait queues 86, 88.
When the request for the atomic operation 82 reaches the head of the wait queue 86, it can operate on associated object pool 90. A single atomic operation may involve multiple writes or reads in the object pool 90 using RDMA, depending on the characteristics of the object pool 90.
When the atomic operation completes, it is removed from the wait queue 86. The atomic controller 78 creates a send descriptor for the result as appropriate to the particular atomic operation. In case the wait queue 86 becomes empty, it is freed and can be reallocated for a subsequent atomic operation. The reallocated work queue may relate to the object pool 90 or a different object pool.
It will be appreciated by persons skilled in the art that the present invention is not limited to what has been particularly shown and described hereinabove. Rather, the scope of the present invention includes both combinations and sub-combinations of the various features described hereinabove, as well as variations and modifications thereof that are not in the prior art, which would occur to persons skilled in the art upon reading the foregoing description.
This Application claims the benefit of U.S. Provisional Application No. 62/304,348, filed 7 Mar. 2016, which is herein incorporated by reference.
Number | Name | Date | Kind |
---|---|---|---|
5434975 | Allen | Jul 1995 | A |
5913213 | Wikstrom et al. | Jun 1999 | A |
5948062 | Tzelnic et al. | Sep 1999 | A |
5987552 | Chittor et al. | Nov 1999 | A |
6038651 | Van Huben et al. | Mar 2000 | A |
6044438 | Olnowich | Mar 2000 | A |
6092155 | Olnowich | Jul 2000 | A |
6108764 | Baumgartner et al. | Aug 2000 | A |
6154816 | Steely et al. | Nov 2000 | A |
6275907 | Baumgartner et al. | Aug 2001 | B1 |
6338122 | Baumgartner et al. | Jan 2002 | B1 |
6490662 | Pong et al. | Dec 2002 | B1 |
6523066 | Montroy et al. | Feb 2003 | B1 |
7376800 | Choquette | May 2008 | B1 |
7496698 | Biran et al. | Feb 2009 | B2 |
7640545 | Kuman et al. | Dec 2009 | B2 |
7688838 | Aloni et al. | Mar 2010 | B1 |
8213315 | Crupnicoff et al. | Jul 2012 | B2 |
8761189 | Shachar et al. | Jun 2014 | B2 |
9164702 | Nesbit et al. | Oct 2015 | B1 |
9563426 | Bent et al. | Feb 2017 | B1 |
9699110 | Goldenberg et al. | Jul 2017 | B2 |
20030084038 | Balogh et al. | May 2003 | A1 |
20040193734 | Barron | Sep 2004 | A1 |
20050144339 | Wagh et al. | Jun 2005 | A1 |
20060123156 | Moir | Jun 2006 | A1 |
20070079075 | Collier et al. | Apr 2007 | A1 |
20090113443 | Heller, Jr. et al. | Apr 2009 | A1 |
20100017572 | Koka et al. | Jan 2010 | A1 |
20100106948 | Bellows | Apr 2010 | A1 |
20100191711 | Carey et al. | Jul 2010 | A1 |
20100313208 | Zarzycki | Dec 2010 | A1 |
20110099335 | Scott et al. | Apr 2011 | A1 |
20110239043 | Vedder et al. | Sep 2011 | A1 |
20120023295 | Nemawarkar | Jan 2012 | A1 |
20120179877 | Shriraman et al. | Jul 2012 | A1 |
20120310987 | Dragojevic et al. | Dec 2012 | A1 |
20120311213 | Bender et al. | Dec 2012 | A1 |
20130019000 | Markus et al. | Jan 2013 | A1 |
20130290473 | Chen et al. | Oct 2013 | A1 |
20140025884 | Stark et al. | Jan 2014 | A1 |
20140040551 | Blainey et al. | Feb 2014 | A1 |
20140040557 | Frey et al. | Feb 2014 | A1 |
20140047060 | Chen et al. | Feb 2014 | A1 |
20140047205 | Frey et al. | Feb 2014 | A1 |
20140068201 | Fromm | Mar 2014 | A1 |
20140101390 | Sohi et al. | Apr 2014 | A1 |
20140181823 | Manula et al. | Jun 2014 | A1 |
20150052313 | Ghai et al. | Feb 2015 | A1 |
20150052315 | Ghai et al. | Feb 2015 | A1 |
20150095600 | Bahnsen et al. | Apr 2015 | A1 |
20150100749 | Koker et al. | Apr 2015 | A1 |
20150253997 | Kessler et al. | Sep 2015 | A1 |
20150254104 | Kessler et al. | Sep 2015 | A1 |
20150254182 | Asher et al. | Sep 2015 | A1 |
20150254183 | Akkawi et al. | Sep 2015 | A1 |
20150254207 | Kessler | Sep 2015 | A1 |
20150269116 | Raikin et al. | Sep 2015 | A1 |
20160043965 | Raikin et al. | Feb 2016 | A1 |
Entry |
---|
“RFC 7306, Remote Direct Memory Access (RDMA) Protocol Extensions”, Internet Engineering Task Force, ISSN: 2070-1721, Jun. 2014 [retrieved on Jan. 4, 2019]. Retrieved from the Internet: <URL: https://tools.ietf.org/pdf/rfc7306>. (Year: 2014). |
Dragojevic et al. “FaRM: Fast Remote Memory”, 11th USENIX Symposium on Networked Systems Design and Implementation, Apr. 4, 2014 [retrieved on Jan. 4, 2019]. Retrieved from the Internet: <URL: https://www.usenix.org/system/files/conference/nsdi14/nsdi14-paper-dragojevic.pdf>. (Year: 2014). |
U.S. Appl. No. 14/665,043 office action dated Aug. 25, 2017. |
European Application # 171597461 Search Report dated Jul. 25, 2017. |
Hammond et al., “Transactional Memory Coherence and Consistency”, Proceedings of the 31st annual international symposium on Computer architecture, vol. 32, issue 2, 12 pages, Mar. 2004. |
InfiniBand Architecture Specification, vol. 1, Release 1.2.1, 1727 pages, 2007. |
Supplement to InfiniBand Architecture Specification vol. 1.2.1, Annex A14: “Extended Reliable Connected (XRC) Transport Service”, Revision 1.0, 43 pages, Mar. 2, 2009. |
Raman, A, “Transactional Memory-Implementation”, Lecture 1, Princeton University, 63 pages, Fall 2010. |
PCI Express® Base Specification, Revision 3.1 , 1073 pages, Mar. 2014. |
Mellanox Technologies, Inc. “Mellanox IB-Verbs API (VAPI)”, Mellanox Software Programmer's Interface for InfiniBand Verbs, 78 pages, year 2001. |
U.S. Appl. No. 15/659,876 office action dated Apr. 24, 2019. |
CN Application # 2017101219749 office action dated Jun. 19, 2019. |
Number | Date | Country | |
---|---|---|---|
20170255590 A1 | Sep 2017 | US |
Number | Date | Country | |
---|---|---|---|
62304348 | Mar 2016 | US |