Non-disruptive failover of RDMA connection

Information

  • Patent Grant
  • 9537710
  • Patent Number
    9,537,710
  • Date Filed
    Thursday, December 19, 2013
    10 years ago
  • Date Issued
    Tuesday, January 3, 2017
    7 years ago
Abstract
A novel RDMA connection failover technique that minimizes disruption to upper subsystem modules (executed on a computer node), which create requests for data transfer. A new failover virtual layer performs failover of an RDMA connection in error so that the upper subsystem that created a request does not have knowledge of an error (which is recoverable in software and hardware), or of a failure on the RDMA connection due to the error. Since the upper subsystem does not have knowledge of a failure on the RDMA connection or of a performed failover of the RDMA connection, the upper subsystem continues providing requests to the failover virtual layer without interruption, thereby minimizing downtime of the data transfer activity.
Description
FIELD OF THE INVENTION

Embodiments described herein relate generally to computer systems and more particularly to non-disruptive failover of Remote Direct Memory Access (RDMA) connection.


BACKGROUND

RDMA technology reduces processor workload in the transmission and reception of data across a network between two computer nodes by transferring data directly from memory of local computer node to memory of a remote computer node without involving remote node CPU. RDMA technology is typically implemented by a specialized hardware which resides on each computer node. An RDMA write operation transfers data from the memory of a local computer node directly to the memory of a remote computer node; an RDMA read operation requests transfer of data from the memory of a remote computer node directly to the memory of local computer node. Each RDMA connection uses a pair of memory data structures, a send queue and a receive queue, that allows the computer node to post work requests to the RDMA capable hardware. There is also a completion queue that stores completion notifications for the submitted work requests. A send queue, a receive queue and a completion queue are referred to as a queue structure (QS) throughout this document. Once the RDMA connection is established, a computer node can post a request in a queue (send or receive queue). Each queue stores a request from the time it is posted by the node until the time it is processed. An interconnect adapter on the node is then notified by an interconnect driver on the same node that the request is posted. It reads the request in the queue and does the actual data transfer over a network. After the data are received, the interconnect adapter at the computer node that receives the data writes data directly to destination memory at the second computer node. Then a completion result is sent back to the first computer node. The interconnect adapter at the first computer node posts the result to its completion queue.


According to RDMA protocols and known implementations, when an error occurs in a queue structure (QS), all pending requests in the QS are flushed and returned in error. Then QS management logic destroys the QS in error and creates a new QS for the purpose of establishing a new connection. The error status is communicated to an upper subsystem module (such as a file system, for example), which stops posting requests until the new QS is created. This, in turn, disrupts operation of the applications using the RDMA connection. Accordingly, it is highly desirable to maintain RDMA connection between two or more computer nodes barring legitimate error cases, e.g.—transient software or hardware errors when processing an I/O request.


One useful application of RDMA technology is controller failover in a cluster storage environment in which a first computer node may have a predetermined failover “partner” node (a second computer node) that may take over or resume storage services of the first computer node upon failure at the first computer node. For received write requests from a client(s), a node may produce write logs and store them in its non-volatile storage device (from which, the node may at a later time flush the write logs to the storage devices). To ensure data consistency and provide high data availability, the write logs may also be stored remotely to a non-volatile storage device at a partner node. The transfer of write logs between two partner nodes in a cluster storage system typically takes place using the RDMA technology so that data in a local non-volatile storage device at a first computer node may be transferred directly to a non-volatile storage device of a second computer node to provide failover protection (e.g., in case the first computer node crashes).


Currently, when an error occurs on an RDMA connection (for example, during the transfer of write logs to a partner node), the error status is communicated to the upper subsystem on the first computer node. Since the RDMA connection is in error, the first computer node no longer transfers the write logs to its partner node, thereby making the logs unsynchronized. As a result, high availability functionality is no longer available to the clients accessing the nodes. As a corollary to this, one computer node can no longer initiate takeover of its partner node, thereby causing disruption to the clients when something happens to either one of the nodes. Accordingly, it is desirable to significantly increase RDMA connection uptime between the nodes for purposes of RDMA transfer.


SUMMARY

Embodiments described herein provide a novel failover technique that minimizes disruption to upper subsystem modules (executed on a computer node), which create requests for data transfer. A new failover virtual layer performs failover of an RDMA connection in error between one or more computer nodes so that the upper subsystem that created a request does not learn about a failure (other than the physical link failure or unrecoverable hardware failure) on the RDMA connection. Since the upper subsystem does not have knowledge of a failure on the RDMA connection or of a performed failover of the RDMA connection, the upper subsystem continues providing requests to the failover virtual layer without interruption, thereby minimizing downtime of the data transfer activity. Embodiments described herein provide non-disruptive failover for errors, which can be recoverable in software and hardware. For example, when I/O processing rate is slower than incoming I/O request rate and a send or receive queue cannot accommodate more I/O requests, a new failover virtual layer can provide additional request buffering to alleviate this problem.


More specifically, according to one embodiment described herein, the new failover virtual layer creates virtual queue structures (QS) in memory on a computer node. The term QS as used herein includes a send queue, a receive queue, and a completion queue. The queue structure is identified by memory addresses. While the memory addresses of the virtual queue structure are provided to the upper subsystem modules via QS handles, these addresses are not provided to an interconnect adapter that performs transfer of data over the RDMA connection. The failover virtual layer also creates physical queue structures in memory, each queue identified by a memory address. In contrast to the virtual queue structures, the memory addresses of the physical queue structures are not provided to the upper subsystem modules while they are provided to the interconnect adapter that performs transfer of data over the RDMA connection. The new failover virtual layer associates a virtual queue structure with one or more physical queue structures. Thus, while in conventional approaches, memory addresses of physical queue structures are provided to the interconnect adapter, which uses them to access the physical queue structures. According to the novel virtual failover technique, the memory addresses of virtual queue structures are not provided to the interconnect adapter.


When a failure occurs on an RDMA connection (such that a request cannot be posted on a physical queue structure for various reasons) the failover virtual layer marks in error the physical queue structure storing a request. In addition, the result of the transmission (e.g., failure) is posted to a completion queue corresponding to the physical queue structure. Importantly, since the upper subsystem module is not provided with the memory addresses of the physical queue structure and completion queue, the upper subsystem module is not aware of the failure. As a result, the upper subsystem continues posting requests to the failover virtual layer without interruption.


The failover virtual layer identifies a second physical queue structure that is not in error and moves outstanding requests from the physical queue structure in error to the second physical queue structure. Once the requests are moved to the second physical queue structure and data are successfully transferred over the RDMA connection, the result of the completion (i.e., success) is posted to a completion queue of the second physical queue structure. The failover virtual layer then moves the “successful” completion status to completion queue of the virtual queue structure. At this point, the upper subsystem becomes aware of the successful completion of the request. Thus, the failover virtual layer makes the upper subsystem immune from the failure occurring on an underlying RDMA connection. The novel failover virtual layer advantageously helps to increase high availability uptime between nodes in a cluster environment when an error occurs on RDMA connection. Since the failover can be performed transparently to the upper subsystem modules, these modules continue posting requests to the failover virtual layer without being aware of the error. As a result, synchronization of the write logs is continued between two or more nodes in a cluster and the nodes can provide high availability functionality to clients without interruption.


Other applications of the inventive techniques include non-disruptive failover of RDMA connection involving sending status information between two computer nodes in a cluster. Such a transmission can be performed using RDMA connection directly from a memory location of a first storage node to a memory location of its partner node over a network. Other uses of the novel techniques involve non-disruptive RDMA transfer of data blocks between two or more nodes in a cluster. Thus, the inventive failover virtual layer provides for non-disruptive failover of an RDMA connection regardless of the nature of the RDMA transfer.





BRIEF DESCRIPTION OF THE DRAWINGS

One or more embodiments of the present invention are illustrated by way of example and not limitation in the figures of the accompanying drawings, in which like references indicate similar elements and in which:



FIG. 1 is a schematic block diagram of an exemplary cluster environment in which some embodiments operate;



FIG. 2 is a schematic block diagram of various components of an exemplary node shown in FIG. 1;



FIG. 3A is a schematic block diagram of the software and hardware components used to perform RDMA transfer according to prior art techniques;



FIG. 3B is a schematic block diagram of the software and hardware components to perform RDMA failover according to inventive embodiments described herein.



FIG. 4 is a block diagram of various queues in the virtual queue structures and physical queue structures according to inventive embodiments described herein;



FIG. 5A is a block diagram of an exemplary data structure for storing information about virtual queue structures and association between virtual queue structures and one or more physical queue structures according to inventive embodiments described herein;



FIG. 5B is a block diagram of an exemplary data structure for storing information about physical queue structures according to inventive embodiments described herein;



FIG. 6 is a flow diagram illustrating a process of establishing an RDMA connection between two nodes shown in FIG. 1 according to inventive embodiments described herein;



FIG. 7 is a flow diagram illustrating transfer of data between two nodes shown in FIG. 1 according to inventive embodiments described herein; and



FIG. 8 is a flow diagram illustrating a failover mechanism of an RDMA connection according to inventive embodiments described herein.





DETAILED DESCRIPTION

Cluster Environment



FIG. 1 illustrates a block diagram of one embodiment of an environment including a cluster 100 configuration. Those skilled in the art would understand that the cluster environment is shown in order to describe one possible application of the inventive techniques for providing a failover mechanism of an RDMA connection. The novel techniques can be implemented in any environment supporting RDMA transfer between a first and a second computer node over a network. Those skilled in the art would understand that the novel techniques can be implemented in an N-way system among two or more nodes. The cluster system configuration includes nodes 200a and 200b coupled by a dedicated high performance interconnect, e.g. 210, which implements RDMA data transmission, using, for example, InfiniBand, or iWARP (Internet Wide Area RDMA Protocol) with different RDMA architectures such as the Virtual Interface Architecture (VIA) or Open Fabrics Alliance architecture (OFA). For ease of description, node 200a is said to be a source node and node 200b is said to be a target node. Data can be transferred over interconnect 210 using RDMA protocol.


Each node is configured for providing data access services to clients connected with the node. When a failure occurs within node 200a so that node 200a is no longer capable of processing access requests for clients 140, the partner node 200b is configured to automatically resume or take over the data-access service functions provided by the failed node 200a. As such, when a node failure occurs, access requests sent from clients 140 to the failed node 200a may be re-directed to the partner node 200b for processing and execution. Note that failure of a node may occur unintentionally or intentionally (e.g., where a node is taken offline for servicing). Those skilled in the art would understand that although FIG. 1 illustrates one pair of partner nodes 200a and 200b, the cluster configuration may include more than one such pair, or the cluster configuration may have “N” interconnected nodes, where N is an integer greater than one. Continuing with the description of FIG. 1, in one embodiment, the nodes 200a and 200b may be storage servers in a storage server cluster. Alternatively, other types of nodes in cluster configurations may be used. The node 200a is coupled to storage devices 150a, which includes multiple storage devices (e.g., disks). It should be noted that while node 200a is connected to storage devices 150a, node 200a is also connected to and capable of reading to and from storage devices 150b since it is a partner node of node 200b. Similarly, while node 200b is connected to storage devices 150b, it is also connected to and is capable of reading to and from storage devices 150a. The node 200b is coupled to storage devices 150b, which includes multiple storage devices (e.g., disks). Storage devices 150a and 150b can be disks, solid state storage devices, such as flash memory, non-volatile storage device (NVRAM), Magnetic Random Access Memory (MRAM), Phase Change RAM (PRAM), etc. The storage devices can be organized as one or more RAID groups.


The nodes 200a and 200b are also coupled through a network 120 to a number of clients 140 (hereinafter simply “clients”). The nodes 200a and 200b receive and respond to various read and write requests from the clients 140, relating to volumes, directories, LUNs, files, blocks, objects, and/or other units of data stored in (or to be stored in) the storage devices 150a and 150b. The clients 140 may submit access requests by issuing packets using file-based access protocols, such as the Common Internet File System (CIFS) protocol or Network File System (NFS) protocol, over the Transmission Control Protocol/Internet Protocol (TCP/IP) when accessing information in the form of files and directories. The clients may also submit requests by issuing packets using block-based access protocols, such as the Small Computer Systems Interface (SCSI) protocol encapsulated over TCP (iSCSI) and SCSI encapsulated over Fibre Channel (FCP). Nodes 200a and 200b are capable of providing clients with both file-level access and block-level access. Each of the clients 140 may be, for example, a conventional personal computer (PC), workstation, or the like. Network 120 may be, for example, a local area network (LAN), a metropolitan area network (MAN), a virtual private network (VPN), a wide area network (WAN), a global area network (GAN) such as the Internet, or other type of network or combination of networks. The network 120 may implement, for example, Ethernet protocol, Fibre Channel Protocol (FCP), or another protocol or a combination of protocols.


As described earlier, the interconnect connection between the two or more nodes (i.e. Interconnect 210) can be disrupted for various reasons, such as when an input/output (I/O) processing rate is slower than the incoming I/O workload, which means that the requests cannot be posted to send or receive queues. If the interconnect connection between the two or more nodes is disrupted, the logs at the local node are no longer mirrored to the partner node, thereby making high availability functionality no longer available. As a consequence, when one node is no longer able to process write or read requests from clients, a partner node can no longer initiate a takeover due to the disrupted interconnect connection, thereby causing disruption to the clients. As illustrated in FIG. 1, each node in the cluster includes an interconnect adapter 232(RNIC), which implements RDMA protocol. Using the RNIC, a source node (e.g., node 200a) initiates a connection with its partner node (such as target node 200b), while the partner node accepts the connection. The RNIC may enable a RDMA read, RDMA write and send/receive operations. For example, an RDMA write operation transfers data from a memory, e.g., 224 (shown in FIG. 2) of one node (e.g., node 200a) to a memory of a partner node (e.g., node 200b).


To ensure data consistency and provide high data availability, data in a non-volatile storage device at a source node may be mirrored to a target non-volatile storage device of a target node. To this end, node 200a may further mirror the write logs in local log cache 170 to remote log cache (shown in FIG. 2) for guaranteeing completion of write requests on storage devices. When node 200a is not able to accept read/write requests, node 200b may then access log cache on node 200b to execute any remaining write operations uncompleted by node 200a. Consistency between log caches 170 is thus desirable to enable completion of write requests on storage devices 150.


Components of a Node



FIG. 2 is a schematic block diagram of an exemplary node 200a or 200b that may be implemented in cluster 100. Node 200a may illustratively be embodied as a storage system comprising a processor 222, a memory 224, a network adapter 225, a cluster access adapter 226, a storage adapter 228 and non-volatile storage, e.g., NVRAM 230. These components can be interconnected by a system bus 223. Direct memory transmission between two or more nodes can be performed using an interconnect adapter (or device) 232, which can be implemented as a RDMA enabled remote network interface card (RNIC) supporting RDMA protocol.


Network adapter 225 comprises a plurality of ports adapted to couple node 200 to one or more clients 140 over point-to-point links, wide area networks, virtual private networks implemented over a public network (Internet) or a shared local area network. Network adapter 225 thus may comprise the mechanical, electrical and signaling circuitry needed to connect the node to the network. Each client 140 may communicate with node 200 over network 120 by exchanging discrete frames or packets of data according to pre-defined protocols, such as TCP/IP.


Cluster access adapter 226 may comprises a plurality of ports adapted to couple a pair of partner nodes 200a and 200b to other pairs in the cluster through a cluster switching fabric, which is not shown in FIG. 1 or FIG. 2. In the illustrative embodiment, Ethernet is used as the clustering protocol and interconnect media, although it will be apparent to those skilled in the art that other types of protocols and transports may be utilized within the cluster architecture described herein.


Storage adapter 228 cooperates with storage operating system 300 stored in memory and executed by processor 222 to access data requested by clients 140. Storage of data of storage devices can be organized as one or more volumes that comprise a collection of e.g., disks. The disks within a volume/file system are typically organized as one or more groups, wherein each group may be operated as a Redundant Array of Independent (or Inexpensive) Disks (RAID).


Memory 224 illustratively comprises storage locations that are addressable by the processor 222 and adapters 225, 226, 228 for storing program instructions and data in some embodiments. The processors and adapters may, in turn, comprise processing elements and/or logic circuitry configured to execute the instructions and manipulate the data stored in memory 224. In some embodiments, memory 224 may comprise a form of random access memory (RAM) comprising “volatile” memory that is generally cleared by a power cycle or other reboot operation.


Storage operating systems 300, portions of which are typically resident in memory 224 and executed by the processing elements, functionally organizes node 200 by invoking operations in support of the storage services implemented by the node. It will be apparent to those skilled in the art that other processing and memory means, including various computer readable media, may be used for storing and executing program instructions pertaining to the invention described herein. In some embodiments, the storage operating system 300 comprises a plurality of software layers that are executed by processor 222. These software layers are described in more detail in reference to FIG. 3B.


Nov-volatile storage element, such as NVRAM 230 locally stores information relating to access requests from clients 140. Preferably, NVRAM may be implemented to store write logs corresponding to write requests from clients 140 in the event of a system shutdown or other unforeseen problem. To that end, write logs may be generated by storage operating system 300 upon receipt of a write request from client 140 for carrying out the requested write operation at a later time. All or a predetermined portion of NVRAM may thus be implemented as a log cache 170 for storing write logs for deferred write requests. Log cache can be stored on other type of media or device suitable for storing instructions and data thereon.


Interconnect adapter (device) 232 may be implemented as a RNIC to support RDMA operations defined by the RDMA protocol. RNIC at each node typically implements the RDMA protocol. Interconnect adapter can be a commercially available product.


At this point, it is useful to describe how a typical RDMA connection is established to transfer data between two computing devices, such as storage systems 200a and 200b. Such a connection may be established, for example, in order to send write logs between the storage systems. To assist with the understanding how a typical RDMA transfer takes place over an established RDMA connection, FIG. 3A is provided.



FIG. 3A illustrates various components of a computer node (such as node 200 shown in FIG. 1) used to establish RDMA connection between two or more nodes according to known implementations. FIG. 3A illustrates various modules executed in the operating system 300. These modules are upper subsystem 310 modules and an interconnect layer 320. The upper subsystem modules 310 may include a file system (which can be implemented as a Write Anywhere File System (WAFL) provided by NetApp, Inc. of Sunnyvale, Calif.), a redundant array of inexpensive disks (RAID) subsystem, or any other subsystem that creates a data request, which is provided to the interconnect layer 320). The interconnect layer 320 of the operating system 300 may include the following components: a queue structure (QS) management module 330, a pool of physical queue structures 340, and an interconnect driver 350. Queue structure management module 330 is responsible for creating physical queue structures (which include a send queue, a receive queue, and a completion queue), in response to a request from the upper subsystem 310. An exemplary queue structure is shown in FIG. 4 and described below in reference to FIG. 4. As will be described in more detail below, queue structure management module 330 is also responsible for connecting the queue structures at a first computer node with queue structures at a second computer node connected over a network. Physical QS pool 340 is essentially a number of physical queue structures created by a QS management module 330 under direction of a module in the upper subsystem 310. Each request is stored in the send queue or receive queue from the time it is posted by the QS management module until the time it is processed. The memory needed to create a physical queue structure may be allocated from the node's memory (e.g., 224) or from any other accessible resources by the interconnect adapter. The allocated memory addresses are usually contiguous. Physical QSs should be distinguished with virtual QSs, which are created by a novel failover virtual layer (shown in FIG. 3B). A notable distinction between a physical queue structure and a virtual queue structure in that while the memory addresses of a physical queue structure are provided to the interconnect adapter 232, which can access requests from the physical QS, the memory addresses of a virtual queue structure are not provided to the interconnect adapter, as will be described in greater detail below. The virtual QSs are accessible only to the upper subsystem via QS handles, which means that the memory handles of the VQS are provided to the upper subsystem. In conventional approaches, memory addresses of physical queue structures are provided to the interconnect adapter, which uses them to access the physical queue structures. According to the novel virtual failover technique, the memory addresses of virtual queue structures are not provided to the interconnect adapter.


Still with reference to FIG. 3A, the operating system 300 further includes an interconnect driver 350 configured to manage the interconnect adapter 232. Interconnect driver 350 is responsible for establishing connection between the two or more nodes and notifying the upper subsystem that the connection is established. As part of setting up the connection, physical QSs are created at the second computer node.


It is now useful to describe how a typical RDMA connection is established according to existing known techniques. Initially, the upper subsystem initiates a call to the QS management module to create physical QSs in memory, e.g., 224. Thus, creating the QSs essentially means creating data structures in memory and providing addresses of QSs in memory to the interconnect adapter. The QS management module then instructs the interconnect adapter to connect physical QSs at the source node with the physical QSs at the destination node by exchanging information, as defined by the RDMA protocol. As part of this procedure, physical QSs may be created at the target node if they are not already present.


After the connection is established, the upper subsystem may send an RDMA write request to the QS management module. The request includes a source address (location in memory from which data to be transferred) and a destination address (location in memory where data to be stored as part of the RDMA operation). The QS management module posts the request into the physical send queue. Posting the request essentially means recording the request in a memory location (send queue in this case). The queue structure management module notifies the interconnect adapter, e.g., 232, at the source node, that a new request is posted to the QS. Once the interconnect adapter receives notification, it uses the memory addresses of the QS to access the request. From the request, it identifies memory location of the data. The interconnect adapter accesses the data in memory (in the example of mirroring write logs between two storage systems, the data may include the write logs to be mirrored at the partner storage system). The interconnect adapter sends the data along with the destination addresses to the second computer device.


When the request arrives at the second computer device, e.g., 200b, the interconnect adapter (e.g., 232 shown in FIG. 1) at 200b reads the destination address from the request and stores the data to the destination address in memory.


Interconnect adapters at the storage systems 200a and 200b are capable to communicate with each other using the RDMA protocol. The interconnect adapter at the storage system 200a receives a completion status from the target partner node. Completion status can be marked as “successful” or “failure”, for example. The status is posted into the completion queue associated with a physical QS where the request was posted.


As described herein, when an error occurs on the RDMA connection, the queues are transitioned to an error state so that all outstanding requests are returned in error to the completion queue, thereby disabling RDMA connection. The upper subsystem then instructs the interconnect layer to create a new QS and tries to reestablish the connection after the failure is observed. In the meantime, the upper subsystem stops creating new requests until the new connection is established. All failed requests and any additional requests are sent over the new connection. To minimize the downtime of the RDMA connection and minimize disruption to the upper protocol modules, the novel failover virtual layer is provided, as described below.


Failover Virtual Layer



FIG. 3B illustrates node 200 executing operating system 300, which in turn includes a novel failover virtual layer 320 configured to minimize disruption to the upper subsystem modules. As illustrated in FIG. 3B, upper subsystem 312 communicates with the failover virtual layer 322 by creating requests and providing the requests to the failover virtual layer. Upper subsystem also receives completion results from the failover virtual layer 322. Thus, failover virtual layer 322 is an intermediary between the upper subsystem and the interconnect adapter.


Failover virtual layer 322, in turn, includes the following components: a virtual queue structure management module 370, a monitoring module 380, a request scheduling module 360, and an interconnect driver 350. Importantly, the failover virtual layer 322 creates virtual QSs 343 and physical QSs 345, as described herein.


Upper subsystem 312 may be a file system (which can be implemented as a Write Anywhere File System (WAFL) provided by NetApp, Inc. of Sunnyvale, Calif.), a redundant array of inexpensive disks (RAID) subsystem, or any other subsystem that creates requests for data transfer and provides them to the failover virtual layer.


Virtual queue structure management module 370 is configured to create virtual QSs and physical QSs. Addresses of physical QSs are registered with the interconnect adapter, which means they are communicated to the interconnect adapter. As such, physical QSs are accessible to the interconnect adapter. Addresses of virtual QSs are not communicated to the interconnect adapter, thereby “hiding” the virtual QSs from the interconnect adapter. Virtual QS management module is further configured to perform failover of RDMA connection when an error is detected on an existing RDMA connection. Importantly, the failover is performed in such a way that the upper subsystem is not aware of the error. Virtual QS management module further maintains information about virtual QSs and physical QSs. Virtual QS management module 370 interacts with the request scheduling module 360a and monitoring module 380. Module 370 communicates with the interconnect adapter 232 via interconnect drivers 350. For example, module 370 passes to interconnect driver 350 address of a physical QS where a request(s) is posted. The interconnect adapter uses this information to access the request from the QS, access data in the memory where the data are stored, and perform RDMA transfer of the data over the interconnect.


Request scheduling module 360 of the failover virtual layer 322 is configured to select a physical queue structure where a request should be posted. Module 360 is responsible for moving the requests from a virtual QS to the physical QS as well as moving a completion status from the physical QS to the virtual QS. Scheduling module 360 is also configured to load balance the requests among physical QSs. According to novel techniques described herein, physical queue structures can be active and standby. An active queue structure is a queue structure where the request is posted for transmission while a standby queue structure is a queue structure that does not have a request queued to it. Those skilled in the art would understand that requests can only be posted to active queue structures. Thus, module 360 is configured to identify available active physical queue structure by, for example, querying a data structure in memory, which maintains information about physical queue structures (e.g., data structure 500 and 502 shown in FIG. 5). A decision as to which queue structure to choose can be based, for example, on the work load of a queue structure, capability of a queue structure, as well as other factors. When a request is sent from the upper subsystem module to a virtual queue structure, the request scheduling module is configured to determine which physical queue structure should store the request. Interconnect driver 350 is responsible for managing interconnect adapter(s) and for passing communication between physical queue structure pool and the interconnect adapter.


Monitoring module 380 is responsible for monitoring physical queue structures to determine if a queue structure is in the error state. If the physical queue structure is in the error state, monitoring module 380 notifies VQS management module 370 so that it won't be used by the scheduling module 360 for posting a new request.


Virtual QSs 343 are data structures created in memory by the virtual QS management module 370. Referring now to FIG. 4, which illustrates exemplary virtual QS in more detail. An exemplary virtual QS, in one implementation, can have a send queue 412, a receive queue 414, and a completion queue 416. Send queue is a queue where module 360 posts requests to do RDMA read, write and send operations; a receive queue 414 is where module 360 posts receive requests, and a completion queue 416 is where the completion results are posted. Exemplary completion results can be “success” and “failure”. Each queue can have a number of buffers, each buffer, for example, can store a request. A queue can be identified by an address in memory. Such address is provided to the upper subsystem via the QS handle. Importantly, an address of a virtual QS is not provided to the interconnect adapter, thereby preventing the interconnect adapter from directly notifying the virtual QS about the completion status. As such, the VQS are not accessible to the interconnect adapter. Upon creation of the virtual QS, virtual QS management module provides a receive size and a transmit size of its queues. The size of a queue essentially indicates the number of send or receive requests that can be posted to a queue. Virtual QSs are used by virtual QS module to post the requests prior to posting them to the physical QSs, thereby acting as buffers for requests prior to them being posted to the physical QS. Any number of virtual QSs can be created as long as the memory capacity permits.


Physical QSs 345 are data structures created in memory by the virtual QS module. As demonstrated in FIG. 4, an exemplary physical QS can have a send queue 422, a receive queue 424, and a completion queue 426 where the completion results, such as “success” or “failure” are posted. Each physical queue can have a number of buffers, each buffer, for example, can store a request. A queue can be identified by an address in memory. Such an address is provided to an interconnect adapter on the node where the QSs are created. Importantly, the addresses of physical QSs are not provided to the upper subsystem module, thereby making the upper subsystem unaware of a potential failure in the physical QS. Upon creation of the physical QS, virtual QS management module provides a receive size and a transmit size of its queues. A virtual QS can be associated with more than one physical QS. Thus, although FIG. 4 illustrates only two physical QSs, any number of physical QSs can be created.


At this point, it is useful to describe various methods performed by the novel failover virtual layer 322. The description that follows is divided into three sections. The “Creation of Virtual and Physical QSs” section describes novel mechanism of creation of virtual QSs and physical QSs and associating virtual queue structures with physical queue structures. The “Data Transfer on RDMA Connection” section describes a novel process of servicing a request over a network using RDMA connection. The “Failover of RDMA Connection” section discusses failover of RDMA connection when an error is detected. It should be noted that each section recites multiple steps, as will be described in reference to FIGS. 6 through 8.


Creation of Virtual and Physical QSs


Referring now to FIG. 6, a flowchart is provided to illustrate various steps to generate virtual queue structures (VQS) and to connect virtual queue structures and physical queue structures with remote virtual queue structures and physical queue structures. Initially, at step 610, the virtual queue structure management module receives a request from the upper subsystem to create a QS for data transfer to and from its peer upper subsystem at the target node.


In response to the request, virtual QS management module creates a virtual queue structure by allocating memory buffers in memory (e.g., 224) for the queue structure, which may include a send queue, a receive queue, and a completion queue (step 615). Virtual queue structure management module provides queue structure attributes, such as a queue size. Importantly, the virtual queue management module does not register the created virtual queue structures with the interconnect adapter, which essentially means that the addresses of the virtual queues in memory are not communicated to the interconnect adapter. As described herein, “registering queue structures with the interconnect adapter” means communicating the memory addresses of the queue structures to the interconnect adapter. Thus, the interconnect adapter cannot access VQS and VQSs are used as a staging area before the requests are posted to the physical queues.


Once the virtual queue structures are created, the virtual queue structure management module notifies the upper subsystem module and returns a handle associated with the virtual queue structure. Such a handle is used to uniquely identify the virtual queue structure. It should be noted that module 370 can create as many virtual queue structures as the memory capacity permits.


At step 620, virtual queue structure management module 370 at a source node creates physical queue structures and registers the physical queue structures with the interconnect adapter at the first computer node. Registering physical queue structures with the interconnect adapter means communicating the memory addresses of the queue structures to the interconnect adapter. Other information that is typically passed to the interconnect adapter upon queue structure creation may include capabilities of the queues and the number of requests supported. It should be noted here that unlike known implementations, which were described in reference to FIG. 3A, the upper subsystem modules are not aware of the physical queue structures created by the virtual queue structure management module. Thus, from the upper subsystem standpoint, only virtual queue structures are created. This distinction is important since an error on a physical queue structure is not communicated to the upper subsystem modules directly, as described in more detail herein.


Still with reference to FIG. 6, at step 630, after the upper subsystem module receives the handle uniquely identifying the created virtual queue structure(s), such as ID, the upper subsystem initiates connection between the two or more nodes through the virtual queue structure management module. In the known prior art implementations, a physical queue structure at a source node is connected with a physical queue structure on a target node over the network. However, since the inventive techniques create both virtual queue structures and physical queue structures, module 370 initiates connection between a virtual queue structure at the source node and a virtual queue structure at the target node. During the connection negotiation process, virtual queue structure management module starts the queue structure connection process on a selected physical queue structure from the pool. The actual connection negotiation is performed using well-known client-server connection processes by which a first node sends a request to a second node, which is listening on one of its ports. During the process, the first node and second node exchange information to establish the connection. Once the connection is created among queue structures at the first and second node connected over the RDMA interconnect, virtual queue structure management module is notified.


Once the connection between a source node and a target node is established, the virtual queue structure management module 370 selects a physical queue structure that is in the active state and associates each VQS with one or more physical QSs (step 640). Associating a virtual queue structure with one or more physical queue structures (which are registered with the interconnect driver) may involve selecting an active physical queue structure from a pool of physical queue structures and providing a reference from the virtual QS to the active physical QS, for example, in a data structure (e.g., 500).


Module 370 keeps information about each queue structure. To this end, in one implementation, the Virtual QS management module queries data structure 500 shown in FIG. 5 to determine the state of the queue structures. Once at least one physical queue structure on the first node is connected to a physical queue structure at the second node, the virtual queue structures are said to be connected and the upper-subsystem module is notified.


Now with reference to FIG. 5A, data structure 500 for storing information about virtual queue structures and association between virtual queue structures and physical queue structures according to novel embodiments is illustrated. Such a data structure can be stored in memory 224. Those skilled in the art would understand that although data structure 500 illustrates specific fields, other fields can be included in data structure 500. Similarly, some of the fields can be omitted in other implementations.


Field 505 stores information about an upper subsystem module that posted a request to the virtual QS management module. Such a subsystem module can be a file system, a RAID subsystem, or any other subsystem on the node). Those skilled in the art should understand that any number of virtual QSs can be created.


Field 510 maintains a unique identifier (ID) of a virtual queue structure (VQS). Such an ID is assigned to the VQS upon its creation by e.g., virtual queue structure management module. The upper subsystem obtains the ID of the VQS when it is created and uses the VQS ID to submit a request to the queue structure and to check if any request submitted to the VQS is completed.


Field 515 maintains the state of a virtual queue structure. The state can be, for example, CONNECTED, ERROR, or IDLE. According to one embodiment, as long as a physical queue structure associated with a virtual queue structure is in a CONNECTED state, VQS state is CONNECTED.


Field 520 maintains information about a type of a queue on the virtual queue structure. As described herein, RDMA protocol uses a send, receive, and a completion queues to send requests, post receive buffers, and maintain a completion status, respectively.


Field 530 maintains information about physical queue structures associated with the virtual queue structures as will be described in connection with FIG. 5B where data structure 502 storing information about physical QSs is shown.


An exemplary entry in data structure 500 is illustrated. As shown in FIG. 5A, an exemplary entry includes a name of an upper subsystem module that initiated the RDMA connection (i.e., RAID), the VQS ID number (e.g., VQS#1), the state of the VQS (CONNECTED), a send queue, a receive queue, and a completion queue. The data structure further includes field 530 storing unique IDs of physical queue structures associated with the virtual queue structure.


Exemplary data structure 502 storing information about physical QSs is illustrated in FIG. 5B. Field 535 maintains an ID of a physical QS, field 540 maintains information about a state of a physical queue structure. The state can be, for example, CONNECTED, ERROR, or IDLE. Additional status information in data structure 502 may include a status of a physical queue structure, i.e., ACTIVE or STANDBY. As used herein, an active queue structure is the physical queue structure that is used to perform data transfer while the standby queue structure is a physical queue structure that is not used in the data transfer. As will be described in more detail below, the distinction between an active and standby queue structure is important since according to novel embodiments described herein, when an active queue structure is in error, a request is posted to a standby queue structure, which essentially becomes an active queue structure. This way the connection does not need to be reestablished or worse yet the error does not need to be propagated to the upper subsystem module that initiated the data transfer.


Field 550 maintains information about a type of the queue on the physical queue structure, such as a send, receive, or completion queue. An exemplary entry in data structure 502 may include an ID of the physical QS, a status (such as CONNECTED and ACTIVE or CONNECTED and STANDBY). The entry may include an ID of the request queues (such as send and receive queues). Status of the completion queue (such as having completions or Empty) can be determined by looking at the completion queue. “Empty” indicates that the completion result was moved to a completion queue of a VQS.


Those skilled in the art would understand that although two data structures (e.g., 500 and 502) are illustrated for storing information about virtual and physical queue structures, in other implementations, one data structure combining information about virtual and physical QSs can be used.


Once the connection is established and the virtual queue structures are associated with one or more physical queue structures, module 370 notifies the upper subsystem module that it is ready to perform a data transfer.


Data Transfer on RDMA Connection


In one implementation, the steps described herein are performed by the upper subsystem, the virtual queue structure management module residing within the failover virtual layer at node 200a and the interconnect adapter. Those skilled in the art would appreciate that these steps can be performed by other components within a node. RDMA write operation is used as an example in this section.


Initially, at step 705, failover virtual layer, specifically, the queue structure management module 370 receives a request from the upper subsystem module (such as a file system, RAID, or any other subsystem of node 200). In one embodiment, the request includes an address in memory at a first node where data are stored and an address in memory at a second node where data to be written. The nature of the data to be transferred depends on the type of the RDMA operation initiated by the upper subsystem module. For example, in one implementation, the data may represent write logs to be transferred from node 200a to node 200b. In other implementations, the data may include the node status information to be directly transferred to a memory of a partner node. Yet in other applications, the data may include changes to data blocks on the node 200a to be transferred directly to node 200b. Importantly, such data will be sent over a network from a memory of node 200a directly to a memory of node 200b over RDMA connection. In one embodiment, upon receiving the request from the upper layer module, module 370 gathers the source address and the destination address from the request and generates a local request based on this information. The local request may include the source address, the destination address, and length of the memory region. Module 370 then posts the local request to either a send or receive queue of the virtual queue structure in memory (step 710). In addition, module 370 posts the request to the send or receive queue of the active physical queue structure physical queue structure in memory (step 720). The active physical queue structure physical queue structure is associated with the VQS. As used herein, posting the request means copying the request to the memory location of a queue. In one implementation, the request scheduling module 360 helps to identify an active physical QS where the request can be posted.


Upon posting the request in the VQS and physical QS, module 370 notifies (step 725) the interconnect driver 350 that a request is posted to the active physical queue structure (which was selected by the request scheduling module, for example) by, i.e., providing an address in memory of the active physical queue structure. The interconnect driver 350, in turn, notifies the interconnect adapter 232 that the request is posted. The interconnect adapter is only aware of the physical QSs created in memory and does not have knowledge about the created VQSs.


The interconnect adapter, in turn, uses the address of the active physical queue structure to access the request in the physical QS. The interconnect adapter then obtains the source memory address of the data from the physical QS on the first node. The interconnect adapter then composes a data packet, which includes a source address, destination address, and data. The interconnect adapter then performs transfer of the data packet over the established RDMA connection to the second node (step 730). When the data packet arrives at the second node, the interconnect adapter at the second node uses the destination address in the request to write the data directly to the memory at the second node. The interconnect adapters 232a, b (shown in FIG. 1) at the first node and at the second node use RDMA protocol primitives to communicate. Thus, when the data are written to the memory at the second node, the interconnect adapter 232b at the second node communicates to the first node the completion status. The interconnect adapter 232a at the first node (i.e., node 200a), in one implementation, stores the completion status in the completion queue of the active physical queue structure (step 735). The interconnect adapter 232a at the first node posts the completion status to the completion queue of the active physical queue structure rather than in that of the virtual queue structure since it is not aware of the virtual QS. As a corollary of this, while the interconnect adapter is aware of the status of the request completion, the upper subsystem module that created the request does not become aware of the request completion until after the completion status is moved to the completion queue of the virtual queue structure associated with the active physical queue structure, as further explained.


At step 740, request scheduling module examines the completion status. If the completion status is successful, i.e., the data transfer took place, request completion module moves the completion status from the completion queue of the active physical queue structure and puts it in the completion queue of the virtual queue structure. Now that the completion status is moved to the completion queue of the virtual queue structure, the upper subsystem module can examine the completion queue of the virtual queue structure. Thus, according to novel techniques described herein, the upper subsystem modules can become aware of the successful completion of the RDMA transfer only after the completion request is moved to the VQS accessible to the upper subsystems. As used herein, the term “accessible” means that the upper subsystems are configured to receive memory addresses of virtual queue data structures. If the completion status is a “failure”, the upper subsystem does not learn about the failover while the virtual QS management module performs failover of RDMA connection from one physical connection to another physical connection without disrupting the upper subsystem. Novel steps for providing non-disruptive failover of RDMA connection are described below in connection with FIG. 8


Failover of RDMA Connection


Monitoring module 380 of the failover virtual layer periodically polls physical QSs in the pool of QSs to determine if any of the QSs are in error. Monitoring module 380 is in one implementation the recipient of all connection status notifications from the interconnect adaptor as well. If module 380 sees that one of the QSs is in error, it provides an indication that this particular QS cannot be used (step 810). In one implementation, such an indication can be provided in data structure 502, which maintains information about QSs. Request scheduling module 360 selects other physical QSs, which are associated with the virtual QS (step 820). To this end, in one implementation, module 370 queries data structure 500 to identify other physical QSs associated with the virtual QS, which are not in the error state. Virtual QS management module prepares a standby physical QSs associated with the virtual QS to accommodate possible non-disruptive failover process in the future. For example, exemplary entry for physical QS#2 in data structure 502 indicates that it is in a standby state. Upon finding another physical QS, module 360 makes this QS an active QS, by for example, moving outstanding requests from the physical QS in error to the new active physical QS (step 830). Moving the outstanding requests from one QS to another QS means copying the requests from one QS to another QS. Importantly, the upper subsystem does not have any information about the error that occurred on the active QS because the upper subsystem is not aware of the physical QSs created by module 370. After selecting a new active physical QS to perform the RDMA transfer, virtual QS management module 370 notifies the interconnect driver that the request is posted to another physical QS. The interconnect driver, which manages the interconnect adapter, communicates to the interconnect adapter that the request is posted to a new physical QS (step 840). In one implementation, the interconnect adapter obtains a memory handle of the active physical QS where the request is stored. The interconnect adapter uses the memory handle to access the request. The interconnect adapter 232a at the first computer node then uses the source address indicated in the request to access data in memory. The interconnect adapter then composes a data packet, which includes the source address, destination address, and data. The interconnect adapter sends the data packet over the RDMA connection (step 845), which was earlier established.


Once the request is completed, the interconnect adapter 232a at the source node receives an indication from interconnect adapter 232b at the second node. The interconnect adapter 232a at the first node updates the completion queue of the active physical QS where the outstanding requests were moved (step 850).


Once the completion status is posted to the physical QS, scheduling module accesses the completion queue of the physical QS where the requests were moved, determines that the completion status is successful, and moves the completion status to the completion queue of the virtual QS (step 860). Upper subsystem periodically polls the completion status of the virtual QS. Thus, the upper subsystem learns that the request was successfully completed. Since the upper subsystem does not have any knowledge that a physical QS was in error and another physical QS was selected to perform the RDMA transfer, the upper subsystem continues creating requests for data transfer and providing them to the virtual QS management module without interruption. As a corollary to this, the failover mechanism performed by module 370 does not cause disruption to the upper subsystem.


Although embodiments described herein, for the purpose of explanation, have been described with reference to specific exemplary embodiments, it will be understood that the embodiments describe herein are not limited to any specific implementation. For example, embodiments described herein can be practiced on any device. A person of ordinary skill in the art would understand that the inventive principles can be practiced with modifications and alternations to those embodiments or can be practiced in other embodiments within the spirit and scope of the appended claims. Also, those skilled in the art should note that the terms “source node”, “first storage system”, and “first computer node” or “first node” are used interchangeably herein. Similarly, the terms “destination node”, “target node”, and “second computer node” are used interchangeably herein. Unless specifically stated otherwise, it is to be appreciated that throughout the discussions utilizing terms such as “processing” or “computing” or “determining” or the like refer to the action and processes of a computer system or similar electronic computing device that manipulates and transforms data represented as physical (e.g. electronic) quantities within the computer systems registers and memories into other data similarly represented as physical quantities within the computer system.


The present novel embodiments described herein can be implemented by apparatuses for performing the operations herein. These apparatuses may be specially constructed for the required purposes or they may comprise a machine, such as a general-purpose computer selectively activated or reconfigured by a computer program (such as a collection of instructions for execution by a machine or processor for example) stored in the computer. Such a computer program may be stored in a computer readable storage medium, such as, but not limited to any type of disk including floppy disks, optical disks, magnetic optical disks, flash storage devices, read-only memories, random access memories, EPROMS, EEPROMS, magnetic or optical cards or any type of media suitable for storing physical (e.g. electronic) constructions and each coupled to a computer system bus. Each of these media may be coupled to a computer system bus through use of an appropriate device for reading and or for writing the media.

Claims
  • 1. A computing device comprising: a memory containing a machine readable medium comprising machine executable code having stored thereon instructions for performing a method of non-disruptive failover; anda processor coupled to the memory, the processor configured to execute the machine executable code to cause the processor to: create at least one request comprising a source memory address for reading data over a Remote Direct Memory Access (RDMA) connection and a destination memory address at which to store the data;establish, based on the at least one request, the RDMA connection for transfer of the data between a plurality of computing devices;receive a completion status for the at least one request from at least one of the plurality of computing devices after the RDMA connection is established, wherein the completion status indicates a status of the data transfer over the RDMA connection; andperform a failover of the RDMA connection comprising moving the at least one request from a first physical queue structure to a second physical queue structure, when the received completion status indicates that an error has occurred during transfer of the data over the RDMA connection, wherein the first and second physical queue structure are associated with a same virtual queue structure.
  • 2. The device of claim 1, wherein the processor is further configured to execute the machine executable code to cause the processor to: post the at least one request and the completion status in the first physical queue structure.
  • 3. The device of claim 2, wherein the processor is further configured to execute the machine executable code to cause the processor to: move the at least one request to the virtual queue structure when the completion status indicates that the data transfer over the RDMA connection was successfully completed.
  • 4. The device of claim 2, wherein the virtual queue structure comprises a send queue configured to store RDMA requests, a receive queue to store the at least one request, or a completion queue to store an RDMA transmission status.
  • 5. The device of claim 2, wherein the first physical queue structure comprises a send queue configured to store RDMA requests, a receive queue to store the at least one request, or a completion queue to store an RDMA transmission status.
  • 6. The device of claim 2, wherein the processor is further configured to execute the machine executable code to cause the processor to: populate a failover data structure with virtual queue structure data, physical queue structure data, or association data based on at least one association between the virtual queue structure and the first and second physical queue structures.
  • 7. A method comprising: creating, by a storage server, at least one request comprising a source memory address for reading data over a Remote Direct Memory Access (RDMA) connection and a destination memory address at which to store the data;establishing, by the storage server, based on the at least one request, the RDMA connection for transfer of the data between a plurality of computing devices;receiving, by the storage server, a completion status for the at least one request from at least one of the plurality of computing devices after the RDMA connection is established, wherein the completion status indicates a status of the data transfer over the RDMA connection; andperforming, by the storage server, a failover of the RDMA connection comprising moving the at least one request from a first physical queue structure to a second physical queue structure, when the received completion status indicates that an error has occurred during transfer of the data over the RDMA connection, wherein the first and second physical queue structure are associated with a same virtual queue structure.
  • 8. The method of claim 7, further comprising: posting, by the storage server, the at least one request and the completion status in the first physical queue structure.
  • 9. The method of claim 8, further comprising moving, by the storage server, the at least one request to the virtual queue structure when the completion status indicates that the data transfer over the RDMA connection was successfully completed.
  • 10. The method of claim 8, wherein the virtual queue structure comprises a send queue configured to store RDMA requests, a receive queue to store the at least one request, or a completion queue to store an RDMA transmission status.
  • 11. The method of claim 8, wherein the first physical queue structure comprises a send queue configured to store RDMA requests, a receive queue to store the at least one request, or a completion queue to store an RDMA transmission status.
  • 12. The method of claim 8, wherein the performing the failover of the RDMA connection further comprises: populating, by the storage server, a failover data structure with virtual queue structure data, physical queue structure data, or association data based on at least one association between the virtual queue structure and the first and second physical queue structures.
  • 13. A non-transitory machine readable medium having stored thereon instructions for performing a method comprising machine executable code which when executed by at least one machine, causes the machine to: create at least one request comprising a source memory address for reading data over a Remote Direct Memory Access (RDMA) connection, and a destination memory address at which to store the data;establish, based on the at least one request, the RDMA connection for transfer of the data between a plurality of computing devices;receive a completion status for the at least one request from at least one of the plurality of computing devices after the RDMA connection is established, wherein the completion status indicates a status of the data transfer over the RDMA connection; andperform a failover of the RDMA connection comprising moving the at least one request from a first physical queue structure to a second physical queue structure, when the received completion status indicates that an error has occurred during transfer of the data over the RDMA connection, wherein the first and second physical queue structure are associated with a same virtual queue structure.
  • 14. The medium of claim 13, further having stored thereon instructions that when executed by the machine, cause the machine to: post the at least one request and the completion status in the first physical queue structure.
  • 15. The medium of claim 14, further having stored thereon instructions that when executed by the machine, cause the machine to: move the at least one request to the virtual queue structure when the completion status indicates that the data transfer over the RDMA connection was successfully completed.
  • 16. The medium of claim 14, wherein the virtual queue structure comprises a send queue configured to store RDMA requests, a receive queue to store the at least one request, or a completion queue to store an RDMA transmission status.
  • 17. The medium of claim 14, wherein the first physical queue structure comprises a send queue configured to store RDMA requests, a receive queue to store the at least one request, or a completion queue to store an RDMA transmission status.
  • 18. The medium of claim 14, further having stored thereon instructions that when executed by the machine, cause the machine to: populate a failover data structure with virtual queue structure data, physical queue structure data, or association data based on at least one association between the virtual queue structure and the first and second physical queue structures.
RELATED APPLICATION(S)

This application is a continuation of U.S. application Ser. No. 12/978,866, filed on Dec. 27, 2010, entitled “NON-DISRUPTIVE FAILOVER OF RDMA CONNECTION”, at least some of which may be incorporated herein.

US Referenced Citations (8)
Number Name Date Kind
7593996 Gole et al. Sep 2009 B2
8041987 Allen Oct 2011 B2
8233380 Subramanian et al. Jul 2012 B2
8244825 Subramanian et al. Aug 2012 B2
8244826 Benner et al. Aug 2012 B2
20020071386 Gronke Jun 2002 A1
20080126509 Subramanian et al. May 2008 A1
20120042202 Wenzel Feb 2012 A1
Non-Patent Literature Citations (2)
Entry
International Preliminary Report on Patentability for Application No. PCT/US2011/067378 mailed on Jul. 2, 2013, 12 pages.
International Search Report and Written Opinion for Application No. PCT/US2011/067378 mailed on Apr. 4, 2013, 20 pages.
Related Publications (1)
Number Date Country
20140136880 A1 May 2014 US
Continuations (1)
Number Date Country
Parent 12978866 Dec 2010 US
Child 14134063 US